diff --git a/.clang-tidy b/.clang-tidy index 7434d0073b..781e5cde4d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,9 +3,12 @@ Checks: > -*, cppcoreguidelines-macro-usage, modernize-use-nullptr, - modernize-use-override + modernize-use-override, + readability-uppercase-literal-suffix CheckOptions: - key: cppcoreguidelines-macro-usage.AllowedRegexp value: 'validate_global_widx|NETWORK_STREAM_VERSION' + - key: readability-uppercase-literal-suffix.NewSuffixes + value: 'u;L;uL;LL;uLL' WarningsAsErrors: true FormatStyle: 'file' diff --git a/CMakeLists.txt b/CMakeLists.txt index 8de61285d1..0142c4b5e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,9 +64,9 @@ set(TITLE_SEQUENCE_VERSION "0.4.6") set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/download/v${TITLE_SEQUENCE_VERSION}/title-sequences.zip") set(TITLE_SEQUENCE_SHA1 "80fefc6ebbabc42a6f4703412daa5c62f661420d") -set(OBJECTS_VERSION "1.4.4") +set(OBJECTS_VERSION "1.4.6") set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v${OBJECTS_VERSION}/objects.zip") -set(OBJECTS_SHA1 "4e9b5d7f85a07b90ec57fe37517e04b19ee0395c") +set(OBJECTS_SHA1 "49852246ba3d3a44f143e0c4de8f4d2e8f950c10") set(OPENSFX_VERSION "1.0.5") set(OPENSFX_URL "https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v${OPENSFX_VERSION}/opensound.zip") @@ -129,9 +129,9 @@ if (MACOS_USE_DEPENDENCIES) # if we're building on macOS, then we need the dependencies include(cmake/download.cmake) - set(MACOS_DYLIBS_VERSION "35") + set(MACOS_DYLIBS_VERSION "36") set(MACOS_DYLIBS_ZIPFILE "openrct2-libs-v${MACOS_DYLIBS_VERSION}-universal-macos-dylibs.zip") - set(MACOS_DYLIBS_SHA1 "bed4340c32b6dbee9634ceaf19cb6b49a837aead") + set(MACOS_DYLIBS_SHA1 "1a41c1afed40e0f63daf0b6612c50e8cb8cda495") set(MACOS_DYLIBS_DIR "${ROOT_DIR}/lib/macos") set(MACOS_DYLIBS_URL "https://github.com/OpenRCT2/Dependencies/releases/download/v${MACOS_DYLIBS_VERSION}/${MACOS_DYLIBS_ZIPFILE}") diff --git a/contributors.md b/contributors.md index d540ac0c27..bc4cd8f69c 100644 --- a/contributors.md +++ b/contributors.md @@ -12,6 +12,7 @@ Includes all git commit authors. Aliases are GitHub usernames or community nickn * Karst van Galen Last (AuraSpecs) - Lead OpenSoundEffects & OpenMusic * Michael Bernardi (mrmbernardi) - Programming * Michael Steenbeek (Gymnasiast) - Lead Localisation - Programming +* Aaron van Geffen (AaronVanGeffen) - Programming ## Support team * Kenton Boadway (Krutonium) - Lead OpenScenarios @@ -21,7 +22,6 @@ Includes all git commit authors. Aliases are GitHub usernames or community nickn * Marijn van der Werf (marijnvdwerf) * (zsilencer) * Richard Jenkins (rwjuk) -* Aaron van Geffen (AaronVanGeffen) * Rik Smeets (rik-smeets) ## Long term contributors @@ -119,6 +119,7 @@ Appreciation for contributors who have provided substantial work, but are no lon * Tiago Reul (reul) - Misc. * Fredrik Tegnell (fredriktegnell) - Misc. * Alex Parisi (alex-parisi) - Added API for returning metadata from all registered plugins. +* Arnold Zhou (mrmagic2020) - Various plugin additions, new game option, misc. ## Bug fixes & Refactors * Claudio Tiecher (janclod) @@ -239,6 +240,8 @@ Appreciation for contributors who have provided substantial work, but are no lon * Cory Ye (CoryfY) * Karsten Van Fossan (karstenvanf) * Kaavya Ramachandhran (ayvaak) +* Mike Harvey (harvito) +* Robert Yan (lewyche) ## Toolchain * (Balletie) - macOS @@ -270,7 +273,7 @@ Appreciation for contributors who have provided substantial work, but are no lon * English (UK) - Ted John (IntelOrca), (Tinytimrob) * English (US) - Ted John (IntelOrca), Michael Steenbeek (Gymnasiast); small fixes: (LRFLEW), (mike-koch), Harry Lam (daihakken) * Catalan - Joan Josep (J0anJosep) -* Chinese (Simplified) - Naiji Ma (naijim), (izhangfei), Eric Zhao (sczyh30), (Muhhan) +* Chinese (Simplified) - Naiji Ma (naijim), (izhangfei), Eric Zhao (sczyh30), (Muhhan), Arnold Zhou (mrmagic2020) * Chinese (Traditional) - Harry Lam (daihakken) * Czech - Martin Černáč (octaroot), (Clonewayx), Tomáš Pazdiora (Aroidzap) * Danish - Lars P. Sørensen (LPSGizmo) diff --git a/data/language/ar-EG.txt b/data/language/ar-EG.txt index a5c5f1a275..451dc6ed15 100644 --- a/data/language/ar-EG.txt +++ b/data/language/ar-EG.txt @@ -2888,7 +2888,7 @@ STR_5755 :نسخة برنامج خاطئة (السرفر يستخدم الن STR_5756 :كلمة سر خاطئة STR_5757 :السرفر ممتلئ STR_5758 :{OUTLINE}{GREEN}{STRING} قد إنظم للعبة -STR_5759 :يُحمل الخريطة … ({INT32} / {INT32}) كيلو بايت +STR_5759 :يُحمل الخريطة … STR_5760 :دولار هونج كونج (دهونج) STR_5761 :دولار تيوان الجديدة (دتيوان) STR_5762 :الين الصيني (ين) @@ -3448,7 +3448,7 @@ STR_6374 :C STR_6375 :رحلة غير معروفة STR_6376 :{WINDOW_COLOUR_2}عربة الرحلة:{NEWLINE}{BLACK}{STRINGID} لـ {STRINGID} STR_6377 :{WINDOW_COLOUR_2}النوع: {BLACK}{STRINGID} لـ {STRINGID} -STR_6378 :يستقبل قائمة العناصر: {INT32} / {INT32} +STR_6378 :يستقبل قائمة العناصر: STR_6379 :أستقبل بيانات خاطئة STR_6380 :يتوفر تحديث للعبة! STR_6381 :إنضم لديسكورد الرسمي! @@ -3457,8 +3457,8 @@ STR_6383 :فتح صفحة التحميل STR_6384 :ثلوج STR_6385 :ثلوج كثيفة STR_6386 :عاصفة ثلجية -STR_6387 :لا يمكن خفض العنصر هنا... -STR_6388 :لا يمكن رفع العنصر هنا... +STR_6387 :لا يمكن خفض العنصر هنا… +STR_6388 :لا يمكن رفع العنصر هنا… STR_6389 :فسحة غير صالحة STR_6390 :تحتاج OpenRCT2 إلى ملفات من لعبة RollerCoaster Tycoon 2 الاصلية لكي تعمل. الرجاء تحديد المسار التي تتواجد به RollerCoaster Tycoon 2. STR_6391 :من فضلك حدد مسار اللعبة الاصلية @@ -4197,87 +4197,87 @@ STR_DTLS :قم ببناء جولات الأعلام الستة المفقود ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :أفريقيا - منجم الماس الأفريقي +STR_SCNR :مناجم أفريقيا STR_PARK :مناجم أفريقيا STR_DTLS :لقد ورثت منجم ألماس مهجور ووجدت ألماسة ثمينة. قررت استثمار هذه الأموال لبناء مدينة ملاهي مشهورة عالميًا. -STR_SCNR :أفريقيا - الواحة +STR_SCNR :جنون السراب STR_PARK :جنون السراب STR_DTLS :تم اكتشاف واحة صحراوية والتي ستوفر موقعًا جميلًا للحديقة. تم توفير المواصلات من وإلى الواحة. -STR_SCNR :أفريقيا - شلالات فيكتوريا +STR_SCNR :على الحافة STR_PARK :على الحافة STR_DTLS :تم بناء سد يوفر طاقة كهرومائية وفيرة ورخيصة لتشغيل الحديقة. أنت بحاجة للوصول إلى قيمة عالية للحديقة للمساعدة في سداد قرض السد. -STR_SCNR :أنتاركتيكا - الإنقاذ البيئي +STR_SCNR :المغامرات الثلجية STR_PARK :المغامرات الثلجية STR_DTLS :لقد لجأت إليك وكالة البيئة لتحويل مصفاة نفط قديمة صديقة للبيئة إلى منطقة جذب سياحي كبرى. الأرض رخيصة لكن الفائدة على القرض مرتفعة. يمكنك بيع المباني القديمة من أجل بعض النقود. -STR_SCNR :آسيا - تعزيز السياحة بسور الصين العظيم +STR_SCNR :سور الصين العظيم STR_PARK :سور الصين العظيم STR_DTLS :قررت السلطات تعزيز السياحة حول السور العظيم من خلال بناء مدينة ترفيهية على الأرض المجاورة. المال ليس مُعضلة! -STR_SCNR :آسيا - استصلاح السواحل اليابانية +STR_SCNR :شاطئ أوكيناوا STR_PARK :شاطئ أوكيناوا STR_DTLS :نفدت مساحة الحديقة الموجودة. خيارك الوحيد هو البناء في البحر، وهكذا حصلت على قرض. يتم فرض قيود الارتفاع على المباني الخاصة بك بسبب الأساسات ومخاطر الزلازل. -STR_SCNR :اسيا - قصر المهراجا +STR_SCNR :حديقة المهراجا STR_PARK :حديقة المهراجا STR_DTLS :لقد تم تكليفك من قبل المهراجا لإحضار الترفيه لعدد كبير من السكان المحليين. حيث يتعين عليك بناء حديقة مستوحاة من قصر المهراجا. -STR_SCNR :أستراليا - صخور أولورو +STR_SCNR :مغامرات أولورو STR_PARK :مغامرات أولورو STR_DTLS :أنت تساعد السكان الأصليين في بناء حديقة كجزء من برنامج التوعية الثقافية. تحتاج إلى الوصول إلى عدد كبير من الزوار لتثقيفهم حول التراث الفريد للسكان الأصليين. -STR_SCNR :أستراليا - المرح على الشاطئ +STR_SCNR :حفلة شواء على الشاطئ STR_PARK :حفلة شواء على الشاطئ STR_DTLS :تعرضت حديقة الفقمة الخاصة برجل أعمال محلي للإفلاس. أنت حاليًا تدير حديقة صغيرة، قُمت بشراء الحديقة الأخرى من شركة البناء. ويتعين عليك الأن تطوير حديقة مشتركة كبيرة. -STR_SCNR :أوروبا - المهرجان الثقافي الأوروبي +STR_SCNR :الروعة الأوروبية STR_PARK :الروعة الأوروبية STR_DTLS :لقد تم إحضارك لتولي مركز جذب الزوار الثقافيين الأوروبيين ويجب عليك زيادة عدد الضيوف من أجل سداد دعم الاتحاد الأوروبي بحلول نهاية الدورة الحالية للبرلمان الأوروبي. -STR_SCNR :أوروبا - التجديد +STR_SCNR :من الرماد STR_PARK :من الرماد STR_DTLS :لقد أصبحت هذه الحديقة القديمة بحالة يرثى لها. حَصلت على منحة من الاتحاد الأوروبي لإعادة هذه المنطقة المحرومة إلى مجدها السابق! تحتاج إلى تجديد الحديقة وسداد المنحة. -STR_SCNR :أمريكا الشمالية - جزيرة هاواي الأخيرة +STR_SCNR :واكي وايكيكي STR_PARK :واكي وايكيكي STR_DTLS :يشعر سكان هاواي بالملل من ركوب الأمواج ويبحثون عن شيء أكثر إثارة. تحتاج إلى بناء حديقة مع وضع ذلك في الاعتبار للحفاظ على التصنيف المرتفع لمناطق الجذب السياحي في المنطقة. -STR_SCNR :أمريكا الشمالية - الوادي العظيم +STR_SCNR :أحداث الوادي STR_PARK :أحداث الوادي STR_DTLS :عليك بناء حديقة على أرض محدودة على جانبي هذا الكنز الطبيعي - لديك الفرصة لشراء الأراضي المجاورة من الهنود الأمريكيين الأصليين. تحتاج إلى إكمال الهدف للحفاظ على سكان المدينة المحلية. -STR_SCNR :أمريكا الشمالية - جنة الأفعوانيات +STR_SCNR :جنة الأفعوانيات STR_PARK :جنة الأفعوانيات STR_DTLS :أنت رجل أعمال ناجح في إجازة طويلة وترغب في استغلال هذا الوقت في تحويل حديقة المدينة إلى جنة أفعوانيات. المال ليس عائقًا! -STR_SCNR :أمريكا الجنوبية - مدينة الإنكا المفقودة +STR_SCNR :مؤسس المدينة المفقودة STR_PARK :مؤسس المدينة المفقودة STR_DTLS :لتعزيز السياحة المحلية، يجب عليك إنشاء حديقة تتماشى مع محيطها، ولها قيود على الارتفاع. -STR_SCNR :أمريكا الجنوبية - هضبة الغابات المطيرة +STR_SCNR :العاب الغابات المطيرة STR_PARK :العاب الغابات المطيرة STR_DTLS :المساحة محدودة في الغابات المطيرة الثمينة - حيث يجب عليك ضم أكبر قدر ممكن في المساحة المخلية الحالية، من أجل توفير بديل قابل للتطبيق لصناعة الأخشاب المحليةالمساحة محدودة في الغابات المطيرة الثمينة - يجب حشر أكبر قدر ممكن في المساحة المخلية الحالية، من أجل توفير بديل قابل للتطبيق لصناعة الأخشاب المحلية. -STR_SCNR :أمريكا الجنوبية - كرنفال ريو +STR_SCNR :شواطئ باو دي أسوكار STR_PARK :شواطئ باو دي أسوكار STR_DTLS :انت تُدير حديقة صغيرة بالقرب من مدينة ريو لكن البنك طالبك بالقرض. تحتاج إلى زيادة ربحك بسرعة لتسديد هذا الدين غير المتوقع. @@ -4285,72 +4285,72 @@ STR_DTLS :انت تُدير حديقة صغيرة بالقرب من مدين ## Time Twister Scenarios ############################################################################### -STR_SCNR :العصور المظلمة - القلعة +STR_SCNR :قلعة كليفسايد STR_PARK :قلعة كليفسايد STR_DTLS :الأعضاء المحليون في مجتمع إعادة تمثيل المعركة جادون إلى حد ما بشأن هوايتهم. لقد عهدوا إليك بمهمة بناء مدينة ملاهي بطابع العصور المظلمة على أراضي قلعة كليفسايد. -STR_SCNR :العصور المظلمة - روبن هود +STR_SCNR :غابة شيروود STR_PARK :غابة شيروود STR_DTLS :لتحرير الثروة من الأثرياء وتوزيعها على المحتاجين، قررت أنت ورجالك التابعين بناء مدينة ملاهي في غابة شيروود. -STR_SCNR :المستقبل - اللقاءات الأولى +STR_SCNR :الروعة خارج الأرض STR_PARK :الروعة خارج الأرض STR_DTLS :تم اكتشاف الحياة على كوكب بعيد، قم ببناء متنزه غريب للاستفادة من موجة الاهتمام غير المسبوقة. -STR_SCNR :المستقبل - عالم المستقبل +STR_SCNR :مدينة الجوزاء STR_PARK :مدينة الجوزاء STR_DTLS :أظهر رؤيتك المبتكرة والمثالية للمستقبل - ابتكر تصميمًا مستقبليًا للحديقة يتضمن أحدث عوامل الجذب. -STR_SCNR :الأساطير - موقع أفلام أنيماترونكس +STR_SCNR :تحفيات أنيماترونكس STR_PARK :تحفيات أنيماترونكس STR_DTLS :لقد تم تكليفك بمهمة تشغيل وتحسين مدينة ملاهي موجودة، والتي تم إنشاؤها على مجموعة أفلام قديمة. أنشئ تكريمًا لرسامي تقنية إيقاف الحركة الرائدين الذين قاموا بإحياء الكائنات الأسطورية على الشاشة الفضية لأول مرة. -STR_SCNR :الأساطير - مهد الحضارة +STR_SCNR :جنون الأساطير STR_PARK :جنون الأساطير STR_DTLS :أنت تمتلك جزيرة ذات قيمة أثرية معينة. لقد قررت تمويل الحفاظ عليها من خلال بناء مدينة ملاهي على أساس التراث الأسطوري الغني للمنطقة. -STR_SCNR :ماقبل التاريخ - بعد النيزك +STR_SCNR :المذبحة الحفرة STR_PARK :المذبحة الحفرة STR_DTLS :أنت تمتلك حفرة نيزك قديمة متربة. بروح ريادة الأعمال الحقيقية، قررت إنشاء مدينة ملاهي ذات طابع نايزك وكويكبات وتحويل أرضك التي تبدو بلا قيمة إلى ثروة كبيرة. -STR_SCNR :ماقبل التاريخ - سفاري جوراسي +STR_SCNR :كوسترسورس STR_PARK :كوسترسورس STR_DTLS :لقد تم تكليفك بمهمة بناء مدينة ملاهي ذات طابع من العصر الجوراسي. لتحسين وصول الزائرين إلى المعروضات النباتية والحيوانية الغريبة، ستحتاج إلى إنشاء رحلات تجول في الوادي وداخله. -STR_SCNR :ماقبل التاريخ - العصر الحجري +STR_SCNR :الرحلات الحجرية STR_PARK :الرحلات الحجرية STR_DTLS :لإحباط مطوري الطرق السريعة والحفاظ على الدوائر الحجرية القديمة الغامضة، ستحتاج إلى إنشاء مدينة ملاهي ذا طابع العصر الحجري وزيادة الأرباح. ومع ذلك، قد يشكل جذب الزوار تحديًا، حيث أن التضاريس غير مضيافة. -STR_SCNR :العشرينيات الصاخبة - جزيرة السجن +STR_SCNR :ألكتراز STR_PARK :ألكتراز STR_DTLS :جزيرة السجن سيئة السمعة - التي زاد عدد سكانها ذات يوم بالمهربين والمبتزين - معروضة للبيع الآن. لقد قررت تحويلها إلى منطقة جذب سياحي كبرى، والمال ليس مُعضلة -STR_SCNR :العشرينيات الصاخبة - كأس شنايدر +STR_SCNR :شواطئ شنايدر STR_PARK :شواطئ شنايدر STR_DTLS :تقترب الذكرى 75 لفوز جدك بكأس شنايدر في غضون بضع سنوات. سوف تكرم إنجازه من خلال بناء مدينة ملاهي على أساس سباق الطائرات المائية الشهير. -STR_SCNR :العشرينيات الصاخبة - ناطحات السحب +STR_SCNR :متروبوليس STR_PARK :متروبوليس STR_DTLS :أنت تمتلك قطعة أرض فارغة بالقرب من الجزء المنخفض من المدينة. لتحقيق أقصى استفادة من الممتلكات الحضرية الخاصة بك ، قم ببناء مدينة ملاهي مع ناطحات سحاب مستوحاة من العمارة الشاهقة على طراز فن الآرت ديكو في العشرينات. -STR_SCNR :روك أند رول - قوة الورود +STR_SCNR :وودستوك STR_PARK :وودستوك STR_DTLS :يُقام مهرجان موسيقي سنوي كبير على أرضك. أنشئ متنزهًا عصريًا للترفيه عن الجمهور المفعم بالحيوية. -STR_SCNR :روك أند رول - روك أند رول +STR_SCNR :إحياء الروك أند رول STR_PARK :إحياء الروك أند رول STR_DTLS :شهدت مدينة ملاهي القديمة هذه أيامًا أفضل. ساعد المالك على إضفاء مظهر روك أند رول وحول المكان إلى مكان ناجح. diff --git a/data/language/ca-ES.txt b/data/language/ca-ES.txt index 7989e35b2e..a1d6a725f2 100644 --- a/data/language/ca-ES.txt +++ b/data/language/ca-ES.txt @@ -98,6 +98,8 @@ STR_0093 :Muntanya russa híbrida STR_0094 :Muntanya russa d’un sol rail STR_0095 :Muntanya russa alpina STR_0096 :Muntanya russa clàssica de fusta +STR_0097 :Muntanya russa a peu dret clàssica +STR_0607 :Una muntanya russa d’estil antic i d’acer molt intensa on els passatgers van com si estiguessin de peu. STR_0512 :Muntanya russa compacta amb una pujada en espiral i caigudes sinuoses suaus. STR_0513 :Muntanya russa amb inversions en la qual els passatgers es mantenen drets. STR_0514 :Els cotxes que pengen per sota dels rails es balancegen cap a fora en les corbes. @@ -2888,7 +2890,7 @@ STR_5755 :Versió de programari incorrecta (el servidor usa {STRING}). STR_5756 :Contrasenya no vàlida STR_5757 :Servidor ple STR_5758 :{OUTLINE}{GREEN}{STRING} s’ha unit a la partida. -STR_5759 :Es descarrega el mapa… ({INT32}/{INT32} KiB) +STR_5759 :Es descarrega el mapa… STR_5760 :Dòlars de Hong Kong(HK$) STR_5761 :Nou dòlar de Taiwan(NT$) STR_5762 :Iuan xinès (CN¥) @@ -3452,7 +3454,7 @@ STR_6374 :C STR_6375 :Atracció desconeguda STR_6376 :{WINDOW_COLOUR_2}Vehicle d’atracció:{NEWLINE}{BLACK}{STRINGID} per {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Tipus: {BLACK}{STRINGID} per {STRINGID} -STR_6378 :Es va rebent la llista d’objectes: {INT32} / {INT32} +STR_6378 :Es va rebent la llista d’objectes: STR_6379 :S’han rebut dades no vàlides. STR_6380 :Actualització disponible! STR_6381 :Uniu-vos al canal de l’OpenRCT2 de Discord! @@ -3691,6 +3693,34 @@ STR_6614 :El preu de l’entrada al parc no es pot canviar STR_6615 :La via d'aquesta casella necessita aigua STR_6616 :L’acció no és vàlida per a aquest tipus d’empleat STR_6617 :No es pot intercanviar l’element de la casella amb si mateix +STR_6618 :No es pot restringir ni traure la restricció de l’objecte… +STR_6619 :El tipus d’objecte no es pot restringir! +STR_6620 :L’objecte no s’ha trobat! +STR_6621 :Restringeix +STR_6622 :Restringeix l’objecte a l’editor d’escenaris i al mode lliure. +STR_6623 :Escriviu «help» per a obtenir una llista de les ordres disponibles. Escriviu «hide» per a amagar la consola. +STR_6624 :Inspecció de casella: Ordena els elements +STR_6625 :Color no vàlid +STR_6626 :L’animació va a l’inrevés +STR_6627 :Velocitat de via massa elevada! +STR_6628 :Només es pot posar a les vores dels camins! +STR_6629 :Centra els botons de la barra d’eines horitzontalment +STR_6630 :Aquesta opció alinea els botons de la barra d’eines horitzontalment i la posa al mig de la pantalla. La manera tradicional d’alinear-los és al cantó esquerre o dret. +STR_6631 :Es carrega… +STR_6632 :Es comproven els fitxers d’objectes… +STR_6633 :Es comproven els fitxers d’escenaris… +STR_6634 :Es comproven els fitxers de dissenys de vies… +STR_6635 :Es comproven els paquets de recursos… +STR_6636 :Es comproven les seqüències de títols… +STR_6637 :Es carrega la seqüència del títol… +STR_6638 :Interfície ampliada +STR_6639 :Modifica la interfície per tal que sigui més apropiada per a pantalles tàctils. +STR_6640 :Edita paquets de recursos… +STR_6641 :Finestra de càrrega/progrés +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Millores tàctils +STR_6645 :Fa que alguns elements de la interfície gràfica siguin més grans perquè sigui més fàcil interactuar-hi. ############# # Scenarios # @@ -4280,87 +4310,87 @@ STR_DTLS :Construïu les atraccions Six Flags que falten, o creeu els vostres ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Àfrica - Mines de diamants +STR_SCNR :Mines d’Àfrica STR_PARK :Mines d’Àfrica STR_DTLS :Heu heretat una mina de diamants que ja no s’explota, on hi heu trobat un diamant valuós. Voleu invertir els diners del diamant per tal de construir un parc temàtic conegut a tot el món. -STR_SCNR :Àfrica - Oasi +STR_SCNR :La follia dels miratges STR_PARK :La follia dels miratges STR_DTLS :S’ha descobert un oasi que seria una bona localització per a fer-hi un parc. El transport fins l’oasi ja està preparat. -STR_SCNR :Àfrica - Les cascades Victòria +STR_SCNR :A la vora STR_PARK :A la vora STR_DTLS :S’ha construït una presa que ofereix energia hidroelèctrica barata i abundant per a fer funcionar un parc. Haureu d’obtenir una valoració del parc prou alta per a poder retornar el préstec de la presa. -STR_SCNR :Antàrtida - Rescat ecològic +STR_SCNR :Aventures gèlides STR_PARK :Aventures gèlides STR_DTLS :L’agència mediambiental us ha delegat la tasca de transformar aquesta monstruositat ecològica en forma de refineria de petroli en una atracció turística capdavantera. El terreny és barat però el tipus d’interès del préstec és alt. Podeu vendre els vells edificis per a treure’n profit. -STR_SCNR :Àsia - Millores turístiques a la Gran Muralla +STR_SCNR :La Gran Muralla xinesa STR_PARK :La Gran Muralla xinesa STR_DTLS :Les autoritats han decidit millorar les instal·lacions turístiques al voltant de la Gran Muralla construint-hi un parc temàtic. I no us preocupeu pels diners! -STR_SCNR :Àsia - Recuperació de la costa japonesa +STR_SCNR :Costa d’Okinawa STR_PARK :Costa d’Okinawa STR_DTLS :Un parc s’ha quedat sense espai. L’única opció és construir mar endins, i per això heu demanat un préstec. Les restriccions d’alçada dels edificis es deuen al tipus de fonaments i el risc de terratrèmols. -STR_SCNR :Àsia - Palau del maharajà +STR_SCNR :Parc del maharajà STR_PARK :Parc del maharajà STR_DTLS :El maharajà us ha destinat aquí per tal que proporcioneu entreteniment a l’enorme població local. Construïu un parc inspirat pel palau del maharajà. -STR_SCNR :Austràlia - Uluru +STR_SCNR :L’aventura Uluru STR_PARK :L’aventura Uluru STR_DTLS :Esteu ajudant els aborígens a construir un parc dins del programa de conscienciació cultural. Necessiteu un gran nombre de visitants per a instruir-los en l’herència cultural única de la població indígena. -STR_SCNR :Austràlia - Diversió a la platja +STR_SCNR :L’explosió de la barbacoa de la platja STR_PARK :L’explosió de la barbacoa de la platja STR_DTLS :El parc marítim d’un emprenedor local ha fet fallida. Ja teniu un parc petit que funciona, però ara acabeu de comprar l’altre parc. Desenvolupeu un únic parc combinat. -STR_SCNR :Europa - Festival cultural europeu +STR_SCNR :Extravagància europea STR_PARK :Extravagància europea STR_DTLS :Us han dut per a dirigir una atracció cultural europea per als turistes i heu d’augmentar el nombre de visitants per tal de poder retornar la subvenció de la UE a finals de l’actual mandat del parlament europeu. -STR_SCNR :Europa - Renovació +STR_SCNR :Des de les cendres STR_PARK :Des de les cendres STR_DTLS :Aquest parc vell està en mal estat. Heu guanyat una subvenció per a retornar aquesta àrea desafavorida a la seva antiga glòria! Heu de renovar el parc i retornar la subvenció. -STR_SCNR :Nord-amèrica - Illa hawaiana llunyana +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :La gent de Hawaii s’avorreixen només fent surf i busquen alguna cosa més intensa. Heu de construir un parc amb això al cap per tal de mantenir un interès turístic a la zona prou elevat. -STR_SCNR :Nord-amèrica - El Gran Canyó +STR_SCNR :Calamitats del Canyó STR_PARK :Calamitats del Canyó STR_DTLS :Heu de construir un parc en el terreny limitat en les dues bandes d’aquest tresor natural. Teniu l’oportunitat de comprar terrenys adjacents dels nadius indis americans. Heu de completar l’objectiu per a alimentar els habitants de la població local. -STR_SCNR :Nord-amèrica - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :Sou un magnat de les finances competent en període sabàtic que desitja usar el seu temps en transformar el parc de la ciutat en el «Rollercoaster Heaven». I els diners no importen! -STR_SCNR :Sud-amèrica - La ciutat inca perduda +STR_SCNR :La fundació de la ciutat perduda STR_PARK :La fundació de la ciutat perduda STR_DTLS :Per a augmentar el turisme local heu de construir un parc que s’adigui amb els seus voltants. -STR_SCNR :Sud-amèrica - L’altiplà de la selva tropical +STR_SCNR :Diversió a la selva STR_PARK :Diversió a la selva STR_DTLS :En aquesta preciosa selva tropical, l’espai està limitat. Heu d’amuntegar tot el que pugueu en els llocs sense arbres, per tal de que la indústria local de la fusta continuï sent una alternativa viable al turisme. -STR_SCNR :Sud-amèrica - Carnaval de Rio +STR_SCNR :Costes del Pão de Açúcar STR_PARK :Costes del Pão de Açúcar STR_DTLS :Dirigiu un petit parc prop de Rio, però el banc demana que se li pagui el préstec. Necessiteu augmentar ràpidament la vostra capacitat recaptatòria per a retornar aquest deute inesperat. @@ -4368,72 +4398,72 @@ STR_DTLS :Dirigiu un petit parc prop de Rio, però el banc demana que se li p ## Time Twister Scenarios ############################################################################### -STR_SCNR :Medieval - Castell +STR_SCNR :Castell del penya-segat STR_PARK :Castell del penya-segat STR_DTLS :Els membres locals de la societat de representacions de batalles es prenen la seva afició seriosament. Us han confiat la tasca de construir un parc temàtic de l’edat mitjana on hi ha el castell de Cliffside. -STR_SCNR :Medieval - Robin Hood +STR_SCNR :El bosc de Sherwood STR_PARK :El bosc de Sherwood STR_DTLS :Amb la intenció de robar als rics i repartir el que aconseguiu entre els pobres, heu decidit que, amb l’ajuda dels vostres «homes feliços», construireu un parc temàtic al bosc de Sherwood. -STR_SCNR :Futurístic - Primers encontres +STR_SCNR :Extravagància Extraterrestre STR_PARK :Extravagància Extraterrestre STR_DTLS :S’ha descobert vida en un planeta llunyà. Construïu un parc de temàtica alienígena per a recaptar els diners d’aquesta onada d’interès sense precedent. -STR_SCNR :Futurístic - Món del futur +STR_SCNR :Ciutat Gèmini STR_PARK :Ciutat Gèmini STR_DTLS :Mostreu la vostra inventiva visió utòpica del futur. Aixequeu un parc amb dissenys futurístics que incorpori atraccions avantguardistes. -STR_SCNR :Mitològic - Plató d’animatrònics +STR_SCNR :Relíquies animatròniques STR_PARK :Relíquies animatròniques STR_DTLS :Us han encomanat la tasca de fer funcionar i millorar un parc temàtic ja existent que s’ha construït en un vell plató de cinema. Construïu un tribut als animadors pioners de l’stop-motion que van portar per primer cop criatures mítiques a la vida a la gran pantalla. -STR_SCNR :Mitològic - El bressol de la civilització +STR_SCNR :Bogeria mitològica STR_PARK :Bogeria mitològica STR_DTLS :Sou el propietari d’una illa amb un important valor arqueològic. Heu decidit finançar la seva preservació construint-hi un parc temàtic basat en la rica herència mitològica de l’àrea. -STR_SCNR :Prehistòric - Després de l’asteroide +STR_SCNR :La matança del cràter STR_PARK :La matança del cràter STR_DTLS :Sou el propietari d’un vell cràter polsegós causat per un meteorit. Amb el vertader esperit emprenedor, heu decidit construir un parc amb la temàtica de l’asteroide i convertir aquestes terres aparentment poc valuoses en una fortuna considerable. -STR_SCNR :Prehistòric - Safari juràssic +STR_SCNR :Atracciósaurus STR_PARK :Atracciósaurus STR_DTLS :Us han assignat la tasca de construir un parc de l’era juràssica. Per tal d’optimitzar l’accés dels visitants a les exhibicions de plantes i animals exòtics, haureu de construir atraccions per tota la vall. -STR_SCNR :Prehistòric - L’edat de pedra +STR_SCNR :Passeig rocós STR_PARK :Passeig rocós STR_DTLS :Per a frustrar els plans dels constructors d’una autopista i per a ajudar a preservar els misteriosos i antics cercles de pedra, haureu de construir un parc temàtic amb l’edat de pedra com a principal motiu i aconseguir treure’n beneficis. No obstant, atreure visitants pot suposar un repte, ja que el terreny és un poc inhòspit. -STR_SCNR :Roaring Twenties - L’illa presó +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :La infame Illa Presó, la població de la qual fa molt temps creixia gràcies a contrabandistes i estafadors, està en venda. Heu decidit convertir-la en una atracció turística de primer ordre, i no us preocupeu pels diners. -STR_SCNR :Els «Roaring Twenties» - La Copa Schneider +STR_SCNR :Costa Schneider STR_PARK :Costa Schneider STR_DTLS :El 25è aniversari de la victòria del vostre avi a la Copa Schneider serà d’aquí pocs anys. L’honorareu construint un parc on la temàtica serà la famosa cursa d’hidroavions. -STR_SCNR :Els «Roaring Twenties» - Gratacels +STR_SCNR :Metròpoli STR_PARK :Metròpoli STR_DTLS :Disposeu d’un solar buit prop de la zona pobra de la població. Per a treure profit d’aquests terrenys urbans, construïu un parc en forma de gratacels inspirat en el desorbitat art decó dels anys vint. -STR_SCNR :Rock ’n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Hi ha un gran festival anual de música als teus terrenys. Construïu-hi un parc temàtic a la moda per a mantenir els esperits lliures entretinguts. -STR_SCNR :Rock ’n’ Roll - Rock ’n’ Roll +STR_SCNR :Revival del Rock ’n’ Roll STR_PARK :Revival del Rock ’n’ Roll STR_DTLS :Aquest parc temàtic ha vist millors dies. Ajudeu al propietari a donar-li un toc rock ’n’ roll retro i convertiu el lloc en un lloc pròsper. diff --git a/data/language/cs-CZ.txt b/data/language/cs-CZ.txt index 73821bc5b1..8055c0b29d 100644 --- a/data/language/cs-CZ.txt +++ b/data/language/cs-CZ.txt @@ -2887,7 +2887,7 @@ STR_5755 :Nesprávná verze hry (Server používá {STRING}) STR_5756 :Špatné heslo STR_5757 :Server je plný STR_5758 :{OUTLINE}{GREEN}Hráč {STRING} se připojil do hry -STR_5759 :Stahování mapy … ({INT32} / {INT32}) KiB +STR_5759 :Stahování mapy … STR_5760 :Hongkongský dolar (HK$) STR_5761 :Tchajwanský dolar (NT$) STR_5762 :Čínský jüan (CN¥) @@ -3450,7 +3450,7 @@ STR_6374 :K STR_6375 :Neznámá atrakce STR_6376 :{WINDOW_COLOUR_2}Vozy atrakce:{NEWLINE}{BLACK}{STRINGID} pro {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Typ: {BLACK}{STRINGID} pro {STRINGID} -STR_6378 :Stahování seznamu objektů: {INT32} / {INT32} +STR_6378 :Stahování seznamu objektů: STR_6379 :Stažena neplatná data STR_6380 :Dostupná aktualizace! STR_6381 :Připojte se na OpenRCT2 Discord! @@ -3737,87 +3737,87 @@ STR_DTLS :Postavte chybějící Six Flags atrakce, nebo vytvořte své vlastn ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - African Diamond Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :Zdědili jste diamantový důl mimo provoz a nalezli hodnotný diamant. Rozhodli jste se tedy investovat peníze do stavby světoznámého zábavního parku. -STR_SCNR :Africa - Oasis +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :Byla objevena pouštní oáza, která nabízí nádherné místo pro zábavní park. Přeprava do oázy zajištěna. -STR_SCNR :Africa - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :Postavená přehrada zajišťuje velké množství levné hydroelektrické energie pro váš zábavní park. Dosáhněte vysokého hodnocení parku, abyste snáze splatili půjčku na přehradu. -STR_SCNR :Antarctic - Ecological Salvage +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :Obrátili se na vás ochranáři životního prostředí s prosbou, abyste přeměnili neekologickou rafinerii na vysoce navštěvovanou turistickou destinací. Pozemky jsou levné, ale úrok z půjčky vysoký. Zkuste prodat staré budovy. -STR_SCNR :Asia - Great Wall of China Tourism Enhancement +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :Místní správa se rozhodla podpořit cestovní ruch a vytvořit Velkou zeď stavbou přilehlého zábavního parku. Peníze nehrají roli. -STR_SCNR :Asia - Japanese Coastal Reclaim +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :Současnému zábavnímu parku došlo místo. Jedinou možností je začít stavět na moři, takže budete potřebovat velkou půjčku. V této oblasti jsou častá zemětřesení, proto nesmíte stavět vysoké budovy. -STR_SCNR :Asia - Maharaja Palace +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :Mahárádža vás vybral, abyste přinesli zábavu pro místní velkou populaci. Postavte zábavní park inspirovaný Mahárádžovým palácem -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :Pomáháte domorodcům postavit zábavní park pro upozornění na jejich kulturu. Musíte poučit co nejvíce lidí o unikátní kultuře domorodých obyvatel. -STR_SCNR :Australasia - Fun at the Beach +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :Místní mořský svět bankrotoval a vy jste ho odkoupili. Vám už ale jeden malý park patří - postavte tedy ze dvou malých parků jeden obrovský! -STR_SCNR :Europe - European Cultural Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :Byli jste přizváni, abyste převzali kontrolu nad Evropskou Kulturní Návštěvnickou Atrakcí a musíte zajistit nárůst návštěvnosti, jinak nebudete moci zaplatit za EU dotaci do konce vládního období. -STR_SCNR :Europe - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :Evropská Unie vám dala grant, abyste zajistil obnovu starého, neudržovaného zábavního parku a přinesl zpět jeho tehdejší slávu. Musíte celý park renovovat a splatit grant. -STR_SCNR :N. America - Extreme Hawaiian Island +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :Havajané jsou znudění ze surfování a chtějí zažít něco adrenalinovějšího. Postavte zábavní park a nezapomeňte na to - pomůže vám to s dosažením dobrého hodnocení parku. -STR_SCNR :North America - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :Omezený terén vás nutí vybudovat zábavní park po stranách národní památky. Můžete ale od Indiánů nakupovat pozemky. Abyste si udrželi hodnocení místní správy, splňte cíl! -STR_SCNR :North America - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :Jste úspěšný obchodní magnát, který si přeje přetvořit městský park v místo nebeských horských drah. Peníze nehrají žádnou roli! -STR_SCNR :South America - Inca Lost City +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :Abyste zvýšili počet místních turistů, musíte postavit zábavní park, který zapadá do okolí a nemá žádné výškové budovy. -STR_SCNR :South America - Rain Forest Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Prostor je limitovaný drahocenným deštným pralesem - musíte toho namáčknout co nejvíce do dosavadních pozemků, abyste mohli konkurovat místním dřevorubeckým společnostem. -STR_SCNR :South America - Rio Carnival +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :Provozujete malý zábavní park poblíž Ria, ale banka chce vrátit půjčku. Musíte rychle zvýšit vaše příjmy, abyste mohli dluh splatit. @@ -3825,72 +3825,72 @@ STR_DTLS :Provozujete malý zábavní park poblíž Ria, ale banka chce vrát ## Time Twister Scenarios ############################################################################### -STR_SCNR :Dark Age - Castle +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Členové místní skupiny pro rekonstrukci historických bitev berou své hobby trochu moc vážně. Svěřili vám stavbu starověkého zábavního parku na území Cliffside Castle. -STR_SCNR :Dark Age - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :Abyste mohli brát bohatým a dávat chudým, rozhodli jste se postavit zábavní park v Sherwood Forest. -STR_SCNR :Future - First Encounters +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Byl objeven život na vzdálené planetě. Postavte mimozemsky zaměřený zábavní park, abyste se svezli na vlně nového nepředvídaného zájmu. -STR_SCNR :Future - Future World +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Ukažte svou vynalézavou, utopickou vizi budoucnosti - přijďte s futuristickým zábavním parkem, který zahrnuje ty nejnovější atrakce. -STR_SCNR :Mythological - Animatronic Film Set +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :Byl vám zadán úkol správy a vylepšování stávajícího zábavního parku, který byl postaven na starém filmařském místě. Vybudujte odkaz průkopníkům-animátorům, kteří poprvé přinesli mýtické postavy k životu na stříbrném plátně. -STR_SCNR :Mythological - Cradle of Civilisation +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :Vlastníte ostrov velké archeologické hodnoty. Rozhodli jste se podpořit jeho zachování vybudováním zábavního parku založeném na mytologii tohoto místa. -STR_SCNR :Prehistoric - After the Asteroid +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :Vlastníte velký kráter a jakožto opravdový průkopník jste se rozhodl vybudovat zábavní park ve stylu asteroidů a přeměnit tuto zdánlivě bezcennou půdu v profitující a vyhledávanou oblast. -STR_SCNR :Prehistoric - Jurassic Safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :Byli jste zaúkolováni stavbou zábavního parku ve stylu období Jura. Pro zlepšení přístupu návštěvníků k exotickým rostlinám a zvířatům budete muset postavit mosty do a přes údolí. -STR_SCNR :Prehistoric - Stone Age +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :Abyste se vyhnuli stavbě dálnice a zachovali mysteriózní prehistorické kamenné kruhy, budete muset postavit zábavní park ve stylu doby kamenné a začít vydělávat. Nicméně přilákat návštěvníky bude těžké, protože terén je opravdu nehostinný. -STR_SCNR :Roaring Twenties - Prison Island +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :Nechvalně proslavená ostrovní věznice - jejíž populace jednou překypovala pašeráky a vyděrači - je nyní na prodej. Rozhodli jste se jí přetvořit na velkou turistickou atrakci - na peníze berte ohled! -STR_SCNR :Roaring Twenties - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :75. leté výročí výhry Schneider Cup vašeho dědečka se blíží a zbývá už jen pár let. Poctíte jeho úspěch stavbou zábavního parku založeném na proslulém závodu hydroplánů. -STR_SCNR :Roaring Twenties - Skyscrapers +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :Vlastníte volný pozemek v městské oblasti téměř bez růstu. Abyste vymačkali co nejvíce z vaší nemovitosti, postavíte mrakodrap-zábavní park inspirovaný architekturou dvacátých let. -STR_SCNR :Rock ’n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Obrovský každoroční hudební festival se bude konat na vašem pozemku. Postavte pořádný park, abyste zabavili návštěvníky. -STR_SCNR :Rock ’n’ Roll - Rock ’n’ Roll +STR_SCNR :Rock ’n’ Roll Revival STR_PARK :Rock ’n’ Roll Revival STR_DTLS :Tento stárnoucí zábavní park už viděl lepší dny. Pomozte majiteli dát parku retro rock ’n’ roll vzhled a udělat z něho vyhledávané místo. diff --git a/data/language/da-DK.txt b/data/language/da-DK.txt index d4bd7b6912..7335d7d16e 100644 --- a/data/language/da-DK.txt +++ b/data/language/da-DK.txt @@ -2883,7 +2883,7 @@ STR_5755 :Forkert spil version (Serveren kører med {STRING}) STR_5756 :Ugyldig kode STR_5757 :Serveren er fyldt STR_5758 :{OUTLINE}{GREEN}{STRING} har sluttet sig til spillet -STR_5759 :Henter kortet … ({INT32} / {INT32}) KB +STR_5759 :Henter kortet … STR_5760 :Hong Kong Dollars (HK$) STR_5761 :New Taiwan Dollar (NT$) STR_5762 :Chinese Yuan (CN¥) @@ -3447,7 +3447,7 @@ STR_6374 :R STR_6375 :Ukendt forlystelse STR_6376 :{WINDOW_COLOUR_2}Vogn:{NEWLINE}{BLACK}{STRINGID} til {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Type: {BLACK}{STRINGID} til {STRINGID} -STR_6378 :Henter objektliste: {INT32} / {INT32} +STR_6378 :Henter objektliste: STR_6379 :Modtog ugyldig data STR_6380 :Opdatering tilgængelig! STR_6381 :Deltag i OpenRCT2 Discord gruppe! @@ -3687,7 +3687,7 @@ STR_6614 :Kan ikke ændre parkens entré pris STR_6615 :Spor på dette felt kræver vand STR_6616 :Handlingen er ugyldig for denne medarbejdertype STR_6617 :Kan ikke bytte felt element med sig selv -STR_6618 :Objektet kan ikke begrænses eller afgrænses... +STR_6618 :Objektet kan ikke begrænses eller afgrænses… STR_6619 :Objekttype kan ikke begrænses! STR_6620 :Objektet blev ikke fundet! STR_6621 :Begræns @@ -4272,87 +4272,87 @@ STR_DTLS :Byg de manglende Six Flags forlystelser, eller opret dine egne desi ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Afrika - Afrikansk Diamant Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :Du arvede en nedlagt diamantmine og fandt en værdifuld diamant. Du beslutter dig for at investere de penge til at bygge en verdensberømt forlystelsespark. -STR_SCNR :Afrika - Oase +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :En ørken oase er blevet opdaget og ville være en smuk beliggenhed for en park. Der er sørget for transport til oasen. -STR_SCNR :Afrika - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :En dæmning er blevet bygget, som tilbyder rigelige, billige vandkraft til at drive en park. Du er nødt til at nå en høj park værdi for at hjælpe med tilbagebetalingen af lånet til dæmningen. -STR_SCNR :Antarktis - Økologisk Genanvendelse +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :Miljøagenturet har henvendt sig til dig for at omdanne et gammelt olieraffinaderi økologisk ‘øjebæ’ til en top turistattraktion. Jord er billigt, men lånerenterne er høje. Du kan sælge de gamle bygninger til genanvendelse. -STR_SCNR :Asien - Den Kinesiske Mur Turistforbedring +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :Myndighederne har besluttet at forbedre turismen omkring Den Kinesiske Mur ved at bygge en forlystelsespark på den tilstødende jord. Penge er ikke noget problem! -STR_SCNR :Asien - Japansk kystområde +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :En eksisterende park er løbet tør for plads. Din eneste mulighed er at bygge ud i havet, og så har du taget et lån. Højdebegrænsninger på din bygning håndhæves på grund af fundamenter og jordskælvsrisiko. -STR_SCNR :Asien - Maharaja Palads +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :Du er blevet bestilt af Maharajaen til at bringe underholdning til den store lokale befolkning. Byg en park inspireret af Maharajas palads. -STR_SCNR :Australasien - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :Du hjælper aboriginal folk, til at bygge en park, som en del af en kulturel bevidsthed program. Du skal få et stort antal gæster, til at uddanne dem i den unikke arv af det oprindelige folk. -STR_SCNR :Australasien - Sjov på Stranden +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :En lokal iværksætters havlivs park er gået fallit. Du driver allerede en lille park og køber den anden park fra byggefirmaet. Udvikl den til en stor kombineret park. -STR_SCNR :Europa - Europæisk kulturfestival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :De er blevet hentet ind for at overtage, en europæisk kulturel turistattraktion, og skal øge antallet af gæster, for at kunne betale EU-tilskuddet tilbage, inden udgangen af den nuværende valgperiode i Europa-Parlamentet. -STR_SCNR :Europa - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :En gammel park er gået i forfald. De får et EU-tilskud til at bringe dette ugunstigt stillede område, tilbage til sin tidligere herlighed! Du er nødt til at renovere parken, og tilbagebetale tilskuddet. -STR_SCNR :Nordamerika - Ekstrem Hawaii-ø +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :Befolkningen i Hawaii er træt af surfing, og er på udkig efter noget mere intenst. Du skal bygge en park, med dette i tankerne for at holde områdets turistattraktion rating i top. -STR_SCNR :Nordamerika - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :Du er nødt til at bygge en park på begrænset jord, på hver side af denne naturlige skat - du har mulighed for at købe nabojord fra indianerne. Du er nødt til at fuldføre målet om at opretholde den lokale bys befolkning. -STR_SCNR :Nordamerika - Rutshebane Himmel +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :Du er en succesfuld forretningsmagnat igang med flere sabbatår, der ønsker at bruge denne tid på at omdanne byparken til Rollercoaster Heaven. Penge er ikke noget problem! -STR_SCNR :Sydamerika - Inka-rigets fortabte by +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :For yderligere at øge den lokale turisme skal du konstruere en park, der er i harmoni med sine omgivelser. -STR_SCNR :Sydamerica - Regnskovs Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Pladsen er begrænset i den dyrebare regnskov - du skal proppe så meget som muligt ind i den eksisterende rydning for at give et levedygtigt alternativ til den lokale træindustri. -STR_SCNR :Sydamerica - Karneval i Rio +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :Du driver en lille park nær Rio, men banken har indkaldt dit lån. Du er nødt til hurtigt at øge din indtjeningsevne, til at tilbagebetale denne uventede gæld. @@ -4360,72 +4360,72 @@ STR_DTLS :Du driver en lille park nær Rio, men banken har indkaldt dit lån. ## Time Twister Scenarios ############################################################################### -STR_SCNR :Middelalder - Borgen +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Lokale medlemmer af kamp re-enactment samfundet er temmelig alvorligt om deres hobby. De har betroet dig opgaven med at bygge en mørk tidsalder forlystelsespark på grunden ved Cliffside Castle. -STR_SCNR :Middelalder - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :For at befri rigdom fra de rige og distribuere den til de trængende, har du og dine lystige svende besluttet at bygge en forlystelsespark i Sherwood Skoven. -STR_SCNR :Fremtiden - Første Kontakt +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Der er fundet liv på en fjern planet. Byg en Rumalien forlystelsespark til at lave penge på den hidtil usete bølge af interesse. -STR_SCNR :Fremtiden - Fremtidsverden +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Vis din opfindsomme, utopiske vision om fremtiden - kom op med et futuristisk parkdesign, der inkorporerer state-of-the-art attraktioner. -STR_SCNR :Mytologisk - Animatronic Film Sæt +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :Du har fået til opgave at drive og forbedre en eksisterende forlystelsespark, som er bygget på et gammelt filmsæt. Byg en hyldest til de banebrydende stop-motion animatorer, der først bragte mytiske væsner til live på biograflærredet. -STR_SCNR :Mytologisk - Civilisationens vugge +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :Du ejer en ø af særlig arkæologisk værdi. Du har besluttet at finansiere dens bevarelse, ved at bygge en forlystelsespark baseret på områdets rige mytologiske arv. -STR_SCNR :Forhistorisk - Efter Asteroiden +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :Du ejer et støvet gammelt meteorkrater. I den sande iværksætterånd har du besluttet at konstruere en asteroide forlystelsespark og konvertere dit tilsyneladende værdiløse land til en betydelig formue. -STR_SCNR :Præhistorisk - Jurassic Safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :Du har fået til opgave at bygge en Jurassic æra forlystelsespark. For at optimere dine besøgendes adgang til de eksotiske plante- og dyreudstillinger skal du bygge en bygning, der går over og ind i dalen. -STR_SCNR :Præhistorisk - Stenalderen +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :For at forpurre motorvejsudviklerne og bevare de mystiske gamle stencirkler skal du konstruere en stenalder forlystelsespark og lave en fortjeneste. Det kan dog være en udfordring at tiltrække besøgende, da terrænet er en smule ugæstfrit. -STR_SCNR :Brølende Tyvere - Fængselsøen +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :Den berygtede Prison Island - hvis befolkning engang husede organiseret kriminalitet og hjemmebrændere - er nu til salg. Du har besluttet at konvertere det til en top turistattraktion, og penge er ikke noget problem. -STR_SCNR :Brølende Tyvere - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :T75-årsdagen for din bedstefars Schneider Cup-sejr kommer op om et par år. Du vil ære hans præstation ved at bygge en forlystelsespark baseret på den berømte vandflyver racer. -STR_SCNR :Brølende Tyvere - Skyskrabere +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :Du ejer en tom grund i nærheden af den lave del af byen. For at presse mest muligt ud af din byejendom skal du bygge en skyskraber forlystelsespark inspireret af den skyhøje art deco arkitektur i tyverne. -STR_SCNR :Rock ’n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :En stor årlig musikfestival finder sted på dit land. Byg en hip forlystelsespark for at holde det frisindede publikum underholdt. -STR_SCNR :Rock ’n’ Roll - Rock og Rul +STR_SCNR :Rock ’n’ Roll Revival STR_PARK :Rock ’n’ Roll Revival STR_DTLS :Denne aldrende forlystelsespark har set bedre dage. Hjælp ejeren med at give det en retro rock ’n’ roll makeover og gøre stedet til et vellykket sted. diff --git a/data/language/de-DE.txt b/data/language/de-DE.txt index 2286816138..9bb4883bd9 100644 --- a/data/language/de-DE.txt +++ b/data/language/de-DE.txt @@ -98,6 +98,7 @@ STR_0093 :Hybridachterbahn STR_0094 :Einschienenachterbahn STR_0095 :Alpenachterbahn STR_0096 :Klassische Holzachterbahn +STR_0097 :Klassische Stehachterbahn 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. @@ -181,6 +182,7 @@ STR_0603 :Eine Achterbahn im Holzstil mit einer Stahlschiene, die steile Abfa STR_0604 :Die Fahrgäste fahren in einer Einzelreihe auf einer engen Einschienenstrecke, wobei sie durch enge Inversionen und Richtungswechsel rasen 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_0767 :Besucher {INT32} STR_0768 :Parkpfleger {INT32} STR_0769 :Mechaniker {INT32} @@ -2882,7 +2884,7 @@ STR_5755 :Inkompatible Softwareversion (Server benutzt {STRING}) STR_5756 :Falsches Passwort STR_5757 :Server voll STR_5758 :{OUTLINE}{GREEN}{STRING} hat das Spiel betreten -STR_5759 :Karte herunterladen … ({INT32} / {INT32}) KiB +STR_5759 :Karte herunterladen … STR_5760 :Hongkong-Dollar (HK$) STR_5761 :Taiwan-Dollar (NT$) STR_5762 :Chines. Yuan (CN¥) @@ -3444,7 +3446,7 @@ STR_6374 :A STR_6375 :Unbekannte Attraktion STR_6376 :{WINDOW_COLOUR_2}Fahrzeug:{NEWLINE}{BLACK}{STRINGID} für {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Typ: {BLACK}{STRINGID} für {STRINGID} -STR_6378 :Objektliste empfangen: {INT32}/{INT32} +STR_6378 :Objektliste empfangen: STR_6379 :Ungültige Daten empfangen STR_6380 :Update verfügbar! STR_6381 :OpenRCT2-Discord beitreten! @@ -3688,6 +3690,29 @@ STR_6619 :Objekttyp kann nicht eingeschränkt werden! STR_6620 :Objekt nicht gefunden! STR_6621 :Einschränken STR_6622 :Objekt auf den Szenario-Editor und dem Sandkastenmodus einschränken +STR_6623 :Geben Sie „help“ ein, um eine Liste der verfügbaren Befehle zu erhalten. Geben Sie „hide“ ein, um die Konsole auszublenden. +STR_6624 :Kachelinspektor: Elemente sortieren +STR_6625 :Ungültige Farbe +STR_6626 :Animation ist gespiegelt +STR_6627 :Streckengeschwindigkeit zu hoch! +STR_6628 :Kann nur auf der Kante von Fußwegen platziert werden! +STR_6629 :Symbolleisten-Schaltflächen horizontal zentriert ausrichten +STR_6630 :Mit dieser Einstellung werden die Schaltflächen der Symbolleiste horizontal in der Mitte des Bildschirms ausgerichtet. Normalerweise sind sie in den Ecken angeordnet. +STR_6631 :Laden … +STR_6632 :Überprüfen von Objektdateien … +STR_6633 :Überprüfen von Szenario-Dateien … +STR_6634 :Überprüfen von Streckenentwurfsdateien … +STR_6635 :Überprüfen von Medienpaketen … +STR_6636 :Überprüfen der Titelsequenzen … +STR_6637 :Laden der Titelsequenzen … +STR_6638 :Vergrößerte Benutzeroberfläche +STR_6639 :Verändert die Benutzeroberfläche so, dass sie besser für die Touch-Bedienung geeignet ist +STR_6640 :Medienpakete bearbeiten … +STR_6641 :Lade-/Fortschrittsfenster +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Verbesserungen für die Touch-Bedienung +STR_6645 :Vergrößert einige Bedienelemente, damit sie leichter angeklickt oder angetippt werden können. ############# # Scenarios # @@ -4278,87 +4303,87 @@ STR_DTLS :Bauen Sie die fehlenden Six-Flags-Bahnen, oder erstellen Sie Ihre e ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Afrika - Diamantenmine +STR_SCNR :Die Minen Afrikas STR_PARK :Die Minen Afrikas STR_DTLS :Sie haben eine aufgegebene Diamantenmine geerbt und finden einen wertvollen Diamanten. Sie beschließen, das Geld in einen weltberühmten Themenpark zu investieren. -STR_SCNR :Afrika - Oase +STR_SCNR :Fata Morgana STR_PARK :Fata Morgana STR_DTLS :In der Wüste wurde eine Oase entdeckt, die der ideale Standort für einen Vergnügungspark wäre. Transportmittel zur Oase wurden zur Verfügung gestellt. -STR_SCNR :Afrika - Victoria-Wasserfälle +STR_SCNR :Über die Kante STR_PARK :Über die Kante STR_DTLS :Ein Damm wurde gebaut und erzeugt große Mengen an billigem Strom, mit dem Sie einen Park betreiben können. Sie müssen allerdings einen hohen Park-Verkehrswert erreichen, um das Darlehen für den Damm zurückzahlen zu können. -STR_SCNR :Antarktis - Umweltschutzmaßnahmen +STR_SCNR :Abenteuer im Eis STR_PARK :Abenteuer im Eis STR_DTLS :Sie sollen eine alte Ölraffinerie, die den Umweltschützern ein Dorn im Auge ist, in eine erstklassige Touristenattraktion verwandeln. Das Land ist günstig, doch die Darlehenszinsen sind hoch. Sie können aber die alten Gebäude verkaufen. -STR_SCNR :Asien - Große Mauer - Tourismusprojekt +STR_SCNR :Große Mauer von China STR_PARK :Große Mauer von China STR_DTLS :Die Behörden haben entschieden, noch mehr Touristen zur Großen Mauer zu locken, und wollen auf einem angrenzenden Gebiet einen Themenpark errichten. Geld spielt keine Rolle -STR_SCNR :Asien - Japanische Landgewinnung +STR_SCNR :Okinawa-Küste STR_PARK :Okinawa-Küste STR_DTLS :In einem vorhandenen Park herrscht Platzmangel, Sie müssen also dem Meer neues Land abringen. Dafür haben Sie ein Darlehen aufgenommen. Die maximale Bauhöhe ist aufgrund des instabilen Untergrunds und der Erdbeben beschränkt. -STR_SCNR :Asien - Maharadschas Palast +STR_SCNR :Maharadscha-Park STR_PARK :Maharadscha-Park STR_DTLS :Der Maharadscha hat Sie damit beauftragt, die örtlichen Massen zu unterhalten. Errichten Sie einen Park, der seine Inspiration aus dem Palast des Maharadschas bezieht. -STR_SCNR :Australasien - Ayers Rock +STR_SCNR :Ayers-Abenteuer STR_PARK :Ayers-Abenteuer STR_DTLS :Sie helfen den Aborigines, im Rahmen eines Programms zur Kulturförderung einen Vergnügungspark zu bauen. Sie müssen eine große Besucherzahl erreichen, um den Leuten das einzigartige kulturelle Erbe der Aborigines nahe zu bringen. -STR_SCNR :Australasien - Spaß am Strand +STR_SCNR :Strand-Party STR_PARK :Strand-Party STR_DTLS :Der Meerespark eines örtlichen Unternehmers hat Bankrott gemacht. Sie besitzen bereits einen kleinen Park und möchten den anderen dazukaufen. Um die benötigten Gelder aufzutreiben, müssen Sie zunächst Ihren kleinen Park ausbauen. -STR_SCNR :Europa - Europäisches Kulturfestival +STR_SCNR :Europäisches Happening STR_PARK :Europäisches Happening STR_DTLS :Sie wurden engagiert, um eine kulturelle Besucherattraktion in Europa zu leiten, und müssen die Anzahl der Gäste steigern, um die EU-Subventionen bis zum Ende der Amtsperiode des aktuellen Europäischen Parlaments zurückzahlen zu können. -STR_SCNR :Europa - Renovierung +STR_SCNR :Wie Phönix aus der Asche STR_PARK :Wie Phönix aus der Asche STR_DTLS :Ein alter Vergnügungspark befindet sich in desolatem Zustand. Sie erhalten EU-Fördermittel, um dem verwahrlosten Gebiet wieder zu seinem früheren Glanz zu verhelfen. Sie müssen den Park renovieren und die Fördermittel zurückzahlen. -STR_SCNR :Nordamerika - Hawaii Extrem +STR_SCNR :Verrücktes Waikiki STR_PARK :Verrücktes Waikiki STR_DTLS :Die Bevölkerung von Hawaii hat das Surfen satt und sehnt sich nach etwas Abwechslung. Sie müssen einen Park bauen, um sie bei Laune zu halten und gleichzeitig dafür sorgen, dass die Insel für Touristen attraktiv bleibt. -STR_SCNR :Nordamerika - Grand Canyon +STR_SCNR :Canyon-Katastrophen STR_PARK :Canyon-Katastrophen STR_DTLS :Sie müssen neben diesem Naturwunder einen Vergnügungspark errichten. Es herrscht Platzmangel, Sie können aber Land von den Indianern kaufen. Haben Sie Erfolg, sichern Sie damit der örtlichen Bevölkerung den Lebensunterhalt. -STR_SCNR :Nordamerika - Achterbahnhimmel +STR_SCNR :Achterbahnhimmel STR_PARK :Achterbahnhimmel STR_DTLS :Sie sind ein erfolgreicher Geschäftsmann, der sich eine vierjährige Auszeit genommen hat und nun einen Vergnügungspark errichten möchte, bei dem Geld keine Rolle spielt. -STR_SCNR :Südamerika - Verlorene Stadt der Inka +STR_SCNR :Gründer der Verlorenen Stadt STR_PARK :Gründer der Verlorenen Stadt STR_DTLS :Um der örtlichen Tourismusindustrie den Rücken zu stärken, müssen Sie einen Vergnügungspark konstruieren, der sich harmonisch in die Umgebung einfügt. -STR_SCNR :Südamerika - Regenwaldplateau +STR_SCNR :Rummel im Regenwald STR_PARK :Rummel im Regenwald STR_DTLS :Platz ist Mangelware im kostbaren Regenwald - Sie müssen so viele Attraktionen wie möglich auf der existierenden Lichtung unterbringen, um eine rentable Alternative zur örtlichen Holzindustrie zu schaffen. -STR_SCNR :Südamerika - Karneval in Rio +STR_SCNR :Zauberei am Zuckerhut STR_PARK :Zauberei am Zuckerhut STR_DTLS :Sie leiten einen kleinen Vergnügungspark in der Nähe von Rio. Als die Bank plötzlich das Ihnen gewährte Darlehen zurückfordert, müssen Sie einen Weg finden, Ihre Einnahmen rasch zu steigern, um diese unerwarteten Schulden zurückzuzahlen. @@ -4366,72 +4391,72 @@ STR_DTLS :Sie leiten einen kleinen Vergnügungspark in der Nähe von Rio. Als ## Time Twister Scenarios ############################################################################### -STR_SCNR :Finsteres Mittelalter - Schloss +STR_SCNR :Felsenschloss STR_PARK :Felsenschloss STR_DTLS :Einige Mitglieder der Gesellschaft zur Nachstellung von Schlachten nehmen ihr Hobby ziemlich ernst. Sie haben Sie damit beauftragt, einen Freizeitpark Finsteres Mittelalter auf den Gründen des Felsenschlosses zu bauen. -STR_SCNR :Finsteres Mittelalter - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :Um die Reichen finanziell zu erleichtern und das Geld den Bedürftigen zukommen zu lassen, haben Sie und Ihre Gespielen beschlossen, im Sherwood Forest einen Freizeitpark zu bauen. -STR_SCNR :Zukunft - Neulinge +STR_SCNR :Außerirdische Extravaganz STR_PARK :Außerirdische Extravaganz STR_DTLS :Auf einem fernen Planeten ist Leben entdeckt worden. Bauen Sie einen außerirdischen Freizeitpark, um die unerwartet heftige Hysterie in bare Münze umzuwandeln. -STR_SCNR :Zukunft - Welt der Zukunft +STR_SCNR :Zwillingsstadt STR_PARK :Zwillingsstadt STR_DTLS :Beweisen Sie Ihre innovative, utopische Vision der Zukunft - errichten Sie einen futuristischen Freizeitpark mit topmodernen Attraktionen. -STR_SCNR :Mythologie - Animatronic-Filmgelände +STR_SCNR :Animatronic-Possen STR_PARK :Animatronic-Possen STR_DTLS :Ihre Aufgabe ist, einen bestehenden Freizeitpark zu verbessern, der auf einem alten Filmgelände gebaut wurde. Bauen Sie eine Gedenkstätte für die Pioniere der Stop-Motion, die die Mystikwesen als Erste ins Kino brachten. -STR_SCNR :Mythologie - Wiege der Zivilisation +STR_SCNR :Mythologischer Wahnsinn STR_PARK :Mythologischer Wahnsinn STR_DTLS :Sie besitzen eine Insel von besonderem architektonischen Wert. Sie haben beschlossen, ihre Erhaltung durch einen Freizeitpark zu finanzieren, der sich mit dem reichen mythologischen Erbe der Gegend befasst. -STR_SCNR :Vorgeschichte - Nach dem Asteroiden +STR_SCNR :Kratergemetzel STR_PARK :Kratergemetzel STR_DTLS :Sie besitzen einen alten, verstaubten Meteoritenkrater. In Ihrem unternehmerischen Geist haben Sie beschlossen, einen Asteroiden-Freizeitpark zu bauen und Ihr scheinbar wertloses Land in eine Geldanlage umzuwandeln. -STR_SCNR :Vorgeschichte - Jurassic-Safari +STR_SCNR :Achtersaurus STR_PARK :Achtersaurus STR_DTLS :Sie haben die Aufgabe, einen Jurassic-Freizeitpark zu bauen. Damit Ihre Besucher optimalen Zugang zu den exotischen Pflanzen und Tieren haben, müssen Sie Attraktionen errichten, die über und in die Täler führen. -STR_SCNR :Vorgeschichte - Steinzeit +STR_SCNR :Felswanderungen STR_PARK :Felswanderungen STR_DTLS :Um den Autobahnbauern ein Schnippchen zu schlagen und die alten Steinkreise zu erhalten, müssen Sie einen Steinzeitpark bauen und ihn profitabel machen. Besucher anzulocken wird schwer, weil das Gelände unwirtlich ist. -STR_SCNR :Die Wilden Zwanziger - Gefängnisinsel +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :Die berüchtigte Gefängnisinsel - die einst überquoll vor Schwarzhändlern und Gaunern - steht jetzt zum Verkauf. Sie haben beschlossen, sie in eine 1A-Touristenattraktion zu verwandeln. Geld spielt keine Rolle -STR_SCNR :Die Wilden Zwanziger - Schneider-Cup +STR_SCNR :Schneider-Ufer STR_PARK :Schneider-Ufer STR_DTLS :In ein paar Jahren ist das 75. Jubiläum des Sieges Ihres Großvaters im Schneider-Cup. Ihm zu Ehren bauen Sie einen Freizeitpark auf der berühmten Wasserflugzeug-Rennstrecke. -STR_SCNR :Die Wilden Zwanziger - Wolkenkratzer +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :Sie besitzen ein Gelände in der Nähe des flach gebauten Teils der Stadt. Um aus Ihrem Besitz das Beste zu machen, bauen Sie einen Wolkenkratzer-Freizeitpark im hochragenden Stil der Art Déco-Architektur der Zwanziger Jahre. -STR_SCNR :Rock ’n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Auf Ihrem Land findet jährlich ein großes Musikfestival statt. Bauen Sie einen hippen Freizeitpark, um das freidenkende Publikum bei Laune zu halten. -STR_SCNR :Rock ’n’ Roll - Rock ’n’ Roll +STR_SCNR :Rock-’n’-Roll-Revival STR_PARK :Rock-’n’-Roll-Revival STR_DTLS :Dieser Freizeitpark ist ein wenig in die Jahre gekommen. Helfen Sie dem Besitzer, ihm einen Rock-’n’-Roll-Anstrich zu geben und ihn zu einem beliebten Ausflugsziel zu machen. diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 5efb4deb23..cd8918f90a 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -2885,7 +2885,7 @@ STR_5755 :Incorrect Software Version (Server is using {STRING}) STR_5756 :Bad Password STR_5757 :Server Full STR_5758 :{OUTLINE}{GREEN}{STRING} has joined the game -STR_5759 :Downloading map … ({INT32} / {INT32}) KiB +STR_5759 :Downloading map … STR_5760 :Hong Kong Dollars (HK$) STR_5761 :New Taiwan Dollar (NT$) STR_5762 :Chinese Yuan (CN¥) @@ -3449,7 +3449,7 @@ STR_6374 :C STR_6375 :Unknown Ride STR_6376 :{WINDOW_COLOUR_2}Ride vehicle:{NEWLINE}{BLACK}{STRINGID} for {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Type: {BLACK}{STRINGID} for {STRINGID} -STR_6378 :Receiving objects list: {INT32} / {INT32} +STR_6378 :Receiving objects list… STR_6379 :Received invalid data STR_6380 :Update available! STR_6381 :Join OpenRCT2 Discord! @@ -3699,6 +3699,24 @@ STR_6624 :Tile Inspector: Sort elements STR_6625 :Invalid colour STR_6626 :Animation is backwards STR_6627 :Track speed too high! +STR_6628 :Can only be placed on path edges! +STR_6629 :Align toolbar buttons horizontally centred +STR_6630 :This setting will align the toolbar buttons horizontally in the centre of the screen. The traditional way of aligning them is in the left and right corner. +STR_6631 :Loading… +STR_6632 :Checking object files… +STR_6633 :Checking scenario files… +STR_6634 :Checking track design files… +STR_6635 :Checking asset packs… +STR_6636 :Checking title sequences… +STR_6637 :Loading title sequence… +STR_6638 :Enlarged UI +STR_6639 :Modifies the interface to be more suitable for touch usage +STR_6640 :Edit asset packs… +STR_6641 :Loading/progress window +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Touch enhancements +STR_6645 :Makes some UI elements bigger so they are easier to click or tap. ############# # Scenarios # @@ -4279,87 +4297,87 @@ STR_DTLS :Build the missing Six Flags rides, or create your own designs to im ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - African Diamond Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :You inherited a disused diamond mine, and find a valuable diamond. You decide to invest that money to build a world-famous theme park. -STR_SCNR :Africa - Oasis +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :A desert Oasis has been discovered and would provide a beautiful location for a park. Transport to the oasis has been provided. -STR_SCNR :Africa - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :A dam has been built offering abundant, cheap hydroelectric power with which to run a park. You need to reach a high park value to help repay the loan for the dam. -STR_SCNR :Antarctic - Ecological Salvage +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :The environment agency has turned to you to transform an old oil refinery ecological eyesore into a top tourist attraction. Land is cheap but loan interest is high. You can sell the old buildings for salvage. -STR_SCNR :Asia - Great Wall of China Tourism Enhancement +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :The authorities have decided to enhance tourism around the Great Wall by building a theme park on the adjacent land. Money is no object! -STR_SCNR :Asia - Japanese Coastal Reclaim +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :An existing park has run out of space. Your only option is to build out into the sea, and so you have taken out a loan. Height restrictions on your building are enforced due to foundations and earthquake risk. -STR_SCNR :Asia - Maharaja Palace +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :You have been commissioned by the Maharaja to bring entertainment to the large local population. Build a park inspired by the Maharaja’s palace. -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :You are helping Aboriginal people to build a park as part of a cultural awareness program. You need to get a large number of guests to educate them in the unique heritage of the Aboriginal people. -STR_SCNR :Australasia - Fun at the Beach +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :A local entrepreneur’s sealife park has gone bust. You already operate a small park and buy the other park from the construction company. Develop a big combined park. -STR_SCNR :Europe - European Cultural Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :You have been brought in to take over a European Cultural Visitor Attraction and must increase the number of guests in order to pay back the EU subsidy by the end of the current European parliament term. -STR_SCNR :Europe - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :An old park has fallen into disrepair. You gain a European Union grant to return this deprived area to its former glory! You need to renovate the park and repay the grant. -STR_SCNR :North America - Extreme Hawaiian Island +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :The people of Hawaii are bored of surfing and are looking for something more intense. You need to build a park with this in mind to keep the area’s tourist attraction rating high. -STR_SCNR :North America - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :You have to build a park on limited land either side of this natural treasure - you do have the opportunity to buy neighbouring land from the Native American Indians. You need to complete the objective to sustain the local town’s population. -STR_SCNR :North America - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :You are a successful business tycoon on long sabbatical who desires to use this time transforming the city park into Rollercoaster Heaven. Money is no object! -STR_SCNR :South America - Inca Lost City +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :To further boost local tourism you must construct a park that is in tune with its surroundings. -STR_SCNR :South America - Rain Forest Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Space is limited in the precious rainforest - you must cram as much as possible into the existing clearing, in order to provide a viable alternative to the local timber industry. -STR_SCNR :South America - Rio Carnival +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :You run a small park near Rio but the bank has called in your loan. You need to quickly increase your earning capacity to repay this unexpected debt. @@ -4367,72 +4385,72 @@ STR_DTLS :You run a small park near Rio but the bank has called in your loan. ## Time Twister Scenarios ############################################################################### -STR_SCNR :Dark Age - Castle +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Local members of the battle re-enactment society are rather serious about their hobby. They’ve entrusted you with the job of constructing a Dark Age theme park on the grounds of Cliffside Castle. -STR_SCNR :Dark Age - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :To liberate wealth from the rich and distribute it to the needy, you and your Merry Men have decided to build a theme park in Sherwood Forest. -STR_SCNR :Future - First Encounters +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Life has been discovered on a distant planet Build an alien theme park to cash in on the unprecedented wave of interest. -STR_SCNR :Future - Future World +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Show off your inventive, utopian vision of the future - come up with a futuristic park design that incorporates state-of-the-art attractions. -STR_SCNR :Mythological - Animatronic Film Set +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :You have been given the task of running and improving an existing theme park, which has been built on an old film set. Build a tribute to the pioneering stop-motion animators who first brought mythical creatures to life on the silver screen. -STR_SCNR :Mythological - Cradle of Civilisation +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :You own an island of particular archaeological value. You’ve decided to fund its preservation by constructing a theme park based on the area’s rich Mythological heritage. -STR_SCNR :Prehistoric - After the Asteroid +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :You own a dusty old meteor crater. In the true entrepreneurial spirit, you’ve decided to construct an asteroid theme park and convert your seemingly worthless land into a sizeable fortune. -STR_SCNR :Prehistoric - Jurassic Safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :You’ve been given the task of constructing a Jurassic era theme park. To optimize your visitors’ access to the exotic plant and animal exhibits, you will need to build rides going over and into the valley. -STR_SCNR :Prehistoric - Stone Age +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :To thwart the highway developers and preserve the mysterious ancient stone circles, you will need to construct a Stone Age theme park and turn a profit. However, attracting visitors may pose a challenge, as the terrain is a tad inhospitable. -STR_SCNR :Roaring Twenties - Prison Island +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :The infamous Prison Island - whose population once swelled with bootleggers and racketeers - is now up for sale. You’ve decided to convert it into a top tourist attraction, and money is no object -STR_SCNR :Roaring Twenties - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :The 75th anniversary of your grandfather’s Schneider Cup victory is coming up in a few years. You’re going to honour his achievement by building a theme park based on the famous seaplane race. -STR_SCNR :Roaring Twenties - Skyscrapers +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :You own an empty lot near the low-rise part of town. To squeeze the most out of your urban property, build a skyscraper theme park inspired by the soaring art deco architecture of the twenties. -STR_SCNR :Rock ‘n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :A large annual music festival takes place on your land. Build a hip theme park to keep the free-spirited audience entertained. -STR_SCNR :Rock ‘n’ Roll - Rock ‘n’ Roll +STR_SCNR :Rock ‘n’ Roll Revival STR_PARK :Rock ‘n’ Roll Revival STR_DTLS :This aging theme park has seen better days. Help the owner give it a retro rock ‘n’ roll makeover and turn the place into a successful venue. diff --git a/data/language/en-US.txt b/data/language/en-US.txt index afab37b0f8..3311077f75 100644 --- a/data/language/en-US.txt +++ b/data/language/en-US.txt @@ -233,6 +233,9 @@ STR_6328 :With this option enabled, giant screenshots will have a transparent STR_6501 :Random color 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. + ############# # Scenarios # ############# @@ -811,87 +814,87 @@ STR_DTLS :Build the missing Six Flags rides, or create your own designs to im ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - African Diamond Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :You inherited a disused diamond mine, and find a valuable diamond. You decide to invest that money to build a world-famous theme park. -STR_SCNR :Africa - Oasis +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :A desert Oasis has been discovered and would provide a beautiful location for a park. Transport to the oasis has been provided. -STR_SCNR :Africa - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :A dam has been built offering abundant, cheap hydroelectric power with which to run a park. You need to reach a high park value to help repay the loan for the dam. -STR_SCNR :Antarctic - Ecological Salvage +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :The environment agency has turned to you to transform an old oil refinery ecological eyesore into a top tourist attraction. Land is cheap but loan interest is high. You can sell the old buildings for salvage. -STR_SCNR :Asia - Great Wall of China Tourism Enhancement +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :The authorities have decided to enhance tourism around the Great Wall by building a theme park on the adjacent land. Money is no object! -STR_SCNR :Asia - Japanese Coastal Reclaim +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :An existing park has run out of space. Your only option is to build out into the sea, and so you have taken out a loan. Height restrictions on your building are enforced due to foundations and earthquake risk. -STR_SCNR :Asia - Maharaja Palace +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :You have been commissioned by the Maharaja to bring entertainment to the large local population. Build a park inspired by the Maharaja’s palace. -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :You are helping Aboriginal people to build a park as part of a cultural awareness program. You need to get a large number of guests to educate them in the unique heritage of the Aboriginal people. -STR_SCNR :Australasia - Fun at the Beach +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :A local entrepreneur’s sealife park has gone bust. You already operate a small park and buy the other park from the construction company. Develop a big combined park. -STR_SCNR :Europe - European Cultural Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :You have been brought in to take over a European Cultural Visitor Attraction and must increase the number of guests in order to pay back the EU subsidy by the end of the current European parliament term. -STR_SCNR :Europe - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :An old park has fallen into disrepair. You gain a European Union grant to return this deprived area to its former glory! You need to renovate the park and repay the grant. -STR_SCNR :N. America - Extreme Hawaiian Island +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :The people of Hawaii are bored of surfing and are looking for something more intense. You need to build a park with this in mind to keep the area’s tourist attraction rating high. -STR_SCNR :North America - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :You have to build a park on limited land either side of this natural treasure - you do have the opportunity to buy neighboring land from the Native American Indians. You need to complete the objective to sustain the local town’s population. -STR_SCNR :North America - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :You are a successful business tycoon on long sabbatical who desires to use this time transforming the city park into Rollercoaster Heaven. Money is no object! -STR_SCNR :South America - Inca Lost City +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :To further boost local tourism you must construct a park that is in tune with its surroundings. -STR_SCNR :South America - Rain Forest Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Space is limited in the precious rainforest - you must cram as much as possible into the existing clearing, in order to provide a viable alternative to the local timber industry. -STR_SCNR :South America - Rio Carnival +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :You run a small park near Rio but the bank has called in your loan. You need to quickly increase your earning capacity to repay this unexpected debt. @@ -899,71 +902,71 @@ STR_DTLS :You run a small park near Rio but the bank has called in your loan. ## Time Twister Scenarios ############################################################################### -STR_SCNR :Dark Age - Castle +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Local members of the battle re-enactment society are rather serious about their hobby. They’ve entrusted you with the job of constructing a Dark Age theme park on the grounds of Cliffside Castle. -STR_SCNR :Dark Age - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :To liberate wealth from the rich and distribute it to the needy, you and your Merry Men have decided to build a theme park in Sherwood Forest. -STR_SCNR :Future - First Encounters +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Life has been discovered on a distant planet. Build an alien theme park to cash in on the unprecedented wave of interest. -STR_SCNR :Future - Future World +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Show off your inventive, utopian vision of the future - come up with a futuristic park design that incorporates state-of-the-art attractions. -STR_SCNR :Mythological - Animatronic Film Set +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :You have been given the task of running and improving an existing theme park, which has been built on an old film set. Build a tribute to the pioneering stop-motion animators who first brought mythical creatures to life on the silver screen. -STR_SCNR :Mythological - Cradle of Civilization +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :You own an island of particular archaeological value. You’ve decided to fund its preservation by constructing a theme park based on the area’s rich Mythological heritage. -STR_SCNR :Prehistoric - After the Asteroid +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :You own a dusty old meteor crater. In the true entrepreneurial spirit, you’ve decided to construct an asteroid theme park and convert your seemingly worthless land into a sizeable fortune. -STR_SCNR :Prehistoric - Jurassic Safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :You’ve been given the task of constructing a Jurassic era theme park. To optimize your visitors’ access to the exotic plant and animal exhibits, you will need to build rides going over and into the valley. -STR_SCNR :Prehistoric - Stone Age +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :To thwart the highway developers and preserve the mysterious ancient stone circles, you will need to construct a Stone Age theme park and turn a profit. However, attracting visitors may pose a challenge, as the terrain is a tad inhospitable. -STR_SCNR :Roaring Twenties - Prison Island +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :The infamous Prison Island - whose population once swelled with bootleggers and racketeers - is now up for sale. You’ve decided to convert it into a top tourist attraction, and money is no object. -STR_SCNR :Roaring Twenties - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :The 75th anniversary of your grandfather’s Schneider Cup victory is coming up in a few years. You’re going to honor his achievement by building a theme park based on the famous seaplane race. -STR_SCNR :Roaring Twenties - Skyscrapers +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :You own an empty lot near the low-rise part of town. To squeeze the most out of your urban property, build a skyscraper theme park inspired by the soaring art deco architecture of the twenties. -STR_SCNR :Rock ‘n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :A large annual music festival takes place on your land. Build a hip theme park to keep the free-spirited audience entertained. -STR_SCNR :Rock ‘n’ Roll - Rock ‘n’ Roll +STR_SCNR :Rock ‘n’ Roll Revival STR_PARK :Rock ‘n’ Roll Revival STR_DTLS :This aging theme park has seen better days. Help the owner give it a retro rock ‘n’ roll makeover and turn the place into a successful venue. diff --git a/data/language/eo-ZZ.txt b/data/language/eo-ZZ.txt index a97056dfde..0e42091c34 100644 --- a/data/language/eo-ZZ.txt +++ b/data/language/eo-ZZ.txt @@ -2885,7 +2885,7 @@ STR_5755 :Malĝusta Versio de Programo (Servilo uzas je {STRING}) STR_5756 :Malbona Pasvorto STR_5757 :Servilo Plena STR_5758 :{OUTLINE}{GREEN}{STRING} aliĝis al la ludo -STR_5759 :Elŝutas mapon … ({INT32} / {INT32}) KiB +STR_5759 :Elŝutas mapon … STR_5760 :Honkongaj Dolaroj (HK$) STR_5761 :Nova Tajvana Dolaro (NT$) STR_5762 :Ĉina Juano (CN¥) @@ -3449,7 +3449,7 @@ STR_6374 :I STR_6375 :Nekonata Atrakcio STR_6376 :{WINDOW_COLOUR_2}Atrakcioveturilo:{NEWLINE}{BLACK}{STRINGID} por {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Tipo: {BLACK}{STRINGID} por {STRINGID} -STR_6378 :Ricevas liston de objektoj: {INT32} / {INT32} +STR_6378 :Ricevas liston de objektoj: STR_6379 :Ricevis nevalidan datumon STR_6380 :Ĝisdatigo disponeblas! STR_6381 :Aliĝi al la Diskordo de OpenRCT2! @@ -3698,6 +3698,24 @@ STR_6624 :Inspektilo de Bloko: Ordigi elementojn STR_6625 :Nevalida koloro STR_6626 :Animacio movas malantaŭen STR_6627 :Rapideco de trako estas tro alta! +STR_6628 :Nur meteblas sur bordoj de trotuaroj! +STR_6629 :Ĝisrandigi butonojn de ilobreto horizontale centren +STR_6630 :Ĉi tiu agordo ĝisrandigos la butonojn de ilobreto horizontale centren de la ekrano. La tradicia maniero ĝisrandigi ilin estas al la dekstre kaj maldeksre anguloj. +STR_6631 :Ŝargado… +STR_6632 :Kontrolas dosierojn de objektoj… +STR_6633 :Kontrolas dosierojn de scenaroj… +STR_6634 :Kontrolas dosierojn de trakdesegnaĵoj… +STR_6635 :Kontrolas havaĵo-pakojn… +STR_6636 :Kontrolas titolosekvencojn… +STR_6637 :Ŝargas titolosekvencon… +STR_6638 :Pligrandigita fasado +STR_6639 :Modifas la fasadon por esti pli taŭga por tuŝekranoj +STR_6640 :Redakti havaĵo-pakojn… +STR_6641 :Ŝargado/progreso-fenestro +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Tuŝekranaj plibonigoj +STR_6645 :Pligrandigas kelkajn elementojn de la fasado, por ke ili estas pli facile klakeblaj aŭ tuŝeblaj. ############# # Scenarios # @@ -4287,87 +4305,87 @@ STR_DTLS :Konstruu la mankantajn atrakciojn de Six Flags, aŭ kreu viajn prop ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Afriko - Afrika Diamanto-Mino +STR_SCNR :Minoj de Afriko STR_PARK :Minoj de Afriko STR_DTLS :Vi heredis ne plu uzitan diamanto-minejon, kaj trovis valoran diamanton. Vi decidas investi tiun monon por konstrui mondfaman amuzparkon. -STR_SCNR :Afriko - Oazo +STR_SCNR :Miraĝo-Frenezo STR_PARK :Miraĝo-Frenezo STR_DTLS :Dezerta oazo estis malkovrita kaj provizus belan lokon por parko. Transporto al la oazo estis provizita. -STR_SCNR :Afriko - Akvofaloj de Viktoria +STR_SCNR :Super La Rando STR_PARK :Super La Rando STR_DTLS :Digo konstruita oferas abundan malmultekostan hidroelektran potencon por administri parkon. Vi devas atingi altan parkvaloron por helpi repagi la prunton de la digo. -STR_SCNR :Antarkto - Ekologia Savo +STR_SCNR :Glaciaj Aventuroj STR_PARK :Glaciaj Aventuroj STR_DTLS :La biomedia agentejo komisiis vin por transformi malnovan nafto-rafinejon, ekologian malbelaĵon, en supran turismo-vidindaĵon. Tereno estas malmultekosta sed pruntinterezo estas alta. Vi povas vendi la malnovajn konstruaĵojn por savado. -STR_SCNR :Azio - Plibonigo de Turismo de la Granda Ĉina Muro +STR_SCNR :La Granda Ĉina Muro STR_PARK :La Granda Ĉina Muro STR_DTLS :La aŭtoritatoj decidis plibonigi turismon ĉirkaŭ la Granda Muro per konstrui amuzparkon sur la apuda tereno. Mono estas neniu problemo! -STR_SCNR :Azio - Japana Marborda Reakiro +STR_SCNR :Okinavo-Marbordo STR_PARK :Okinavo-Marbordo STR_DTLS :Ekzistanta parko elĉerpiĝis de spaco. Via sola eblo estas konstrui sur la maron, kaj tial vi elprenis prunton. Alteco-limigoj de viaj konstruaĵoj estas observigitaj pro fondaĵoj kaj tertremo-risko. -STR_SCNR :Azio - Maharaĝo-Palaco +STR_SCNR :Parko-Maharaĝo STR_PARK :Parko-Maharaĝo STR_DTLS :Vi estis komisiita de la Maharaĝo por alporti amuzadon al la granda loka loĝantaro. Konstruu parkon inspiritan de la palaco de Maharaĝo. -STR_SCNR :Aŭstralazio - Uluruo +STR_SCNR :Uluru-Aventuro STR_PARK :Uluru-Aventuro STR_DTLS :Vi helpas aborigenojn per konstrui parkon kiel parto de programo de kultura konscio. Vi bezonas akiri multajn gastojn por eduki ilin pri la unika heredaĵo de la aborigenoj. -STR_SCNR :Aŭstralazio - Amuzo ĉe la Plaĝo +STR_SCNR :Kradostado-Festo ĉe la Plaĝo STR_PARK :Kradostado-Festo ĉe la Plaĝo STR_DTLS :La marvivo-parko de loka entreprenisto eksenmoniĝis. Vi jam funkciigas malgrandan parkon, kaj aĉetas la alian parkon de la konstruo-kompanio. Ellaboru grandan kombinitan parkon. -STR_SCNR :Eŭropo - Eŭropa Kultura Festivalo +STR_SCNR :Eŭropa Ekstravagancaĵo STR_PARK :Eŭropa Ekstravagancaĵo STR_DTLS :Vi estis alportita por transpreni Eŭropan Kulturan Vizitanto-Vidindaĵon kaj devas pliigi la nombron de gastoj por repagi la EU-subvencion antaŭ la fino de la aktuala Eŭropa parlamento-oficdaŭro. -STR_SCNR :Eŭropo - Renovigo +STR_SCNR :El La Cindroj STR_PARK :El La Cindroj STR_DTLS :Malnova parko falis je kadukiĝo. Vi akiras subvencion de Eŭropa Unio por redoni ĉi tiun senigitan areon al sia iama gloro! Vi bezonas renovigi la parkon kaj repagi la subvencion. -STR_SCNR :Nordameriko - Ekstrema Havaja Insulo +STR_SCNR :Komika Waikiki STR_PARK :Komika Waikiki STR_DTLS :La homoj de Havajo estas enuigitaj de surfado kaj serĉas ion pli intensan. Vi devas konstrui parkon ĉi-rilate por subteni la vidindaĵo-valoron de la areo alta. -STR_SCNR :Nordameriko - Granda Kanjono +STR_SCNR :Kanjono-Katastrofoj STR_PARK :Kanjono-Katastrofoj STR_DTLS :Vi devas konstrui parkon sur limigita tereno ambaŭflanke de ĉi tiu natura trezoro - vi havas la oportunecon por aĉeti najbaran terenon de la Indiĝenaj Amerikanoj. Vi devas kompletigi la celon por daŭrigi la loĝantaron de la loka vilaĝo. -STR_SCNR :Nordameriko - Paradizo de Ondaj Fervojoj +STR_SCNR :Paradizo de Ondaj Fervojoj STR_PARK :Paradizo de Ondaj Fervojoj STR_DTLS :Vi estas sukcesa komerca magnato prenanta longan libertempon, kiu deziras uzi ĉi tiun tempon per transformi la urban parkon en Onda-Fervojo-Paradizon. Mono estas neniu problemo! -STR_SCNR :Sudameriko - La Perdita Inkaa Urbo +STR_SCNR :Fondinto de la Perdita Urbo STR_PARK :Fondinto de la Perdita Urbo STR_DTLS :Por plue akceli lokan turismon, vi devas konstrui parkon, kiu akordas kun sia ĉirkaŭaĵo. -STR_SCNR :Sudameriko - Pluvarbaro-Altebenaĵo +STR_SCNR :Pluvarbaro-Kapriolo STR_PARK :Pluvarbaro-Kapriolo STR_DTLS :Spaco estas limigita en la altvalora pluvarbaro - vi devas plenegigi kiel eble plej multe en la ekzistantan senarbejon, por havigi vivipovan alternativon je la loka ligno-industrio. -STR_SCNR :Sudameriko - La Karnavalo de Rio +STR_SCNR :Sukerpano-Marbordoj STR_PARK :Sukerpano-Marbordoj STR_DTLS :Vi administras malgrandan parkon proksime de Rio-de-Ĵanejro, sed la banko alvokis vian prunton. Vi devas rapide pliigi vian enspezado-kapablon por repagi ĉi tiun neatenditan ŝuldon. @@ -4375,72 +4393,72 @@ STR_DTLS :Vi administras malgrandan parkon proksime de Rio-de-Ĵanejro, sed l ## Time Twister Scenarios ############################################################################### -STR_SCNR :Malluma Epoko - Kastelo +STR_SCNR :Klifoflanko-Kastelo STR_PARK :Klifoflanko-Kastelo STR_DTLS :Lokaj anoj de la socio de batalo-rekonstruoj estas sufiĉe seriozaj pri ilia ŝatokupo. Ili konfidis al vi la laboron de konstrui amuzparkon kun temo de Malluma Epoko sur la tereno de Klifoflanko-Kastelo. -STR_SCNR :Malluma Epoko - Robin Hood +STR_SCNR :Arbaro Sherwood STR_PARK :Arbaro Sherwood STR_DTLS :Por liberigi la riĉaĵon de riĉuloj kaj disdoni ĝin al senhavuloj, vi kaj viaj Gajaj Viroj decidis konstrui amuzparkon en Arbaro Sherwood. -STR_SCNR :Estonto - Unuaj Renkontoj +STR_SCNR :Ekstertera Ekstravagancaĵo STR_PARK :Ekstertera Ekstravagancaĵo STR_DTLS :Vivo estis malkovrita ĉe malproksima planedo. Konstruu eksterteran parkon por profiti de la senprecedenca ondo de intereso. -STR_SCNR :Estonto - Estonta Mondo +STR_SCNR :Ĝemeloj-Urbo STR_PARK :Ĝemeloj-Urbo STR_DTLS :Montru vian inventeman, utopian konceptadon de la estonteco - kreu futurisman parko-dezegnaĵon, kiu enkorpigas la plej modernajn atrakciojn. -STR_SCNR :Mitologia - Animatronika Filmado-Loko +STR_SCNR :Animatronikaj Burleskaĵoj STR_PARK :Animatronikaj Burleskaĵoj STR_DTLS :Vi ricevis la taskon de funkciigi kaj plibonigi ekzistantan amuzparkon, kiu estis konstruita ĉe malnova filmado-loko. Konstruu tributon al la pioniraj haltmovado-animistoj, kiuj unue vivigis mitajn kreitojn sur la film-ekranon. -STR_SCNR :Mitologia - Naskiĝejo de Civilizo +STR_SCNR :Mitologia Frenezo STR_PARK :Mitologia Frenezo STR_DTLS :Vi posedas insulon de aparta arkeologia valoro. Vi decidis financi ĝian konservadon per konstrui amuzparkon surbaze de la riĉa Mitologia heredaĵo de la areo. -STR_SCNR :Prahistoria - Post la Asteroido +STR_SCNR :Kratero-Buĉado STR_PARK :Kratero-Buĉado STR_DTLS :Vi posedas polvan malnovan meteor-krateron. Per vera entreprenema vigleco, vi decidis konstrui asteroidan amuzparkon kaj konverti vian ŝajne senvaloran bienon en konsiderindan riĉaĵon. -STR_SCNR :Prahistoria - Ĵurasa Safario +STR_SCNR :Onda-Fervojo-Dinosaŭro STR_PARK :Onda-Fervojo-Dinosaŭro STR_DTLS :Vi ricevis la taskon de konstrui Ĵurasa-epokan amuzparkon. Por optimumigi la aliron de viaj vizitantoj al la ekzotikaj ekspoziciaĵoj da kreskaĵoj kaj bestoj, vi bezonos konstrui atrakciojn irantajn super kaj en la valon. -STR_SCNR :Prahistoria - Ŝtonepoko +STR_SCNR :Rokaj Vagaĵoj STR_PARK :Rokaj Vagaĵoj STR_DTLS :Por malhelpi la ŝoseo-ellaborantojn kaj konservi la misterajn antikvajn ŝtono-rondojn, vi bezonos konstrui Ŝtonepokan amuzparkon kaj gajni profiton. Tamen, eble estos defio por allogi vizitantojn, ĉar la tereno estas iom negastema. -STR_SCNR :Muĝadaj Dudekaj - Prizono-Insulo +STR_SCNR :Alkatrazo STR_PARK :Alkatrazo STR_DTLS :La fifama Mallibereja Insulo - kies loĝantaro iam ŝveliĝis per piratistoj kaj eldevigantoj - nun estas aĉetebla. Vi decidis transformi ĝin en supran turisman vidindaĵon, kaj mono estas neniu problemo. -STR_SCNR :Muĝadaj Dudekaj - Schneider-Trofeo +STR_SCNR :Schneider-Marbordoj STR_PARK :Schneider-Marbordoj STR_DTLS :La 75-a datreveno de la Schneider-Trofeo-venko de via avo venas en kelkaj jaroj. Vi honoros lian atingon per konstrui amuzparkon surbaze de la fama hidroplano-vetkuro. -STR_SCNR :Muĝadaj Dudekaj - Ĉielskrapantoj +STR_SCNR :Metropolo STR_PARK :Metropolo STR_DTLS :Vi posedas malplenan teron proksime de la malaltaĵo-parto de la urbo. Por akiri la plej grandan parton de via urba propraĵo, konstruu ĉielskrapanto-temitan amuzparkon inspiritan de la altegiĝia artodekora arkitekturo de la dudekaj. -STR_SCNR :Rokenrolo - La Potenco de Floroj +STR_SCNR :Woodstock-Festivalo STR_PARK :Woodstock-Festivalo STR_DTLS :Granda jara muzikfestivalo okazas sur via tereno. Konstruu mojosan amuzparkon por teni la liberaniman spektantaron amuzita. -STR_SCNR :Rokenrolo - Rokenrolo +STR_SCNR :La Revivigo de Rokenrolo STR_PARK :La Revivigo de Rokenrolo STR_DTLS :Ĉi tiu maljuniĝa amuzparko vidis pli bonajn tagojn. Helpu la posedanton doni al ĝi eksmodan rokenrolan renovigon, kaj transformi la lokon en sukcesan ejon. diff --git a/data/language/es-ES.txt b/data/language/es-ES.txt index fc116874b8..f057ac9a5d 100644 --- a/data/language/es-ES.txt +++ b/data/language/es-ES.txt @@ -566,10 +566,10 @@ STR_1172 :{YELLOW}{STRINGID} STR_1173 :Construir senderos STR_1174 :Cartel de señal interfiere STR_1175 :No se puede construir esto sobre una pendiente -STR_1176 :No se puede construir este camino aquí… -STR_1177 :No se puede quitar este camino de aquí… +STR_1176 :No se puede construir un sendero aquí… +STR_1177 :No se puede quitar este sendero de aquí… STR_1178 :Pendiente del terreno no apto -STR_1179 :Camino interfiere +STR_1179 :Sendero interfiere STR_1180 :¡No se puede construir bajo el agua! STR_1181 :Senderos STR_1182 :Tipo @@ -579,8 +579,8 @@ STR_1185 :Dirección STR_1186 :Cuesta abajo STR_1187 :Nivel del suelo STR_1188 :Cuesta arriba -STR_1189 :Construye el camino seleccionado -STR_1190 :Eliminar la sección de camino previo +STR_1189 :Construye el sendero seleccionado +STR_1190 :Eliminar la sección de sendero previo STR_1191 :{BLACK}{STRINGID} STR_1192 :{OUTLINE}{RED}{STRINGID} STR_1193 :{WINDOW_COLOUR_2}{STRINGID} @@ -1043,7 +1043,7 @@ STR_1649 :“¡Me estoy quedando sin dinero!” STR_1650 :“¡Wow! ¡Están construyendo una nueva atracción!” STR_1653 :“… ¡Y aquí estamos en {STRINGID}!” STR_1654 :{WINDOW_COLOUR_2}Pensamientos recientes: -STR_1655 :Construir camino a nivel del suelo. +STR_1655 :Construir sendero a nivel del suelo. STR_1656 :Construir puente o túnel. STR_1657 :{WINDOW_COLOUR_2}Atracción preferida: STR_1658 :{WINDOW_COLOUR_2}Intensidad: {BLACK}menos de {COMMA16} @@ -2056,7 +2056,7 @@ STR_2851 :Escenario ya instalado STR_2852 :Vía ya instalada STR_2853 :¡Prohibido por las autoridades locales! STR_2854 :{RED}¡Los visitantes no encuentran la entrada de {STRINGID}!{NEWLINE}Construye un sendero hacia la entrada -STR_2855 :{RED}¡{STRINGID} no tiene un camino de salida!{NEWLINE}Construye un camino desde la salida de la atracción. +STR_2855 :{RED}¡{STRINGID} no tiene un sendero de salida!{NEWLINE}Construye un sendero desde la salida de la atracción. STR_2858 :No puedes iniciar una campaña publicitaria… STR_2861 :{WINDOW_COLOUR_2}Bajo licencia a Infogrames Interactive Inc. STR_2971 :Esquema de color principal @@ -2346,7 +2346,7 @@ STR_3328 :No se puede avanzar a la siguiente etapa del editor… STR_3329 :No se ha construido una entrada del parque STR_3330 :El parque debe poseer un terreno STR_3331 :El sendero de la entrada del parque al borde del mapa no está completo o es demasiado complejo. Ha de tener un sólo carril con el menor número posible de cruces y curvas. -STR_3332 :La entrada del parque está al revés o no tiene un camino que lleve al borde del mapa +STR_3332 :La entrada del parque está al revés o no tiene un sendero que lleve al borde del mapa STR_3333 :Exportar complementos al guardar el juego STR_3334 :Selecciona si los complementos adicionales (datos no distribuidos con el juego principal) utilizados en un escenario deben exportarse al guardar el juego, lo que permite que otros jugadores que no tengan esos complementos puedan abrirlo. STR_3335 :Diseñador de Vías - Selecciona el tipo de Atracción y Vehículo @@ -2890,7 +2890,7 @@ STR_5755 :Versión de Software Incorrecto (Versión del servidor {STRING}) STR_5756 :Contraseña Incorrecta STR_5757 :Servidor Lleno STR_5758 :{OUTLINE}{GREEN}{STRING} se ha unido al juego -STR_5759 :Descargando mapa … ({INT32} / {INT32}) KiB +STR_5759 :Descargando mapa … STR_5760 :Dólar de Hong Kong (HK$) STR_5761 :Nuevo dólar de Taiwán (NT$) STR_5762 :Yuan Chino (CN¥) @@ -3109,7 +3109,7 @@ STR_5980 :Texto de bandera: {BLACK}{STRINGID} STR_5981 :No es una bandera STR_5982 :Tipo de escenario grande: {BLACK}{COMMA16} STR_5983 :ID pieza de escenario grande: {BLACK}{COMMA16} -STR_5984 :Caminos Bloqueados: +STR_5984 :Senderos Bloqueados: STR_5985 :Nueva Carpeta STR_5986 :Escribe el nombre de la nueva carpeta STR_5987 :No se puede crear la carpeta @@ -3346,7 +3346,7 @@ STR_6257 :Translúcido STR_6258 :Transparente STR_6259 :Deshabilitado STR_6260 :Mostrar casillas bloqueadas -STR_6261 :Mostrar caminos anchos +STR_6261 :Mostrar senderos anchos STR_6262 :Volumen Maestro STR_6263 :Activar o desactivar todos los sonidos STR_6264 :Usar siempre explorador de archivos del sistema @@ -3422,7 +3422,7 @@ STR_6343 :Inspector de cuadrícula: Aumentar coordenada Y STR_6344 :Inspector de cuadrícula: Disminuir coordenada Y STR_6345 :Inspector de cuadrícula: Aumentar altura del elemento STR_6346 :Inspector de cuadrícula: Disminuir altura del elemento -STR_6347 :¡Agregados a los caminos no se pueden añadir en cruces de nivel! +STR_6347 :¡Adiciones a los senderos no se pueden colocar en cruces de nivel! STR_6348 :¡Primero quita el cruce de nivel! STR_6349 :Secuencia de la pantalla de inicio al azar STR_6350 :Distribuir @@ -3453,7 +3453,7 @@ STR_6374 :G STR_6375 :Paseo Desconocido STR_6376 :{WINDOW_COLOUR_2}Paseo en vehículo:{NEWLINE}{BLACK}{STRINGID} para {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Tipo: {BLACK}{STRINGID} para {STRINGID} -STR_6378 :Recepción de lista de objetos: {INT32} / {INT32} +STR_6378 :Recepción de lista de objetos: STR_6379 :Se recibieron datos no válidos STR_6380 :¡Actualización disponible! STR_6381 :¡Únete al Discord de OpenRCT2! @@ -3524,7 +3524,7 @@ STR_6445 :Pasamanos de sendero. STR_6446 :{WINDOW_COLOUR_2}Nombre de la superficie: {BLACK}{STRINGID} STR_6447 :{WINDOW_COLOUR_2}Nombre del pasamanos: {BLACK}{STRINGID} STR_6448 :Formato de objeto no soportado -STR_6449 :{WINDOW_COLOUR_2}Caminos: +STR_6449 :{WINDOW_COLOUR_2}Senderos: STR_6450 :{BLACK}“{STRING}” STR_6451 :{BLACK}“{STRING}” - {STRING} STR_6452 :{WINDOW_COLOUR_2}Vende: {BLACK}{STRING} @@ -3552,7 +3552,7 @@ STR_6474 :Visitantes invisibles STR_6475 :Empleados invisibles STR_6476 :Vegetación invisible STR_6477 :Escenario invisible -STR_6478 :Caminos invisibles +STR_6478 :Senderos invisibles STR_6479 :Atracciones invisibles STR_6480 :Vehículos invisibles STR_6481 :Opciones de transparencia @@ -3611,8 +3611,8 @@ STR_6533 :{WINDOW_COLOUR_2}Factor de emoción: {BLACK}-{COMMA16}% STR_6534 :{WINDOW_COLOUR_2}Factor de intensidad: {BLACK}-{COMMA16}% STR_6535 :{WINDOW_COLOUR_2}Factor de náusea: {BLACK}-{COMMA16}% STR_6536 :Este parque fue guardado en una versión más reciente de OpenRCT2. Este parque se guardó en la v{INT32}, actualmente estás en la v{INT32}. -STR_6537 :Permitir usar caminos normales como cola -STR_6538 :Muestra caminos normales en el menú desplegable de colas de la ventana Senderos. +STR_6537 :Permitir usar senderos normales como cola +STR_6538 :Muestra senderos normales en el menú desplegable de colas de la ventana Senderos. STR_6539 :Freno cerrado STR_6540 :{WINDOW_COLOUR_2}En especial gracias a las siguientes empresas for permitir el uso de su imagen: STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG @@ -3684,7 +3684,7 @@ STR_6606 :Elemento de superficie no encontrado STR_6607 :Elemento de casilla no encontrado STR_6608 :Elemento de vía no encontrado STR_6609 :Bloque de vía no encontrado -STR_6610 :Elemento de camino no encontrado +STR_6610 :Elemento de sendero no encontrado STR_6611 :Elemento de muro no encontrado STR_6612 :Elemento de banner no encontrado STR_6613 :Recargar objeto @@ -3701,6 +3701,25 @@ STR_6623 :Escribe ‘help’ para ver la lista de comandos disponibles. Escri STR_6624 :Inspector de cuadrícula: Ordernar elementos STR_6625 :Color no válido STR_6626 :La animación está reflejada +STR_6627 :¡Velocidad de vía demasiado alta! +STR_6628 :¡Sólo puede ser colocado en los bordes del sendero! +STR_6629 :Alinear los botones de la barra de herramientas centrados horizontalmente +STR_6630 :Este ajuste alineará los botones de la barra de herramientas horizontalmente en el centro de la pantalla. La forma tradicional de alinearlos es en la esquina izquierda y derecha. +STR_6631 :Cargando… +STR_6632 :Comprobando archivos de objeto… +STR_6633 :Comprobando archivos de escenario… +STR_6634 :Comprobando archivos de diseño de vía… +STR_6635 :Comprobando archivos de recurso… +STR_6636 :Comprobando secuencias de título… +STR_6637 :Cargando secuencia de título… +STR_6638 :Interfaz ampliada +STR_6639 :Modifica la interfaz para que sea más fácil de usar con pantallas táctiles +STR_6640 :Editar paquetes de recursos… +STR_6641 :Ventana de carga/progreso +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Mejoras táctiles +STR_6645 :Aumenta el tamaño de algunos elementos de la interfaz para que sea más fácil pulsarlos. ############## # Escenarios # @@ -4291,89 +4310,89 @@ STR_DTLS :Construye las atracciones Six Flags faltantes, o crea tus propios d ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - Mina de diamantes +STR_SCNR :Minas de África STR_PARK :Minas de África STR_DTLS :Has heredado una mina de diamantes en desuso, y has encontrado un valioso diamante. Has decidido invertir ese dinero en construir un parque temático de fama mundial. -STR_SCNR :Africa - Oasis +STR_SCNR :Locura de espejismo STR_PARK :Locura de espejismo STR_DTLS :Se ha descubierto un oasis en el desierto, y constituye un hermoso lugar para un parque. También se han proporcionado los medios de transporte hasta el oasis. -STR_SCNR :África - Cataratas Victoria +STR_SCNR :Sobre el borde STR_PARK :Sobre el borde STR_DTLS :Se ha construido una presa que ofrece abundante y barata energía hidroeléctrica con la que suministrar a un parque. Tendrás que alcanzar un alto valor de parque para poder devolver el dinero del préstamo para la presa. -STR_SCNR :Antártico - recuperación ecológica +STR_SCNR :Aventuras heladas STR_PARK :Aventuras heladas STR_DTLS :La agencia de medio ambiente recurre a ti para transformar una vieja refinería, en una atracción turística de primera. El terreno es barato, pero los intereses son elevados. Puedes vender los viejos edificios como chatarra. -STR_SCNR :Asia - Mejora turística de la Gran Muralla China +STR_SCNR :Gran Muralla China STR_PARK :Gran Muralla China STR_DTLS :Las autoridades han decidido mejorar el turismo en torno a la Gran Muralla construyendo un parque temático en el terreno adyacente. ¡El dinero no es un problema -STR_SCNR :Asia - Recuperación costera japonesa +STR_SCNR :Costa Okinawa STR_PARK :Costa Okinawa STR_DTLS :Un parque ya existente se ha quedado sin espacio. Tu única opción para seguir construyendo es ganarle terreno al mar, así que has pedido un préstamo. Las restricciones de altura de los edificios son obligatorias debido a los cimientos/rie… -STR_SCNR :Asia - Palacio del Maharajá +STR_SCNR :Parque Maharajá STR_PARK :Parque Maharajá STR_DTLS :Has sido designado por el Maharajá para traer un poco de entretenimiento a la gran población local. Construye un parque inspirado en el palacio del Maharajá. -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Aventura en Ayers STR_PARK :Aventura en Ayers STR_DTLS :Estás ayudando al pueblo aborigen a construir un parque como parte de un programa de concienciación cultural. Necesitas a un gran número de visitantes para instruirles acerca de la herencia única del pueblo aborigen. -STR_SCNR :Australasia; Diversión en la playa +STR_SCNR :Bárbara barbacoa playera STR_PARK :Bárbara barbacoa playera STR_DTLS :El parque marino de un empresario local se ha arruinado. Tú ya tienes un pequeño parque y tienes que ganar suficiente dinero para comprar el otro parque a la compañía de construcción. Tendrás que desarrollar tu propio parque para crea… -STR_SCNR :Europe - Festival cultural europeo +STR_SCNR :Extravagancia europea STR_PARK :Extravagancia europea STR_DTLS :Te han traído aquí para que te ocupes de una atracción europea cultural para visitantes, y tienes que aumentar el número de asistentes para poder devolver el subsidio de la UE al final del periodo parlamentario europeo actual. -STR_SCNR :Europa - Renovación +STR_SCNR :Desde las cenizas STR_PARK :Desde las cenizas STR_DTLS :Un viejo parque se encuentra en mal estado. Has recibido una subvención de la Unión Europea para devolver a esta depauperada área a su antigua gloria. Tendrás que renovar el parque y ganar lo suficiente para pagar la subvención. -STR_SCNR :N. América - Isla hawaiana extrema +STR_SCNR :Waikiki Guay STR_PARK :Waikiki Guay STR_DTLS :Las gentes de Hawai se han aburrido de practicar surf y ahora buscan algo más intenso. Tienes que construir un parque para satisfacerlos, y conservar alto el índice de atractivo turístico del área. -STR_SCNR :N. América - Gran Cañón +STR_SCNR :Calamidades en el cañon STR_PARK :Calamidades en el cañon STR_DTLS :Debes construir un parque en el terreno que hay a ambos lados de este tesoro natural, aunque tienes la oportunidad de comprar las tierras vecinas a los indios nativos americanos. Tendrás que cumplir el objetivo de mantener a la población … -STR_SCNR :N. América - Paraíso de montañas rusas +STR_SCNR :Paraíso de montañas rusas STR_PARK :Paraíso de montañas rusas STR_DTLS :Eres un exitoso magnate de los negocios que se ha tomado cuatro años sabáticos. Tu deseo es construir un parque sin limitaciones de dinero. -STR_SCNR :Sudamérica; Ciudad perdida inca +STR_SCNR :Fundador de la ciudad perdida STR_PARK :Fundador de la ciudad perdida STR_DTLS :Para impulsar aún más el turismo local, tienes que construir un parque que esté en sintonía con el entorno que lo rodea. -STR_SCNR :Sudamérica - Meseta selvática +STR_SCNR :Aventuras en la selva STR_PARK :Aventuras en la selva STR_DTLS :En esta valiosa selva el espacio es limitado, tendrás que apretujarte tanto como puedas en el claro existente, con el fin de proporcionar una alternativa viable para la industria maderera local. -STR_SCNR :Sudamérica - Carnaval de Río +STR_SCNR :Costas de Sugarloaf STR_PARK :Costas de Sugarloaf STR_DTLS :Gestionas un pequeño parque cerca de Río, pero el banco te ha retirado su préstamo. Tendrás que aumentar rápidamente tu capacidad de ganancias para pagar esta deuda inesperada. @@ -4382,72 +4401,72 @@ STR_DTLS :Gestionas un pequeño parque cerca de Río, pero el banco te ha ret ## Time Twister Scenarios ############################################################################### -STR_SCNR :Edad media, castillo +STR_SCNR :El castillo en el risco STR_PARK :El castillo en el risco STR_DTLS :Los miembros de una asociación local de recreación de batallas históricas se toman su afición muy en serio. Te han confiado la construcción de un parque temático de la edad media en los terrenos del Castillo del risco. -STR_SCNR :Edad media, Robin Hood +STR_SCNR :El bosque de Sherwood STR_PARK :El bosque de Sherwood STR_DTLS :Para quitarles el dinero a los ricos y dárselo a los pobres, tus alegres compañeros y tú habéis decidido construir un parque temático en el bosque de Sherwood. -STR_SCNR :Futuro, primer contacto +STR_SCNR :Exceso extraterrestre STR_PARK :Exceso extraterrestre STR_DTLS :¡Se ha descubierto vida en un planeta distante Construye un parque temático basado en los extraterrestres para sacar dinero del interés sin precedentes que ha despertado el tema. -STR_SCNR :Futuro, el mundo futuro +STR_SCNR :Ciudad Géminis STR_PARK :Ciudad Géminis STR_DTLS :Demuestra tu inventiva y utópica visión del futuro, crea un parque de diseño futurista que incorpore atracciones de última tecnología. -STR_SCNR :Mitológica, estudio de cine animatrónico +STR_SCNR :Animatrónica de los antiguos STR_PARK :Animatrónica de los antiguos STR_DTLS :Se te ha encargado dirigir y mejorar un parque temático ya existente sobre unos antiguos estudios de cine. Rinde tributo a los pioneros de las animaciones que fueron los primeros en llevar a la gran pantalla las criaturas míticas. -STR_SCNR :Mitológico, cuna de la civilización +STR_SCNR :Locura mitológica STR_PARK :Locura mitológica STR_DTLS :Posees una isla de cierto valor arqueológico. Has decidido financiar su conservación construyendo un parque temático basado en la riqueza de la tradición mitológica de la zona. -STR_SCNR :Prehistórica, después del asteroide +STR_SCNR :Carnicería en el cráter STR_PARK :Carnicería en el cráter STR_DTLS :Posees un antiguo cráter de meteorito. Siguiendo una clara vocación industrial, has decidido construir un parque temático de asteroides y convertir tus tierras aparentemente sin valor en una considerable fortuna. -STR_SCNR :Prehistórica, safari jurásico +STR_SCNR :Montañasauro STR_PARK :Montañasauro STR_DTLS :Tu misión es construir un parque de atracciones basado en el jurásico. Para optimizar el acceso de los visitantes a las exóticas exhibiciones de plantas y animales, tendrás que construir atracciones que suban y bajen del valle. -STR_SCNR :Prehistórica, edad de piedra +STR_SCNR :Un paseo por las piedras STR_PARK :Un paseo por las piedras STR_DTLS :Para combatir a los promotores de una autopista y preservar los antiguos círculos de piedra, debes construir un parque temático de la edad de piedra y hacerlo rentable. Pero atraer visitantes no es fácil por el terreno poco acogedor. -STR_SCNR :Los locos años veinte, la isla prisión +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :La infame isla prisión, antes habitada por contrabandistas y estafadores, ahora está a la venta. Has decidido convertirla en una atracción turística de primer orden ¡y el dinero no es un problema -STR_SCNR :Los locos años veinte, la copa Schneider +STR_SCNR :Las costas de Schneider STR_PARK :Las costas de Schneider STR_DTLS :En pocos años se cumplirá el 75 aniversario de la victoria de tu abuelo en la copa Schneider. Vas a honrar su logro construyendo un parque temático basado en la famosa carrera de hidroaviones. -STR_SCNR :Los locos años veinte, rascacielos +STR_SCNR :Metrópolis STR_PARK :Metrópolis STR_DTLS :Posees una parcela vacía en la parte baja de la ciudad. Para exprimir al máximo tu propiedad, decides construir un parque temático basado en los rascacielos y la arquitectura Art Decó de los años veinte. -STR_SCNR :Rock & Roll - Poder florar +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :En tus tierras se desarrolla todos los años un gran festival musical. Construye un parque temático para mantener a la audiencia entretenida. -STR_SCNR :Rock & Roll - Rock & Roll +STR_SCNR :La resurrección del Rock & Roll STR_PARK :La resurrección del Rock & Roll STR_DTLS :Este antiguo parque temático ha visto tiempos mejores. Ayuda al propietario a darle un aspecto más rockanrolero y convierte el lugar en un negocio próspero. diff --git a/data/language/fi-FI.txt b/data/language/fi-FI.txt index 85c466ff1e..1c8fbd7630 100644 --- a/data/language/fi-FI.txt +++ b/data/language/fi-FI.txt @@ -28,9 +28,9 @@ STR_0023 :Kierreliukumäki STR_0024 :Mikroautot STR_0025 :Tukkijoki STR_0026 :Koskiseikkailu -STR_0027 :Törmäysautot +STR_0027 :Törmäilyautot STR_0028 :Merirosvolaiva -STR_0029 :Kääntyvä merirosvolaiva +STR_0029 :Kieppuva merirosvolaiva STR_0030 :Ruokakoju STR_0031 :Tuntematon koju (1D) STR_0032 :Juomakoju @@ -54,7 +54,7 @@ STR_0049 :Kummitustalo STR_0050 :Ensiapuhuone STR_0051 :Sirkus STR_0052 :Kummitusjuna -STR_0053 :Teräskiehkuravuoristorata +STR_0053 :Teräksinen kiehkuravuoristorata STR_0054 :Puinen vuoristorata STR_0055 :Sivukitkavuoristorata STR_0056 :Villihiiri @@ -99,6 +99,7 @@ STR_0093 :Hybridivuoristorata STR_0094 :Yksikiskoinen vuoristorata STR_0095 :Alppivuoristorata STR_0096 :Klassinen puinen vuoristorata +STR_0097 :Klassinen seisomavuoristorata STR_0512 :Kompakti vuoristorata, jossa on spiraalimainen nostomäki, ja sulavat, kaartelevat pudotukset. STR_0513 :Silmukoiva vuoristorata, jossa matkustajat ovat seisoma-asennossa STR_0514 :Junat riippuvat vuoristoradan alla, ja heilahtavat sivuttain käänteissä @@ -108,14 +109,14 @@ STR_0517 :Matkustajat kulkevat pienoisjunan kyydissä tällä kapeakiskoisell STR_0518 :Matkustajat kulkevat sähköisillä junilla yksittäisellä raiteella STR_0519 :Matkustajat kulkevat kiskon alta riippuvissa pienoisvaunuissa, vapaasti heilahtaen käänteissä STR_0520 :Laituri, josta kävijät voivat astua aluksiin ja ajaa tai soutaa vesistössä -STR_0521 :Nopea ja kiermuteleva vuoristorata tiukoilla käännöksillä ja jyrkillä pudotuksilla. Intensiteetti on varmasti katossa. +STR_0521 :Nopea ja kiemurteleva vuoristorata tiukoilla käännöksillä ja jyrkillä pudotuksilla. Jännitystaso on varmasti katossa. STR_0522 :Pienempi vuoristorata, jossa matkustajat kulkevat raiteilla ilman ympäröivää vaunua STR_0523 :Matkustajat kulkevat verkkaisesti moottoroiduilla ajoneuvoilla rataa pitkin -STR_0524 :Pneumaattisesti laukaistu kori kohoaa korkean terästornin huipulle, ja putoaa sitten vapaasti takaisin maahan +STR_0524 :Pneumaattisesti laukaistu kori kohoaa korkean teräksisen tornin huipulle, ja putoaa sitten vapaasti takaisin maahan STR_0525 :Matkustajat kiitävät kiemurtelevaa rataa alas, ainoastaan puolikuun muotoisen radan kallistumien ja kaarroksien ohjaamana STR_0526 :Matkustajat kulkevat pyörivässä näköalakopissa, joka nousee korkean tornin huipulle STR_0527 :Lipevä teräskiskoinen vuoristorata, joka kykenee pystysuoriin silmukoihin -STR_0528 :Matkjustajat liukuvat puhallettavissa veneissä alas puolikuun tai umpinaisen putken muotoista rataa +STR_0528 :Matkustajat liukuvat puhallettavissa veneissä alas puolikuun tai umpinaisen putken muotoista rataa STR_0529 :Kaivosjunan näköiset vuoristoratavaunut kiitävät vanhalta junaradalta näyttäviä teräskiskoja pitkin STR_0530 :Vaunut riippuvat teräskaapelista, joka pyörii jatkuvasti laitteen yhdestä päästä toiseen STR_0531 :Kompakti teräskiskoinen vuoristorata, jossa juna kiitää läpi korkkikierteiden ja silmukoiden @@ -130,7 +131,7 @@ STR_0539 :Laiva on kiinnitetty puomiin, jonka toisessa päässä on vastapain STR_0540 :Koju, josta kävijät voivat ostaa ruokaa STR_0542 :Koju, josta kävijät voivat ostaa juomia STR_0544 :Koju, joka myy matkamuistoja -STR_0545 :Vanhanaikainen pyörivä karuselli kaiverrettujen puuhevosien kera +STR_0545 :Vanhanaikainen pyörivä karuselli puisten hevospatsaiden kera STR_0547 :Koju josta kävijät voivat ostaa karttoja ja sateenvarjoja STR_0548 :WC-rakennus STR_0549 :Iso pyörivä pyörä, jossa on avoilmapenkit @@ -154,19 +155,19 @@ STR_0566 :Yksittäiset vuoristoratavaunut viuhahtavat tiukan siksakkiradan jy STR_0567 :Matkustajat pyörivät ylösalaisin radan molemmin puolin sijoitetuissa istuimissa, kun juna kiitää jyrkkien pudotusten ja moninaisten käännösten läpi STR_0569 :Matkustajat kokevat lentämisen tunteen, kun he kiitävät ilmojen halki erikoisvaljaissa radan alapuolella STR_0571 :Pyöreät vaunut kieppuvat ympäriinsä kulkiessaan siksakkaavaa puista rataa -STR_0572 :Suuren kapasiteetin veneet kulkevat laajan vesikanavaa, kulkien ylämäkiä liukuhihnalla, ja luistaen alamäkiä roiskeiden kastellessa matkustajia +STR_0572 :Suuren kapasiteetin veneet kulkevat laajaa vesikanavaa pitkin, kulkien ylämäkiä liukuhihnalla, ja luistaen alamäkiä roiskeiden kastellessa matkustajia STR_0573 :Moottoroidut helikopterin muotoiset vaunut kulkevat teräsradalla, liikkuen matkustajien polkiessa STR_0574 :Matkustajat laitetaan makuuasentoon erikoisvaljaisiin, ja laitetaan kiitämään kiemurtelevan ja kääntyilevän radan läpi, joko selin tai vatsallaan STR_0575 :Moottoroidut yksittäisestä kiskosta riippuvat junat kuljettavat kävijöitä ympäri puistoa STR_0577 :Vaunut kulkevat puisilla kiskoilla, ja kääntyvät ympäri erityisissä kääntöosioissa -STR_0578 :Vaunut kulkevat renkasmaisten rakenteiden ympäröivää rataa, kulkien läpi jyrkkien pudotusten ja sivuttaisvieritysten +STR_0578 :Vaunut kulkevat rengasmaisten rakenteiden ympäröivää rataa, kulkien läpi jyrkkien pudotusten ja sivuttaisvieritysten STR_0579 :Lempeä minigolfkenttä -STR_0580 :Jättimäinen teräsvuoristorata, joka kykenee sulaviin pudotuksiin ja jopa 90 metrin korkuisiin mäkiin +STR_0580 :Jättimäinen teräksinen vuoristorata, joka kykenee sulaviin pudotuksiin ja jopa 90 metrin korkuisiin mäkiin STR_0581 :Pyörivään ympyrään asetetut istuimet vedetään korkean tornin huipulle, ja annetaan pudota alas, ja pysähtyä hellävaraisesti magneettijarrujen ansiosta STR_0582 :Matkustajat kulkevat itse ajamissaan ilmatyynyaluksissa STR_0583 :Rakennus täynnä kävijöitä kummastuttavia vääristettyjä huoneita ja kieroutuineita käytäviä STR_0584 :Matkustajat itse polkevat näitä erikoisvalmisteisia polkupyöriä yksittäistä teräsrataa pitkin -STR_0585 :Matkustajat istuvat pareittain radasta roikuvissa istuimissa, poukkoillen ja kierrellen tiukkojen käänteiden läpi +STR_0585 :Matkustajat istuvat pareittain radasta roikkuvissa istuimissa, poukkoillen ja kierrellen tiukkojen käänteiden läpi STR_0586 :Veneen muotoiset vaunut kulkevat vuoristoradan kiertyvien kaarrosten ja jyrkkien pudotusten läpi, välillä polskahtaen lempeämpiin jokiosioihin STR_0587 :Jännittävän ilmakäyttöisen laukauksen jälkeen juna kiitää ylös pystysuoraa rataa, sujahtaa huipun yli, ja toista pystysuoraa rataa alas palatakseen asemalle STR_0588 :Erilliset vaunut kulkevat siksakkisen radan alla tiukkojen mutkien ja jyrkkien mäkien ohessa @@ -177,11 +178,12 @@ STR_0593 :Riippuvilla vaunuilla varustettu pyörivä ratas, joka aluksi pyör STR_0598 :Käänteiset vaunut laukaistaan asemalta pystysuoraa rataa ylös, pudoten lopulta aseman läpi kohti toista pystysuoraa rataa STR_0599 :Kompakti vuoristorata erillisillä vaunuilla ja sulavilla kiertyvillä pudotuksilla STR_0600 :Moottoroidut kaivosjunat kiitävät sulavasti kiemurtelevan radan halki -STR_0602 :Vuoristorata jonka junat laukaistaan asemalta induktiomoottorilla, ja kiitävät sitten kiermutelevien käännösten läpi +STR_0602 :Vuoristorata jonka junat laukaistaan asemalta induktiomoottorilla, ja kiitävät sitten kiemurtelevien käännösten läpi STR_0603 :Puinen vuoristorata teräskiskoilla, jyrkillä pudotuksilla ja käännöksillä varustettuna STR_0604 :Matkustajat kulkevat peräjonossa kapealla yksittäiskiskolla, kiitäen tiukkojen käännösten ja suunnanvaihdoksien läpi STR_0605 :Matkustajat laskettelevat kelkalla teräsrataa pitkin alas, säätäen vauhtiansa jarrujen avulla STR_0606 :Vanhemman mallinen puinen vuoristorata, joka on suunniteltu hallitsemattoman tuntuiseksi - tarjoten nopeaa ja rajua kyytiä, runsaasti airtimeä, ja jonkin verran sivuttaista G-voimaa. +STR_0607 :Hurja vanhemman mallinen teräksestä valmistettu silmukkavuoristorata, jossa matkustajat kulkevat seisoma-asennossa STR_0767 :Kävijä {INT32} STR_0768 :Yleismies {INT32} STR_0769 :Mekaanikko {INT32} @@ -365,12 +367,12 @@ STR_0973 :OK STR_0974 :Laitteet STR_0975 :Kojut STR_0976 :Vessat ja infokioskit -STR_0977 :Uusia kulkuvälineitä -STR_0978 :Uusia lempeitä laitteita -STR_0979 :Uusia vuoristoratoja -STR_0980 :Uusia jännittäviä laitteita -STR_0981 :Uusia vesilaitteita -STR_0982 :Uusia kojuja +STR_0977 :Uusi kulkuväline +STR_0978 :Uusi lempeä laite +STR_0979 :Uusi vuoristorata +STR_0980 :Uusi jännittävä laite +STR_0981 :Uusi vesilaite +STR_0982 :Uusi koju STR_0983 :Kehitys STR_0984 :{WINDOW_COLOUR_2}▲{BLACK} {CURRENCY2DP} STR_0985 :{WINDOW_COLOUR_2}▼{BLACK} {CURRENCY2DP} @@ -451,18 +453,18 @@ STR_1059 :Laitetta/kohdetta ei voi uudelleennimetä… STR_1060 :Virheellinen laitteen/kohteen nimi STR_1061 :Normaali toimintatila STR_1062 :Toistuva kierros -toimintatila -STR_1063 :Käänteiskallistus laukaistu sukkula -toimintatila +STR_1063 :Ylämäkeen peruuttava laukaistu sukkula -toimintatila STR_1064 :Voimalaukaisu (aseman ohitus) -STR_1065 :Sukkulatoimintatila -STR_1066 :Veneajelutoimintatila +STR_1065 :Sukkula-toimintatila +STR_1066 :Veneajelu-toimintatila STR_1067 :Ylöspäin laukaisu STR_1068 :Pyörivä hissi -toimintatila STR_1069 :Asemalta asemalle -toimintatila STR_1070 :Yksi kyyti per sisäänpääsy STR_1071 :Rajattomat kyydit per sisäänpääsy -STR_1072 :Labyrinttitoimintatila +STR_1072 :Labyrintti-toimintatila STR_1073 :Kilpailutoimintatila -STR_1074 :Törmäysautotoimintatila +STR_1074 :Törmäilyauto-toimintatila STR_1075 :Keinumistoimintatila STR_1076 :Kojutoimintatila STR_1077 :Pyörimistoimintatila @@ -517,7 +519,7 @@ STR_1125 :Käynnissä STR_1126 :Pysäytetään STR_1127 :Matkustajia puretaan STR_1128 :Pysähtynyt lohkojarruihin -STR_1129 :Kaikki vaunut saman värisiä +STR_1129 :Kaikki ajoneuvot saman värisiä STR_1130 :Eri värit per {STRINGID} STR_1131 :Eri värit per vaunu STR_1132 :Vaunu {POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} @@ -536,11 +538,11 @@ STR_1144 :Ei pysty rakentamaan/siirtämään tämän laitteen/kohteen sisää STR_1145 :Ei pysty rakentamaan/siirtämään tämän laitteen/kohteen uloskäyntiä… STR_1146 :Sisäänkäyntiä ei ole vielä rakennettu STR_1147 :Uloskäyntiä ei ole vielä rakennettu -STR_1148 :Neljänneslasti -STR_1149 :Puolikas lasti -STR_1150 :Kolmeneljäsosalasti -STR_1151 :Täysi lasti -STR_1152 :Mikä tahansa lasti +STR_1148 :Neljänneslastia +STR_1149 :Puolikasta lastia +STR_1150 :Kolmen neljännesosan lastia +STR_1151 :Täyttä lastia +STR_1152 :Mitä tahansa lastia STR_1153 :Korkeusmerkinnät radoissa STR_1154 :Korkeusmerkinnät maanpinnassa STR_1155 :Korkeusmerkinnät poluissa @@ -755,13 +757,13 @@ STR_1361 :Nopeutta ei voi muuttaa… STR_1362 :Lähtönopeutta ei voi muuttaa… STR_1363 :Liian korkealla tukirakenteita varten! STR_1364 :Ylemmän radan tukirakenteita ei voi pidentää! -STR_1365 :Suora kierre (vasen) -STR_1366 :Suora kierre (oikea) +STR_1365 :Väänne (vasen) +STR_1366 :Väänne (oikea) STR_1367 :Pieni puolisilmukka STR_1368 :Puolikas korkkiruuvi (vasen) STR_1369 :Puolikas korkkiruuvi (oikea) -STR_1370 :Tynnyrikierre (vasen) -STR_1371 :Tynnyrikierre (oikea) +STR_1370 :Vaakakierre (vasen) +STR_1371 :Vaakakierre (oikea) STR_1372 :Laukaistu nostomäki STR_1373 :Iso puolisilmukka (vasen) STR_1374 :Iso puolisilmukka (oikea) @@ -773,7 +775,7 @@ STR_1379 :Suunnanvaihtaja (vasen) STR_1380 :Suunnanvaihtaja (oikea) STR_1381 :Kaareva nostomäki (vasen) STR_1382 :Kaareva nostomäki (oikea) -STR_1383 :Neljännesosasilmukka +STR_1383 :Neljännessilmukka STR_1384 :{YELLOW}{STRINGID} STR_1385 :Muut radan asetukset STR_1386 :Erikoisosa… @@ -783,13 +785,13 @@ STR_1389 :{OUTLINE}{RED}- {CURRENCY} STR_1390 :{CURRENCY2DP} STR_1391 :{RED}{CURRENCY2DP} STR_1392 :Näkymä laitteesta/kohteesta -STR_1393 :Kulkuneuvon yksitoiskohdat ja asetukset +STR_1393 :Kulkuneuvon tiedot ja asetukset STR_1394 :Toiminta-asetukset STR_1395 :Huoltoasetukset STR_1396 :Värityylin asetukset STR_1397 :Ääni- ja musiikkiasetukset STR_1398 :Mitta- ja testitiedot -STR_1399 :Kaaviot +STR_1399 :Kuvaajat STR_1400 :Sisäänkäynti STR_1401 :Uloskäynti STR_1402 :Sijoita tai siirrä laitteen/kohteen sisäänkäynti @@ -822,7 +824,7 @@ STR_1428 :{WINDOW_COLOUR_2}Sisäänpääsymaksu: STR_1429 :{POP16}{POP16}{POP16}{CURRENCY2DP} STR_1430 :Ilmainen STR_1431 :Kävelee -STR_1432 :Menossa kohti laitetta {STRINGID} +STR_1432 :Suuntaamassa kohteeseen {STRINGID} STR_1433 :Jonottaa laitteeseen {STRINGID} STR_1434 :Hukkuu STR_1435 :Laitteessa {STRINGID} @@ -833,7 +835,7 @@ STR_1439 :(valitse sijainti) STR_1440 :Leikkaa ruohoa STR_1441 :Harjaa polkua STR_1442 :Tyhjentää roskakoria -STR_1443 :Kastelee puutarhoja +STR_1443 :Hoitaa puutarhoja STR_1444 :Katsoo laitetta {STRINGID} STR_1445 :Katsoo laitteen {STRINGID} rakennusta STR_1446 :Katselee maisemia @@ -1039,7 +1041,7 @@ STR_1645 : STR_1646 : STR_1647 : STR_1648 :“Apua! Laske minut alas!” -STR_1649 :“Rahat ovat loppumassa!” +STR_1649 :“Rahani ovat loppumassa!” STR_1650 :“Vau! Uutta laitetta rakennetaan!” # Two removed inside jokes about Intamin and Phoenix STR_1653 :“…ja tässä me olemme {STRINGID}!” @@ -1047,10 +1049,10 @@ STR_1654 :{WINDOW_COLOUR_2}Viimeisimmät ajatukset: STR_1655 :Rakenna polku maastoon STR_1656 :Rakenna polkutunneli tai -silta STR_1657 :{WINDOW_COLOUR_2}Suosikkilaite -STR_1658 :{WINDOW_COLOUR_2}Intensiteetti: {BLACK}enintään {COMMA16} -STR_1659 :{WINDOW_COLOUR_2}Intensiteetti: {BLACK}{COMMA16}:n ja {COMMA16}:n välillä -STR_1660 :{WINDOW_COLOUR_2}Intensiteetti: {BLACK}vähintään {COMMA16} -STR_1661 :{WINDOW_COLOUR_2}Pahoinvointitoleranssi: {BLACK}{STRINGID} +STR_1658 :{WINDOW_COLOUR_2}Jännitystaso: {BLACK}enintään {COMMA16} +STR_1659 :{WINDOW_COLOUR_2}Jännitystaso: {BLACK}{COMMA16}:n ja {COMMA16}:n välillä +STR_1660 :{WINDOW_COLOUR_2}Jännitystaso: {BLACK}vähintään {COMMA16} +STR_1661 :{WINDOW_COLOUR_2}Pahoinvoinnin sietokyky: {BLACK}{STRINGID} STR_1662 :{WINDOW_COLOUR_2}Iloisuus: STR_1663 :{WINDOW_COLOUR_2}Pahoinvointi: STR_1664 :{WINDOW_COLOUR_2}Energia: @@ -1060,7 +1062,7 @@ STR_1667 :{WINDOW_COLOUR_2}Vessahätä: STR_1668 :{WINDOW_COLOUR_2}Tyytyväisyys: {BLACK}Tuntematon STR_1669 :{WINDOW_COLOUR_2}Tyytyväisyys: {BLACK}{COMMA16}% STR_1670 :{WINDOW_COLOUR_2}Asiakkaiden määrä: {BLACK}{COMMA32} -STR_1671 :{WINDOW_COLOUR_2}Kokonaistuotanto: {BLACK}{CURRENCY2DP} +STR_1671 :{WINDOW_COLOUR_2}Tuotto yhteensä: {BLACK}{CURRENCY2DP} STR_1672 :Jarrut STR_1673 :Pyörinnnänesto-osio STR_1674 :Jarrutusnopeus @@ -1085,7 +1087,7 @@ STR_1692 :{WINDOW_COLOUR_2} Hinta: {BLACK}alk. {CURRENCY} STR_1693 :Kävijät STR_1694 :Henkilöstö STR_1695 :Tulot ja kulut -STR_1696 :Asiakkaan tiedot +STR_1696 :Asiakaspiirin tiedot STR_1697 :Näitä ei voi asettaa jonotusalueelle STR_1698 :Nämä täytyy asettaa jonotusalueelle STR_1699 :Liikaa henkilöitä pelissä @@ -1101,17 +1103,17 @@ STR_1708 :Aseta partioalue tälle henkilöstön jäsenelle STR_1709 :Irtisano henkilöstö STR_1710 :Kyllä STR_1711 :{WINDOW_COLOUR_1}Haluatko varmasti irtisanoa {STRINGID}? -STR_1712 :{INLINE_SPRITE}{247}{19}{00}{00}{WINDOW_COLOUR_2}Harjaa polut -STR_1713 :{INLINE_SPRITE}{248}{19}{00}{00}{WINDOW_COLOUR_2}Kastele puutarhat -STR_1714 :{INLINE_SPRITE}{249}{19}{00}{00}{WINDOW_COLOUR_2}Tyhjennä roskakorit +STR_1712 :{INLINE_SPRITE}{247}{19}{00}{00}{WINDOW_COLOUR_2}Harjaa polkuja +STR_1713 :{INLINE_SPRITE}{248}{19}{00}{00}{WINDOW_COLOUR_2}Hoida puutarhoja +STR_1714 :{INLINE_SPRITE}{249}{19}{00}{00}{WINDOW_COLOUR_2}Tyhjennä roskakoreja STR_1715 :{INLINE_SPRITE}{250}{19}{00}{00}{WINDOW_COLOUR_2}Leikkaa ruohoa STR_1716 :Virheellinen nimi puistolle STR_1717 :Puiston nimeäminen ei onnistunut… STR_1718 :Puiston nimi STR_1719 :Anna nimi puistolle: STR_1720 :Nimeä puisto -STR_1721 :Puisto suljettu -STR_1722 :Puisto auki +STR_1721 :Puisto on suljettu +STR_1722 :Puisto on auki STR_1723 :Puiston avaus ei onnistunut… STR_1724 :Puiston sulkeminen ei onnistunut… STR_1725 :Maan ostaminen ei onnistunut… @@ -1165,7 +1167,7 @@ STR_1778 :{STRINGID} - - STR_1779 :{INLINE_SPRITE}{254}{19}{00}{00} Pandapuku STR_1780 :{INLINE_SPRITE}{255}{19}{00}{00} Tiikeripuku STR_1781 :{INLINE_SPRITE}{00}{20}{00}{00} Norsupuku -STR_1782 :{INLINE_SPRITE}{01}{20}{00}{00} Roomalainenpuku +STR_1782 :{INLINE_SPRITE}{01}{20}{00}{00} Roomalaispuku STR_1783 :{INLINE_SPRITE}{02}{20}{00}{00} Gorillapuku STR_1784 :{INLINE_SPRITE}{03}{20}{00}{00} Lumimiespuku STR_1785 :{INLINE_SPRITE}{04}{20}{00}{00} Ritaripuku @@ -1173,7 +1175,7 @@ STR_1786 :{INLINE_SPRITE}{05}{20}{00}{00} Astronauttipuku STR_1787 :{INLINE_SPRITE}{06}{20}{00}{00} Rosvopuku STR_1788 :{INLINE_SPRITE}{07}{20}{00}{00} Seriffipuku STR_1789 :{INLINE_SPRITE}{08}{20}{00}{00} Merirosvopuku -STR_1790 :Valitse virka-asun väri tälle henkilöstön tyypille +STR_1790 :Valitse virka-asun väri tälle henkilöstötyypille STR_1791 :{WINDOW_COLOUR_2}Virka-asun väri: STR_1792 :Matkalla korjaamaan laitetta {STRINGID} STR_1793 :Matkalla tarkastamaan laitetta {STRINGID} @@ -1207,7 +1209,7 @@ STR_1821 :{WINDOW_COLOUR_2}Kävijät, jotka ajattelevat {SMALLFONT}{STRINGID} STR_1822 :{WINDOW_COLOUR_2}Kävijöiden ajatukset kohteesta {POP16}{STRINGID} STR_1823 :Näytä kävijöiden ajatukset tästä laitteesta/kohteesta STR_1824 :Näytä kävijät tässä laitteessa/kohteessa -STR_1825 :Näytä tähän laitteeseen/kohteesen jonottavat kävijät +STR_1825 :Näytä tähän laitteeseen/kohteeseen jonottavat kävijät STR_1826 :Tilanne STR_1827 :Suosio STR_1828 :Tyytyväisyys @@ -1272,7 +1274,7 @@ STR_1887 :{WINDOW_COLOUR_2}Viimeinen tarkastus: {BLACK}{COMMA16} minuuttia si STR_1888 :{WINDOW_COLOUR_2}Viimeinen tarkastus: {BLACK}yli 4 tuntia sitten STR_1889 :{WINDOW_COLOUR_2}Seisokit: {MOVE_X}{255}{BLACK}{COMMA16}% STR_1890 :Valitse kuinka usein mekaanikko tarkastaa tämän laitteen -STR_1891 :Puistossa ei vielä ole {STRINGID}! +STR_1891 :Puistossa ei ole vielä {STRINGID}! # The following two strings were used to display an error when the disc was missing. # This has been replaced in OpenRCT2. STR_1894 :{WINDOW_COLOUR_2}{STRINGID} myyty: {BLACK}{COMMA32} @@ -1280,10 +1282,10 @@ STR_1895 :Rakenna uusi laite/kohde STR_1896 :{WINDOW_COLOUR_2}Menot/tulot STR_1897 :{WINDOW_COLOUR_2}Laitteiden rakennus STR_1898 :{WINDOW_COLOUR_2}Laitteiden käyttökulut -STR_1899 :{WINDOW_COLOUR_2}Maanhankinnat +STR_1899 :{WINDOW_COLOUR_2}Maahankinnat STR_1900 :{WINDOW_COLOUR_2}Maisemointi STR_1901 :{WINDOW_COLOUR_2}Sisäänpääsyliput -STR_1902 :{WINDOW_COLOUR_2}Liput laitteisiin +STR_1902 :{WINDOW_COLOUR_2}Laiteliput STR_1903 :{WINDOW_COLOUR_2}Tavaramyynnit STR_1904 :{WINDOW_COLOUR_2}Tavarakulut STR_1905 :{WINDOW_COLOUR_2}Ruoka-/juomamyynnit @@ -1309,7 +1311,7 @@ STR_1925 :Henkilöä ei voi sijoittaa tähän… STR_1927 :{YELLOW}{STRINGID} on hajonnut STR_1928 :{RED}{STRINGID} on hajonnut! STR_1929 :{RED}Laitetta {STRINGID} ei vieläkään ole korjattu{NEWLINE}tarkista missä mekaanikkosi ovat ja pohdi niiden parempaa sijoittelua -STR_1930 :Laita kävijän seuranta päälle/pois - (kun seuranta on päällä, kävijän liikkeet raportoidaan viestialueelle) +STR_1930 :Kytke kävijän seuranta päälle/pois - (kun seuranta on päällä, kävijän liikkeet raportoidaan viestialueella) STR_1931 :{STRINGID} on jonottamassa laitteeseen {STRINGID} STR_1932 :{STRINGID} on laitteessa {STRINGID} STR_1933 :{STRINGID} on laitteessa {STRINGID} @@ -1324,13 +1326,13 @@ STR_1941 :Näytä missä laitteissa tämä kävijä on käynyt STR_1942 :Näytä kävijän taloustiedot STR_1943 :Näytä kävijän viimeiset ajatukset STR_1944 :Näytä mitä esineitä kävijä kantaa -STR_1945 :Näytä henkilöstön jäsenen ohjeet ja asetukset +STR_1945 :Näytä henkilöstön jäsenen tehtävät ja asetukset STR_1946 :Valitse puku viihdyttäjälle STR_1947 :Näytä valitun henkilöstötyypin partiointialueet ja etsi lähin henkilöstön jäsen STR_1948 :Palkkaa uusi henkilöstön jäsen STR_1949 :Taloudellinen yhteenveto STR_1950 :Talouskuvaaja -STR_1951 :Puiston arvokuvaaja +STR_1951 :Puiston arvo -kuvaaja STR_1952 :Tuottokuvaaja STR_1953 :Markkinointi STR_1954 :Kehityksen rahoitus @@ -1453,8 +1455,8 @@ STR_2070 :tyhjä rasia STR_2071 :tyhjä pullo STR_2072 :“{STRINGID}” -ilmapallo STR_2073 :“{STRINGID}” -pehmolelu -STR_2074 :{STRINGID}:n kartta -STR_2075 :Kuva {STRINGID}:sta +STR_2074 :{STRINGID} -puiston kartta +STR_2075 :Kuva laitteesta {STRINGID} STR_2076 :“{STRINGID}” -sateenvarjo STR_2077 :Juoma STR_2078 :Hampurilainen @@ -1587,12 +1589,12 @@ STR_2219 :{RED}{COMMA16} henkilöä on kuollut laitteen {STRINGID} onnettomuu STR_2220 :{WINDOW_COLOUR_2}Puiston taso: {BLACK}{COMMA16} STR_2221 :Puiston taso: {COMMA16} STR_2222 :{BLACK}{STRINGID} -STR_2223 :{WINDOW_COLOUR_2}Kävijöiden määrä: {BLACK}{COMMA32} +STR_2223 :{WINDOW_COLOUR_2}Kävijöitä puistossa: {BLACK}{COMMA32} STR_2224 :{WINDOW_COLOUR_2}Kassa: {BLACK}{CURRENCY2DP} STR_2225 :{WINDOW_COLOUR_2}Kassa: {RED}{CURRENCY2DP} STR_2226 :{WINDOW_COLOUR_2}Puiston arvo: {BLACK}{CURRENCY} STR_2227 :{WINDOW_COLOUR_2}Yrityksen arvo: {BLACK}{CURRENCY} -STR_2228 :{WINDOW_COLOUR_2}Viimekuun tulot ruoan, juomien ja{NEWLINE}tavaroiden myynnistä: {BLACK}{CURRENCY} +STR_2228 :{WINDOW_COLOUR_2}Viime kuun tulot ruoan, juomien ja{NEWLINE}tavaroiden myynnistä: {BLACK}{CURRENCY} STR_2229 :Nousu pystysuoraan STR_2230 :Pystysuora rata STR_2231 :Pidätysjarru pudotukseen @@ -1623,22 +1625,22 @@ STR_2255 :Vuoristoradat STR_2256 :Jännittävät laitteet STR_2257 :Vesilaitteet STR_2258 :Kojut -STR_2259 :Maisemointi & teemaus +STR_2259 :Maisemointi ja teemaus STR_2260 :Ei rahoitusta STR_2261 :Vähimmäisrahoitus STR_2262 :Normaali rahoitus STR_2263 :Täysrahoitus STR_2264 :Kehityksen rahoitus -STR_2265 :{WINDOW_COLOUR_2}Kustannus: {BLACK}{CURRENCY} kuukaudessa +STR_2265 :{WINDOW_COLOUR_2}Kustannus: {BLACK}{CURRENCY} per kuukausi STR_2266 :Kehityksen alueet STR_2267 :Paraikaa suunnitteilla -STR_2268 :Viimeisin kehitys +STR_2268 :Uusin luomus STR_2269 :{WINDOW_COLOUR_2}Tyyppi: {BLACK}{STRINGID} STR_2270 :{WINDOW_COLOUR_2}Edistys: {BLACK}{STRINGID} STR_2271 :{WINDOW_COLOUR_2}Odotettavissa: {BLACK}{STRINGID} -STR_2272 :{WINDOW_COLOUR_2}Laitteet/kohteet:{NEWLINE}{BLACK}{STRINGID} +STR_2272 :{WINDOW_COLOUR_2}Laite/kohde:{NEWLINE}{BLACK}{STRINGID} STR_2273 :{WINDOW_COLOUR_2}Maisemointi/teemaus:{NEWLINE}{BLACK}{STRINGID} -STR_2274 :Näytä tämän kehityksen yksityiskohdat +STR_2274 :Näytä tämän kehityksen tiedot STR_2275 :Näytä kehityksen rahoitus ja asetukset STR_2276 :Näytä kehityksen edistys STR_2277 :Tuntematon @@ -1660,8 +1662,8 @@ STR_2293 :{BLACK} Ei mitään STR_2294 :Vaihda pohjamaaston tyyliä STR_2295 :Vaihda pystysuorien seinämien tyyliä STR_2296 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} maksettu sisäänpääsystä -STR_2297 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} kulutettu {BLACK}{COMMA16} laitteessa -STR_2298 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} kulutettu {BLACK}{COMMA16} laitteessa +STR_2297 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} kulutettu {BLACK}{COMMA16} laitteeseen +STR_2298 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} kulutettu {BLACK}{COMMA16} laitteeseen STR_2299 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} kulutettu {BLACK}{COMMA16} ruokaan STR_2300 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} kulutettu {BLACK}{COMMA16} ruokaan STR_2301 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} kulutettu {BLACK}{COMMA16} juomaan @@ -1716,7 +1718,7 @@ STR_2354 :{WINDOW_COLOUR_2}Roskakoreja tyhjennetty: {BLACK}{COMMA32} STR_2355 :{WINDOW_COLOUR_2}Laitteita korjattu: {BLACK}{COMMA32} STR_2356 :{WINDOW_COLOUR_2}Laitteita tarkastettu: {BLACK}{COMMA32} STR_2358 :Yksiköt -STR_2359 :Oikeat arvot +STR_2359 :Aidot arvot STR_2360 :{WINDOW_COLOUR_2}Näytön tarkkuus: STR_2361 :Maaston pehmennys STR_2362 :Kytke maaston ruutujen pehmennys päälle/pois @@ -1727,10 +1729,10 @@ STR_2366 :Celsius (°C) STR_2367 :Fahrenheit (°F) STR_2368 :Ei mitään STR_2369 :Matala -STR_2370 :Tyydyttävä +STR_2370 :Keskiverto STR_2371 :Korkea STR_2372 :Matala -STR_2373 :Keski +STR_2373 :Keskiverto STR_2374 :Korkea STR_2375 :Todella korkea STR_2376 :Äärimmäinen @@ -1739,7 +1741,7 @@ STR_2378 :Säädä pienempää maa-aluetta STR_2379 :Säädä suurempaa maa-aluetta STR_2380 :Säädä pienempää vesialuetta STR_2381 :Säädä suurempaa vesialuetta -STR_2382 :Maa +STR_2382 :Maasto STR_2383 :Vesi STR_2384 :{WINDOW_COLOUR_2}Tavoitteesi: STR_2385 :{BLACK}Ei mitään @@ -1763,7 +1765,7 @@ STR_2402 :Rakenna 10 vuoristorataa STR_2403 :Kävijöiden määrä puistossa STR_2404 :Kuukausitulo laitteiden tuloista STR_2405 :Rakenna 10 vuoristorataa tietyssä ajassa -STR_2406 :Rakenna valmiiksi 5 vuoristorataa +STR_2406 :Viimeistele 5 vuoristorataa STR_2407 :Maksa laina pois ja saavuta tietty puiston arvo STR_2408 :Kuukausitulo ruoasta/kauppatavaroista STR_2409 :{WINDOW_COLOUR_2}Käynnissä olevat markkinointikampanjat @@ -1795,27 +1797,27 @@ STR_2436 :1 viikko STR_2443 :{WINDOW_COLOUR_2}Viikottainen kustannus: {BLACK}{CURRENCY2DP} STR_2444 :{WINDOW_COLOUR_2}Kokonaiskustannus: {BLACK}{CURRENCY2DP} STR_2445 :Aloita tämä markkinointikampanja -STR_2446 :{YELLOW}Markkinointikampanjasi ilmaiseen sisäänpääsyyn on päättynyt -STR_2447 :{YELLOW}Markkinointikampanjasi ilmaiseen pääsyyn laitteeseen {STRINGID} on päättynyt -STR_2448 :{YELLOW}Markkinointikampanjasi sisäänpääsyyn puoleen hintaan on päättynyt -STR_2449 :{YELLOW}Markkinointikampanjasi ilmaisia {STRINGID} varten on päättynyt +STR_2446 :{YELLOW}Markkinointikampanjasi ilmaisesta sisäänpääsystä on päättynyt +STR_2447 :{YELLOW}Markkinointikampanjasi ilmaisesta pääsystä laitteeseen {STRINGID} on päättynyt +STR_2448 :{YELLOW}Markkinointikampanjasi sisäänpääsystä puoleen hintaan on päättynyt +STR_2449 :{YELLOW}Markkinointikampanjasi ilmaisia {STRINGID} koskien on päättynyt STR_2450 :{YELLOW}Mainoskampanjasi puistolle on päättynyt STR_2451 :{YELLOW}Mainoskampanjasi laitteelle {STRINGID} on päättynyt STR_2452 :{WINDOW_COLOUR_2}Varat (miinus velka): {BLACK}{CURRENCY2DP} STR_2453 :{WINDOW_COLOUR_2}Varat (miinus velka): {RED}{CURRENCY2DP} STR_2454 :{BLACK}{CURRENCY2DP} - STR_2457 :Näytä taloustiedot -STR_2458 :Näytä kuvaaja rahan määrästä (miinus velka) ajan myötä -STR_2459 :Näytä kuvaaja puiston arvosta +STR_2458 :Näytä kuvaaja varoista (miinus velka) ajan myötä +STR_2459 :Näytä kuvaaja puiston arvosta ajan myötä STR_2460 :Näytä kuvaaja viikottaisesta tuotosta STR_2461 :Näytä markkinointikampanjat STR_2462 :Näytä puiston sisäänkäynti -STR_2463 :Näytä kuvaaja puiston tasosta -STR_2464 :Näytä kuvaaja kävijämääristä -STR_2465 :Näytä sisäänpääsyhinta ja -tiedot +STR_2463 :Näytä kuvaaja puiston tasosta ajan myötä +STR_2464 :Näytä kuvaaja kävijämääristä ajan myötä +STR_2465 :Näytä sisäänpääsymaksu ja -tiedot STR_2466 :Näytä puiston tilastot STR_2467 :Näytä pelin tavoitteet -STR_2468 :Näytä viimeiset palkinnot mitä tämä puisto on saanut +STR_2468 :Näytä uusimmat palkinnot mitä tämä puisto on saanut STR_2469 :Valitse kehityksen taso STR_2470 :Kehitä uusia kulkuvälineitä STR_2471 :Kehitä uusia lempeitä laitteita @@ -1823,7 +1825,7 @@ STR_2472 :Kehitä uusia vuoristoratoja STR_2473 :Kehitä uusia jännittäviä laitteita STR_2474 :Kehitä uusia vesilaitteita STR_2475 :Kehitä uusia kojuja -STR_2476 :Kehitä maisemointia ja teemausta +STR_2476 :Kehitä uusia maisemointeja ja teemauksia STR_2477 :Valitse tämän laitteen/kohteen toimintatila STR_2478 :Näytä nopeuden kuvaaja ajalle STR_2479 :Näytä korkeuden kuvaaja ajalle @@ -1832,7 +1834,7 @@ STR_2481 :Näytä poikittaisen kiihtyvyyden kuvaaja ajalle STR_2482 :Tuotto: {CURRENCY} viikossa, puiston arvo: {CURRENCY} STR_2483 :{WINDOW_COLOUR_2}Viikottainen tuotto: {BLACK}+{CURRENCY2DP} STR_2484 :{WINDOW_COLOUR_2}Viikottainen tuotto: {RED}{CURRENCY2DP} -STR_2487 :Näytä kävijöiden ”oikeat” nimet +STR_2487 :Käytä kävijöiden ”oikeita” nimiä STR_2488 :Vaihda kävijöiden nimen ja numeron näyttämisen välillä STR_2489 :Pikanäppäimet… STR_2490 :Näppäimistön pikanäppäimet @@ -1965,15 +1967,15 @@ STR_2749 :Uusi skenaario # New strings used in the cheats window previously these were ??? STR_2750 :Siirrä kaikki esineet ylös STR_2751 :Siirrä kaikki esineet alas -STR_2752 :Tyhjennä ruoho +STR_2752 :Nollaa ruoho STR_2753 :Leikkaa ruoho -STR_2754 :Kastele kasvit +STR_2754 :Elvytä puutarhat STR_2755 :Korjaa ilkivalta STR_2756 :Poista roskat STR_2763 :??? STR_2765 :Suuri raitiovaunu STR_2766 :Voita skenaario -STR_2767 :Jäädytä ilmasto +STR_2767 :Estä sään vaihtelut STR_2769 :Avaa puisto STR_2770 :Sulje puisto STR_2773 :Ikkunoitu @@ -1998,13 +2000,13 @@ STR_2790 :Anna nimi skenaariotaulukkoon STR_2791 :Anna nimi STR_2792 :Anna nimesi skenaariotaulukkoa varten: STR_2793 :(Suorittanut {STRINGID}) -STR_2794 :{WINDOW_COLOUR_2}Suorittanut: {BLACK}{STRINGID}{NEWLINE}{WINDOW_COLOUR_2}Yhtiön arvolla: {BLACK}{CURRENCY} +STR_2794 :{WINDOW_COLOUR_2}Suorittanut: {BLACK}{STRINGID}{NEWLINE}{WINDOW_COLOUR_2}Yhtiön arvo: {BLACK}{CURRENCY} STR_2795 :Järjestä STR_2796 :Järjestä laitelistaus valitun tietotyypin mukaan STR_2797 :Vieritä näkymää kun osoitin on näytön reunassa STR_2798 :Valitse vieritetäänkö näkymää kun osoitin on näytön reunassa STR_2799 :Näytä ja aseta näppäinasetukset -STR_2800 :{WINDOW_COLOUR_2}Sisäänpääsyt: {BLACK}{COMMA32} +STR_2800 :{WINDOW_COLOUR_2}Kävijöitä yhteensä: {BLACK}{COMMA32} STR_2801 :{WINDOW_COLOUR_2}Tulot sisäänpääsyistä: {BLACK}{CURRENCY2DP} STR_2802 :Kartta STR_2803 :Näytä nämä kävijät kartalla @@ -2017,7 +2019,7 @@ STR_2809 :{RED}Kävijät ovat nälkäisiä eivätkä löydä paikkaa josta sa STR_2810 :{RED}Kävijät ovat janoisia eivätkä löydä paikkaa josta saisi juotavaa STR_2811 :{RED}Kävijät valittavat etteivät löydä vessaa puistostasi STR_2812 :{RED}Kävijät eksyvät tai jäävät jumiin{NEWLINE}Tarkista polkuasettelusi, jotta kävijät löytävät tiensä paikasta toiseen -STR_2813 :{RED}Puiston sisäänpääsyhinta on liian korkea!{NEWLINE}Laske sisäänpääsyhintaa tai paranna puiston arvoa jotta puistosi houkuttelee enemmän kävijöitä +STR_2813 :{RED}Puiston sisäänpääsymaksu on liian kallis!{NEWLINE}Laske sisäänpääsymaksua tai paranna puiston arvoa jotta puistosi houkuttelee enemmän kävijöitä STR_2814 :{WINDOW_COLOUR_2}Sotkuisin puisto -palkinto STR_2815 :{WINDOW_COLOUR_2}Puhtain puisto -palkinto STR_2816 :{WINDOW_COLOUR_2}Parhaimmat vuoristoradat -palkinto @@ -2062,12 +2064,12 @@ STR_2854 :{RED}Kävijät eivät pääse laitteen {STRINGID} sisäänkäynnill STR_2855 :{RED}Laitteen {STRINGID} uloskäynnistä ei lähde polkua!{NEWLINE}Rakenna polku uloskäynniltä STR_2858 :Markkinointikampanjaa ei voi aloittaa… STR_2861 :{WINDOW_COLOUR_2}Lisensoinut Infogrames Interactive Inc. -STR_2971 :Pääväriskeema -STR_2972 :Vaihtoehtoinen väriskeema 1 -STR_2973 :Vaihtoehtoinen väriskeema 2 -STR_2974 :Vaihtoehtoinen väriskeema 3 -STR_2975 :Valitse mitä skeemaa haluat muokata tai käyttää maalaukseen -STR_2976 :Maalaa yksittäinen osa tätä laitetta valitulla väriskeemalla +STR_2971 :Ensisijainen värimalli +STR_2972 :Vaihtoehtoinen värimalli 1 +STR_2973 :Vaihtoehtoinen värimalli 2 +STR_2974 :Vaihtoehtoinen värimalli 3 +STR_2975 :Valitse mitä mallia haluat muokata tai käyttää maalaukseen +STR_2976 :Maalaa laitteen yksittäinen osa valitulla värimallilla STR_2977 :Henkilöstön jäsenen nimi STR_2978 :Anna tälle henkilöstön jäsenelle nimi: STR_2979 :Henkilöstön nimeäminen ei onnistu… @@ -2176,8 +2178,8 @@ STR_3131 :Peruuta STR_3132 :{BLACK}Klikkaa maisemointiesineitä valitaksesi ne ratamallin mukana tallennukseen… STR_3133 :Tätä ei voi rakentaa mäkeen STR_3134 :{RED}(Mallissa on maisemointeja joita ei ole saatavilla) -STR_3135 :{RED}(Vaunutyyppi ei saatavilla - tämä voi vaikuttaa laitteen suorituskykyyn) -STR_3136 :Varoitus: Tämä malli rakennetaan korvaavalla vaunutyypillä, joka saattaa vaikuttaa laitteen toimintaan +STR_3135 :{RED}(Ajoneuvotyyppi ei saatavilla - tämä voi vaikuttaa laitteen suorituskykyyn) +STR_3136 :Varoitus: Tämä malli rakennetaan korvaavalla ajoneuvotyypillä, joka saattaa vaikuttaa laitteen suorituskykyyn STR_3137 :Valitse lähistön maisemoinnit STR_3138 :Tyhjennä valinta STR_3139 :Nostomäki ei toimi tässä toimintatilassa @@ -2200,12 +2202,12 @@ STR_3174 :Tätä esinettä tarvitaan toisessa projektissa STR_3175 :Tätä esinettä tarvitaan aina STR_3176 :Tätä esinettä ei voi valita STR_3177 :Tämän esineen valintaa ei voi poistaa -STR_3179 :Ainakin yksi vaunutyyppi tai kohde-esine tulee olla valittuna +STR_3179 :Ainakin yksi ajoneuvotyyppi tai kohde-esine tulee olla valittuna STR_3180 :Virheellinen esineiden valinta STR_3181 :Esineiden valinta - {STRINGID} STR_3182 :Puiston sisäänkäynnin tyyli on valittava STR_3183 :Veden tyyppi on valittava -STR_3184 :Laitteiden vaunutyypit +STR_3184 :Laitteiden ajoneuvotyypit STR_3185 :Pienet maisemoinnit STR_3186 :Suuret maisemoinnit STR_3187 :Seinät/Aidat @@ -2260,27 +2262,27 @@ STR_3236 :Näytä kävijätiedot STR_3237 :Näytä puistotiedot STR_3238 :Ei rahaa STR_3239 :Tee tästä puistosta ”ei rahaa” -puisto, jolla ei ole mitään taloudellisia rajoitteita -STR_3240 :{WINDOW_COLOUR_2}Aloitusrahamäärä: -STR_3241 :{WINDOW_COLOUR_2}Aloituslaina: +STR_3240 :{WINDOW_COLOUR_2}Varat pelin alussa: +STR_3241 :{WINDOW_COLOUR_2}Laina pelin alussa: STR_3242 :{WINDOW_COLOUR_2}Enimmäislainamäärä: STR_3243 :{WINDOW_COLOUR_2}Vuosittaiskorko: STR_3244 :Kiellä markkinointikampanjat STR_3245 :Kiellä mainonta, myynninedistämiskeinot ja muut markkinointikampanjat STR_3246 :{WINDOW_COLOUR_2}{CURRENCY} STR_3247 :{WINDOW_COLOUR_2}{COMMA16}% -STR_3248 :Aloitusrahamäärää ei voi korottaa enempää! -STR_3249 :Aloitusrahamäärää ei voi laskea enempää! -STR_3250 :Aloituslainaa ei voi korottaa enempää! -STR_3251 :Aloituslainaa ei voi laskea enempää! +STR_3248 :Alkuvaroja ei voi korottaa enempää! +STR_3249 :Alkuvaroja ei voi laskea enempää! +STR_3250 :Alkulainaa ei voi korottaa enempää! +STR_3251 :Alkulainaa ei voi laskea enempää! 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 intensiivisiin laitteisiin -STR_3258 :Kävijät tykkäävät hurjemmista laitteista -STR_3259 :Valitse haluavatko kävijät mieluummin mennä vain intensiivisimpiin laitteisiin -STR_3260 :{WINDOW_COLOUR_2}Kävijöiden rahat (keskiarvo): +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ä: STR_3263 :{WINDOW_COLOUR_2}Kävijöiden alustava jano: @@ -2298,10 +2300,10 @@ STR_3274 :Tee puiston tason nostosta haastavampaa STR_3275 :Kävijöiden houkutuksen korkeampi vaikeusaste STR_3276 :Tee kävijöiden houkutuksesta puistoon haastavampaa STR_3277 :{WINDOW_COLOUR_2}Maan ostohinta: -STR_3278 :{WINDOW_COLOUR_2}Maan rakennusluvan hinta: +STR_3278 :{WINDOW_COLOUR_2}Rakennusluvan hinta: STR_3279 :Ilm. sisäänpääsy / maks. laitteet STR_3280 :Maks. sisäänpääsy / ilm. laitteet -STR_3281 :{WINDOW_COLOUR_2}Sisäänpääsyhinta: +STR_3281 :{WINDOW_COLOUR_2}Sisäänpääsymaksu: STR_3282 :Valitse tavoite ja puiston nimi STR_3283 :Valitse suojeltavat laitteet STR_3284 :Tavoitteen valinta @@ -2310,11 +2312,11 @@ STR_3286 :Valitse tavoite tälle skenaariolle STR_3287 :{WINDOW_COLOUR_2}Tavoite: STR_3288 :Valitse ilmasto STR_3289 :{WINDOW_COLOUR_2}Ilmasto: -STR_3290 :Kylmä ja märkä +STR_3290 :Kylmä ja sateinen STR_3291 :Lämmin STR_3292 :Kuuma ja kuiva STR_3293 :Kylmä -STR_3294 :Muuta… +STR_3294 :Vaihda… STR_3295 :Vaihda puiston nimi STR_3296 :Vaihda skenaarion nimi STR_3297 :Muuta skenaarion kuvausta @@ -2323,7 +2325,7 @@ STR_3299 :{WINDOW_COLOUR_2}Skenaarion kuvaus: STR_3300 :{WINDOW_COLOUR_2}Skenaarion nimi: {BLACK}{STRINGID} STR_3301 :{WINDOW_COLOUR_2}Tavoitepäivä: STR_3302 :{WINDOW_COLOUR_2}{MONTHYEAR} -STR_3303 :{WINDOW_COLOUR_2}Kävijöiden määrä: +STR_3303 :{WINDOW_COLOUR_2}Kävijöitä puistossa: STR_3304 :{WINDOW_COLOUR_2}Puiston arvo: STR_3305 :{WINDOW_COLOUR_2}Kuukausittainen tulo: STR_3306 :{WINDOW_COLOUR_2}Kuukausittainen tuotto: @@ -2345,16 +2347,16 @@ STR_3321 :Uudet esineet asennettu onnistuneesti STR_3322 :{WINDOW_COLOUR_2}Tavoite: {BLACK}{STRINGID} STR_3326 :{WINDOW_COLOUR_2}(ei kuvaa) STR_3327 :Ihmisten aloituspaikkaa ei ole määritetty -STR_3328 :Seuraavaan muokkaintilaan ei voi edetä… +STR_3328 :Seuraavaan vaiheeseen ei voi edetä… STR_3329 :Puiston sisäänkäyntiä ei ole vielä rakennettu STR_3330 :Puiston pitää omistaa edes jonkin verran maata -STR_3331 :Polku puiston sisäänkäynnistä tason reunalle on joko vaillinainen tai liian monimutkainen; polun tulee olla yhden tiilen levyinen ja mahdollisimman vähän risteyksiä ja käännöksiä +STR_3331 :Polku puiston sisäänkäynnistä tason reunalle on joko vaillinainen tai liian monimutkainen; polun tulee olla yhden ruudun levyinen ja mahdollisimman vähän risteyksiä ja käännöksiä STR_3332 :Puiston sisäänkäynti on väärin päin, tai siihen ei ole polkua tason reunalta STR_3333 :Liitä laajennusesineet tallennustiedostoihin STR_3334 :Valitse liitetäänkö tallennuksiin ja skenaariotiedostoihin laajennuksien esineiden lisätiedot (jota ei toimiteta tuotteen mukana), jotta tiedostot voidaan avata myös pelissä, jossa ei ole samoja esinetietoja -STR_3335 :Vuoristoratamuokkain - Valitse laitteen tyyppi ja vaunu +STR_3335 :Vuoristoratamuokkain - Valitse laitteen tyyppi ja ajoneuvo STR_3336 :Ratamallien hallinta - Valitse laitteen tyyppi -STR_3338 :{BLACK}Mukautettu rata +STR_3338 :{BLACK}Itserakennettava STR_3339 :{BLACK}{COMMA16} malli saatavilla, tai luo omasi STR_3340 :{BLACK}{COMMA16} mallia saatavilla, tai luo omasi STR_3341 :Pelityökalut @@ -2378,7 +2380,7 @@ STR_3358 :Ratamallia ei voi poistaa… STR_3359 :{BLACK}Ei yhtään tämän tyyppistä ratamallia STR_3360 :Varoitus! STR_3361 :Liian monta tämän tyyppistä mallia - joitain ei voida listata. -STR_3364 :Edistynyt +STR_3364 :Lisävalinnat STR_3365 :Salli yksittäisten maisemointiesineiden valinta maisemointiryhmien lisäksi STR_3366 :{BLACK}= Laite STR_3367 :{BLACK}= Ruokakoju @@ -2438,9 +2440,9 @@ STR_5147 :Huijaukset STR_5148 :Muuta pelin nopeus STR_5149 :Avaa huijausikkuna STR_5150 :Näytä virheenkorjaustyökalut -STR_5151 : +STR_5151 :  STR_5152 :, -STR_5153 :Muuta teemoja… +STR_5153 :Muokkaa teemoja… STR_5154 :Laitteistopiirto STR_5155 :Salli keskeneräisten ratojen testaus STR_5156 :Sallii useimpien laitetyyppien testauksen vaikka rata olisikin keskeneräinen. Ei koske lohkojarruihin perustuvia toimintatiloja. @@ -2465,8 +2467,8 @@ STR_5188 :Uusi kampanja STR_5189 :Kehitys STR_5190 :Kartta STR_5191 :Näkymä -STR_5192 :Viimeiset uutiset -STR_5193 :Maa +STR_5192 :Uusimmat uutiset +STR_5193 :Maasto STR_5194 :Vesi STR_5195 :Raivaa maisemointi STR_5196 :Maaoikeudet @@ -2474,7 +2476,7 @@ STR_5197 :Maisemointi STR_5198 :Polku STR_5199 :Laitteiden rakennus STR_5200 :Ratamallin sijainti -STR_5201 :Uusi laita +STR_5201 :Uusi laite STR_5202 :Ratamallin valinta STR_5203 :Laite STR_5204 :Laitelista @@ -2532,7 +2534,7 @@ STR_5257 :Luo uusi teema nykyisestä STR_5258 :Poista nykyinen teema STR_5259 :Uudelleennimeä nykyinen teema STR_5260 :Jättiruudunkaappaus -STR_5261 :Suodatin +STR_5261 :Suodata STR_5262 :Wacky Worlds STR_5263 :Time Twister STR_5264 :Mukautettu @@ -2545,7 +2547,7 @@ STR_5270 :Sekalaiset # again, twitch is a name, and can't be translated STR_5272 :Pienet maisemoinnit STR_5273 :Suuret maisemoinnit -STR_5274 :Polku +STR_5274 :Polut STR_5275 :Etsi esinettä STR_5276 :Anna etsittävän esineen nimi STR_5277 :Tyhjennä @@ -2609,7 +2611,7 @@ STR_5358 :{BLACK}Vessa: STR_5359 :Poista kävijät STR_5360 :Poista kaikki kävijät kartalta STR_5361 :Anna kaikille kävijöille: -STR_5362 :{BLACK}Aseta kävijöiden mieluisin intensiteetti: +STR_5362 :{BLACK}Aseta kävijöiden mieluisin jännitystaso: STR_5363 :Yli 1 STR_5364 :Alle 15 STR_5365 :{BLACK}Henkilöstön nopeus: @@ -2626,7 +2628,7 @@ STR_5404 :Nimi on jo olemassa STR_5440 :Pienennä kokonäyttötila kohdistuksen poistuessa STR_5442 :Pakota puiston taso: STR_5447 :Tyyppi {STRINGID} -STR_5448 :Laite / Vaunu {STRINGID} +STR_5448 :Laite / Ajoneuvo {STRINGID} STR_5449 :Vähennä pelin nopeutta STR_5450 :Lisää pelin nopeutta STR_5451 :Avaa huijausikkuna @@ -2682,7 +2684,7 @@ STR_5502 :Moninpeli STR_5503 :Anna isäntänimi tai IP-osoite: STR_5504 :Näytä moninpelin tilanne STR_5505 :Yhdistäminen ei onnistunut. -STR_5506 :Kävijät eivät piittaa intensiteetistä +STR_5506 :Kävijät eivät piittaa jännitystasosta STR_5510 :Oletusäänilaite STR_5511 :(TUNTEMATON) STR_5512 :Tallenna peli nimellä @@ -2697,10 +2699,10 @@ STR_5520 :Vaaleanvioletti STR_5521 :Kirkkaanvioletti STR_5522 :Tummansininen STR_5523 :Vaaleansininen -STR_5524 :Jäinensininen +STR_5524 :Jäisensininen STR_5525 :Sinivihreä STR_5526 :Akvamariini -STR_5527 :Kyllästettyvihreä +STR_5527 :Kyllästetynvihreä STR_5528 :Tummanvihreä STR_5529 :Sammaleenvihreä STR_5530 :Kirkkaanvihreä @@ -2712,14 +2714,14 @@ STR_5535 :Tummankeltainen STR_5536 :Vaaleanoranssi STR_5537 :Tummanoranssi STR_5538 :Vaaleanruskea -STR_5539 :Kyllästettyruskea +STR_5539 :Kyllästetynruskea STR_5540 :Tummanruskea -STR_5541 :Lohenvaaleanpunainen -STR_5542 :Bordeauxinpunainen +STR_5541 :Lohenpunainen +STR_5542 :Bordeaux’npunainen STR_5543 :Kyllästetynpunainen STR_5544 :Kirkkaanpunainen -STR_5545 :Tummanvaaleanpunainen -STR_5546 :Kirkasvaaleanpunainen +STR_5545 :Tummanpinkki +STR_5546 :Kirkkaanpinkki STR_5547 :Vaaleanpunainen STR_5548 :Näytä kaikki toimintatilat STR_5549 :vuosi/kuukausi/päivä @@ -2728,7 +2730,7 @@ STR_5551 :vuosi/päivä/kuukausi STR_5552 :{POP16}{POP16}Vuosi {COMMA16}, {PUSH16}{PUSH16}{PUSH16}{STRINGID} {MONTH}ta STR_5553 :Pysäytä peli kun Steam-yhteisönäkymä on auki STR_5554 :Ota vuorityökalu käyttöön -STR_5555 :Näytä muiden ratatyyppien vaunutyypit +STR_5555 :Näytä muiden ratatyyppien ajoneuvotyypit STR_5556 :Potkaise pelaaja STR_5557 :Pysy yhteydessä epätahdistuksessa (moninpeli) STR_5558 :Tämä asetus tulee voimaan vasta kun uudelleenkäynnistät OpenRCT2:n @@ -2798,8 +2800,8 @@ STR_5624 :Time Twister STR_5625 :“Oikeat” puistot STR_5626 :Muut puistot STR_5627 :Skenaarioiden ryhmitys: -STR_5628 :Lähdepeli -STR_5629 :Vaikeusaste +STR_5628 :Lähdepelin mukaan +STR_5629 :Vaikeusasteen mukaan STR_5630 :Edistyksen mukainen skenaarioiden avaus STR_5631 :Alkuperäiset DLC-puistot STR_5632 :Rakenna oma… @@ -2890,7 +2892,7 @@ STR_5755 :Väärä ohjelmistoversio (palvelimella on {STRING}) STR_5756 :Väärä salasana STR_5757 :Palvelin täynnä STR_5758 :{OUTLINE}{GREEN}{STRING} liittyi peliin -STR_5759 :Ladataan tasoa… ({INT32} / {INT32}) KiB +STR_5759 :Ladataan tasoa… STR_5760 :Hong Kongin dollari (HK$) STR_5761 :Uusi Taiwanin dollari (NT$) STR_5762 :Kiinan juan (CN¥) @@ -2919,14 +2921,14 @@ STR_5784 :{BLACK}Läpäise aiemmat skenaariot avataksesi tämän skenaarion. STR_5785 :Ryhmää ei voi uudelleennimetä… STR_5786 :Epäkelpo nimi ryhmälle STR_5787 :{COMMA32} pelaajaa linjoilla -STR_5788 :Tarkastusvälin oletus: +STR_5788 :Tarkastusvälin oletusarvo: STR_5789 :Poista salamatehoste STR_5790 :RCT1-tyylinen hinnoittelu päälle/pois{NEWLINE}(sekä laitteiden että sisäänpääsyn hinnat) STR_5791 :Asettaa kaikkien laitteiden luotettavuuden 100%:een ja niiden rakennuspäivämäärän täksi vuodeksi STR_5792 :Korjaa kaikki hajoutuneet laitteet STR_5793 :Nollaa laitteen törmäyshistorian, jotta kävijät eivät valita sen epäturvallisuudesta STR_5794 :Jotkut skenaariot estävät joidenkin laitteiden muokkauksen. Tämä huijaus poistaa nämä estot. -STR_5795 :Kävijät menevät kaikkiin puiston laitteisiin, vaikka intensiteetti olisi pilvissä +STR_5795 :Kävijät menevät kaikkiin puiston laitteisiin, vaikka jännitystaso olisi pilvissä STR_5796 :Pakottaa puiston avautumaan tai sulkeutumaan STR_5797 :Estää sään muutokset ja pysyttäytyy valitussa säätilassa STR_5798 :Sallii rakennustoiminnot pelin ollessa pysäytettynä @@ -2956,8 +2958,8 @@ STR_5822 :Näytä vuorokauden vaihtuminen. Yksi vuorokausi kestää yhden pel STR_5823 :Näytä bannerit isoilla kirjaimilla (kuten RCT1:ssä) STR_5824 :Älä näytä salamatehostetta ukkosmyrskyn aikana STR_5825 :Pidä hiiren osoitin ikkunan sisällä -STR_5826 :Käännä näkymän hiiren oikealla painikkeella raahauksen suunta -STR_5827 :Asettaa käyttöliittymän väriskeeman +STR_5826 :Peilaa näkymän raahauksen suunta +STR_5827 :Asettaa käyttöliittymän värimallin STR_5828 :Asettaa mitä mittayksiköitä käytetään pituuksiin, nopeuksiin, jne STR_5829 :Asettaa pelissä käytetyn valuutan. Lähinnä visuaalinen muutos, tarkkoja vaihtokursseja ei käytetä STR_5830 :Asettaa pelissä käytetyn kielen @@ -2994,9 +2996,9 @@ STR_5863 :Salli vain pelaajat joilla on tunnetut avaimet. STR_5864 :Tämä palvelin sallii vain hyväksyttyjen pelaajien liittyä. STR_5865 :Keskusteluloki STR_5866 :Kirjaa kaikki keskusteluviestit lokitiedostoihin käyttäjähakemistoosi. -STR_5867 :{WINDOW_COLOUR_2}Toimittajan nimi: {BLACK}{STRING} -STR_5868 :{WINDOW_COLOUR_2}Toimittajan s.posti: {BLACK}{STRING} -STR_5869 :{WINDOW_COLOUR_2}Toimittajan sivusto: {BLACK}{STRING} +STR_5867 :{WINDOW_COLOUR_2}Ylläpitäjän nimi: {BLACK}{STRING} +STR_5868 :{WINDOW_COLOUR_2}Ylläpitäjän s.posti: {BLACK}{STRING} +STR_5869 :{WINDOW_COLOUR_2}Ylläpitäjän sivusto: {BLACK}{STRING} STR_5870 :Näytä palvelimen tiedot STR_5871 :Estä kasvien kuihtuminen STR_5872 :Estää kasveja ikääntymästä jotta ne eivät kuihdu. @@ -3186,7 +3188,7 @@ STR_6057 :Näytä erillinen painike työkalupalkissa mykistystä varten STR_6058 :Mykistä STR_6059 :» STR_6060 :Näytä kävijöiden ostokset animaationa -STR_6061 :Näyttää animoiden rahatehosteen kun kävijät tekevät ostoksia. +STR_6061 :Näyttää animoidun rahatehosteen kun kävijät tekevät ostoksia. STR_6062 :{OUTLINE}{GREEN}+ {CURRENCY2DP} STR_6063 :{OUTLINE}{RED}- {CURRENCY2DP} STR_6064 :Omista kaikki maat @@ -3237,7 +3239,7 @@ STR_6113 :Korkea mutta kääntymätön vuoristorata isoilla pudotuksilla, kor STR_6115 :Jättimäiset moottoroidut nelivetoautot, jotka voivat kiivetä jyrkkiä mäkiä STR_6116 :Leveät vuoristoratajunat kiitävät sileän teräsradan ja moninaisten käännösten halki STR_6119 :Halpa ja helpporakenteinen, mutta korkeusrajoitteinen vuoristorata -STR_6120 :{BABYBLUE}Uusi vaunutyyppi saatavilla laitteelle {STRINGID}:{NEWLINE}{STRINGID} +STR_6120 :{BABYBLUE}Uusi ajoneuvotyyppi saatavilla laitteelle {STRINGID}:{NEWLINE}{STRINGID} STR_6121 :Jatkaa puiston maaoikeuksia tason reunoille saakka STR_6122 :Tässä skenaariossa ei ole tarpeeksi vuoristoratoja! STR_6123 :Virhe ladattaessa puiston esineitä @@ -3265,7 +3267,7 @@ STR_6144 :Näytä likaiset grafiikat STR_6145 :Aseta nopeusrajoitus tehostimille STR_6146 :Ota käyttöön kaikki piirrettävät rataosat STR_6147 :Ottaa rakennusikkunassa käyttöön kaikki rataosat joihin laitetyyppi kykenee, riippumatta siitä, tukeeko vaunut niitä. -STR_6148 :Yhdistää pääpalvelimelle… +STR_6148 :Yhdistetään pääpalvelimelle… STR_6149 :Pääpalvelimeen yhdistys ei onnistunut STR_6150 :Epäkelpo vastaus pääpalvelimelta (ei JSON-numeroa) STR_6151 :Pääpalvelin ei palauttanut palvelinlistaa @@ -3275,7 +3277,7 @@ STR_6154 :Turvasyistä ei ole suositeltavaa pelata OpenRCT2:a korotetuilla k STR_6155 :Sekä KDialog että Zenity eivät ole asennettuina. Ole hyvä ja asenna yksi, tai määritä komentoriviltä. STR_6156 :Nimi on varattu STR_6157 :Konsoli -STR_6160 :{WINDOW_COLOUR_2}Vaunutyypit saatavilla: {BLACK}{STRING} +STR_6160 :{WINDOW_COLOUR_2}Ajoneuvotyypit saatavilla: {BLACK}{STRING} STR_6161 :Maastoruudukko -kytkin STR_6162 :Pyörivä villihiiri STR_6163 :Hiiren muotoiset vaunut kiitävät tiukkojen mutkien ja lyhyiden pudotusten läpi, lempeästi pyörien matkustajien hämmennykseksi @@ -3315,7 +3317,7 @@ STR_6222 :Kävijöiden sisäänkäyntipistettä ei voi sijoittaa tähän… STR_6223 :Tulee olla puiston rajojen ulkopuolella! STR_6224 :{STRING} sijoitti kävijöiden sisäänkäyntipisteen. STR_6225 :Ei tuettu OpenGL-piirrossa -STR_6226 :Aikainen skenaarion voitto +STR_6226 :Ennenaikainen skenaarion voitto STR_6227 :Skenaario läväistään heti kun kaikki skenaarion tavoitteet ovat saavutettu ennen tavoitepäivämäärää. STR_6228 :Skenaarioasetukset STR_6229 :{WINDOW_COLOUR_2}{STRINGID}: {STRINGID} @@ -3332,7 +3334,7 @@ STR_6239 :Pystysuora leikkaus STR_6240 :Vaakasuora leikkaus STR_6241 :Valitse alue STR_6242 :Nollaa alue -STR_6243 :Kunnostaa laitteen kuin uudeksi +STR_6243 :Kunnosta laite uudenveroiseksi STR_6244 :Laitetta ei voi kunnostaa… STR_6245 :Laite ei tarvitse kunnostusta STR_6246 :Kunnosta @@ -3358,9 +3360,9 @@ STR_6268 :Etene seuraavaan hetkeen STR_6269 :Epäkelpo ilmastotunnus STR_6270 :Maastopinnat STR_6271 :Maastoreunat -STR_6272 :Asemat +STR_6272 :Asematyylit STR_6273 :Musiikki -STR_6274 :Väriskeemaa ei voi valita… +STR_6274 :Värimallia ei voi valita… STR_6275 :{WINDOW_COLOUR_2}Aseman tyyli: STR_6276 :{RED}Kävijät juuttuvat kohteeseen {STRINGID}, mahdollisesti väärän laitetyypin tai toimintatilan johdosta. STR_6277 :Aseman numero: {BLACK}{STRINGID} @@ -3384,7 +3386,7 @@ STR_6303 :Ladataan esinettä ({COMMA16} / {COMMA16}): [{STRING}] STR_6304 :Avaa maisemointivalitsin STR_6305 :Monisäikeisyys STR_6306 :Kokeellinen asetus, jossa piirtoon käytetään useampaa säiettä. Saattaa olla epävakaa. -STR_6307 :Väriskeema: {BLACK}{STRINGID} +STR_6307 :Värimalli: {BLACK}{STRINGID} STR_6308 :{TOPAZ}“{STRINGID}{OUTLINE}{TOPAZ}”{NEWLINE}{STRINGID} STR_6309 :Yhdistä uudelleen STR_6310 :{WINDOW_COLOUR_2}Sijainti: {BLACK}{INT32} {INT32} {INT32} @@ -3454,7 +3456,7 @@ STR_6374 :C STR_6375 :Tuntematon laite STR_6376 :{WINDOW_COLOUR_2}Vaunu:{NEWLINE}{BLACK}{STRINGID} laitteelle {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Tyyppi: {BLACK}{STRINGID} laitteelle {STRINGID} -STR_6378 :Vastaanotetaan esinelistaa: {INT32} / {INT32} +STR_6378 :Vastaanotetaan esinelistaa: STR_6379 :Vastaanotettiin epäkelpoja tietoja STR_6380 :Päivitys saatavilla! STR_6381 :Liity OpenRCT2:n Discordiin! @@ -3634,7 +3636,7 @@ STR_6554 :Kastanjanruskea STR_6555 :Koralli STR_6556 :Merenvihreä STR_6557 :Keltavihreä -STR_6558 :Sammalenvihreä +STR_6558 :Havunvihreä STR_6559 :Patinanvihreä STR_6560 :Limetinvihreä STR_6561 :Seepia @@ -3690,6 +3692,32 @@ STR_6610 :Polkuelementtiä ei löytynyt STR_6611 :Seinäelementtiä ei löytynyt STR_6612 :Bannerielementtiä ei löytynyt STR_6613 :Päivitä esine +STR_6614 :Sisäänpääsymaksua ei voi muuttaa +STR_6615 :Tässä ruudussa oleva rata tarvitsee vettä +STR_6616 :Toiminto ei sovellu tälle henkilöstötyypille +STR_6617 :Ruutuelementtiä ei voi vaihtaa itseensä +STR_6618 :Esineen rajoitusta ei voi muuttaa… +STR_6619 :Tätä esinetyyppiä ei voi rajoittaa! +STR_6620 :Esinettä ei löydy! +STR_6621 :Rajoita +STR_6622 :Rajoita esine käytettäväksi vain skenaariomuokkaimessa ja hiekkalaatikkotilassa. +STR_6623 :Komento ‘help’ näyttää listan komennoista. Komennolla ‘hide’ voi piilottaa konsolin. +STR_6624 :Ruututyökalu: Järjestä elementit +STR_6625 :Epäkelpo väri +STR_6626 :Animaatio on edestakaisin +STR_6627 :Radan nopeus on liian korkea! +STR_6628 :Voidaan sijoittaa vain polun reunalle! +STR_6629 :Aseta työkalupalkki keskelle +STR_6630 :Asettaa työkalupalkin painikkeet ruudun yläreunan keskiosaan. Perinteisesti painikkeet asettuvat oikeaan ja vasempaan yläkulmaan. +STR_6631 :Ladataan… +STR_6632 :Tarkistetaan esinetiedostoja… +STR_6633 :Tarkistetaan skenaariotiedostoja… +STR_6634 :Tarkistetaan ratamallitiedostoja… +STR_6635 :Tarkistetaan resurssipaketteja… +STR_6636 :Tarkistetaan valikkotaustoja… +STR_6637 :Ladataan valikkotaustaa… +STR_6638 :Suurennettu käyttöliittymä +STR_6639 :Kohentaa käyttöliittymän sopivuutta kosketusnäytöille ############# # Scenarios # @@ -3815,7 +3843,7 @@ STR_DTLS :Kehitä rannikkokallioista menestyvä huvipuisto STR_SCNR :Kolmen apinan puisto STR_PARK :Kolmen apinan puisto -STR_DTLS :Tämän laajan puisto keskellä on valtava kolmintaisteleva teräsvuoristorata +STR_DTLS :Tämän laajan puisto keskellä on valtava kolmintaisteleva teräksinen vuoristorata STR_SCNR :Kanariakaivokset @@ -4281,87 +4309,87 @@ STR_DTLS :Rakenna puuttuvat Six Flags -laitteet, tai tee omat luomuksesi puis ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Afrikka - Afrikkalainen timanttikaivos +STR_SCNR :Afrikan kaivokset STR_PARK :Afrikan kaivokset -STR_DTLS :Olet perinyt lopetetun timanttikaivoksen, ja löydät arvokkaan timantin. Päätät sijoittaa rahat maailmankuulun teemapuiston rakentamiseen. +STR_DTLS :Olet perinyt lakkautetun timanttikaivoksen, ja löydät arvokkaan timantin. Päätät sijoittaa myyntituotot maailmankuulun teemapuiston rakentamiseen. -STR_SCNR :Afrikka - Keidas +STR_SCNR :Kangastuskivaa STR_PARK :Kangastuskivaa STR_DTLS :Aavikosta on löydetty keidas, joka olisi loistava paikka huvipuistolle. Kuljetus keitaalle on jo hoidettu. -STR_SCNR :Afrikka - Victorian putoukset +STR_SCNR :Yli reunan STR_PARK :Yli reunan STR_DTLS :Juuri rakennettu pato tuottaa paljon halpaa vesivoimaa, jolla voi pyörittää huvipuistoa. Sinun täytyy nostaa puiston arvoa jotta voit maksaa takaisin padon rakennuslainan. -STR_SCNR :Etelämanner - Ekologinen pelastus +STR_SCNR :Jäinen seikkailu STR_PARK :Jäinen seikkailu STR_DTLS :Ympäristövirasto on kääntynyt puoleesi jotta vanhan öljynjalostamon rumilus voitaisiin muuttaa huippuluokan matkailukohteeksi. Maa on halpaa mutta lainakorot pilvissä. Voit myydä vanhat rakennukset. -STR_SCNR :Aasia - Kiinan muurin matkailuedistys +STR_SCNR :Kiinan muuri STR_PARK :Kiinan muuri -STR_DTLS :Viranomaiset ovat päättäneet kehittää muurin alueen matkailua rakentamalla teemapuisto viereiselle tontille. Rahoista viis! +STR_DTLS :Paikalliset viranomaiset ovat päättäneet kehittää muurin alueen matkailua rakentamalla teemapuiston naapuritontille. Maksoi mitä maksoi! -STR_SCNR :Aasia - Japanin rannikko +STR_SCNR :Okinawan ranta STR_PARK :Okinawan ranta -STR_DTLS :Rannikon puistolta on loppunut tila. Ainoa mahdollisuutesi on rakentaa mereen, joten olet ottanut lainan. Korkeusrajoitukset ovat voimassa perustojen ja maanjäristyksien takia. +STR_DTLS :Rannikon puistolta on loppunut tila. Ainoa mahdollisuutesi on rakentaa mereen, joten olet ottanut lainaa. Korkeusrajoitukset ovat voimassa perustojen ja maanjäristyksien takia. -STR_SCNR :Aasia - Maharajan palatsi -STR_PARK :Maharaja-puisto -STR_DTLS :Maharaja on käskenyt sinut tuomaan hupia ja viihdettä suurelle paikallisväestölle. Rakenna puisto Maharajan palatsin innoittamana. +STR_SCNR :Maharadža-puisto +STR_PARK :Maharadža-puisto +STR_DTLS :Maharadža on käskenyt sinut tuomaan hupia ja viihdettä runsaslukuiselle paikallisväestölle. Rakenna puisto maharadžan palatsin innoittamana. -STR_SCNR :Australaasia - Uluru +STR_SCNR :Uluru-seikkailu STR_PARK :Uluru-seikkailu -STR_DTLS :Autat aboriginaaleja rakentamaan puiston osana heidän kulttuurinedistämisohjelmaa. Sinun täytyy houkutella suuri määrä kävijöitä opettaaksesi heille aboriginaalien kulttuuriperintöä. +STR_DTLS :Auta aboriginaaleja rakentamaan puisto osana heidän kulttuurinedistämisohjelmaa. Sinun täytyy houkutella suuri määrä kävijöitä opettaaksesi heille aboriginaalien kulttuuriperintöä. -STR_SCNR :Australaasia - Rantakivaa +STR_SCNR :Rantakivaa STR_PARK :Rantakivaa STR_DTLS :Paikallisen yrittäjän akvaario on mennyt konkurssiin. Sinulla on jo pieni huvipuisto vastarannalla, ja ostat konkurssipesän rakennusyhtiöltä. Kehitä yksi yhtenäinen puisto. -STR_SCNR :Eurooppa - Euroopan kulttuurifestivaali +STR_SCNR :Euro-elämyksiä STR_PARK :Euro-elämyksiä STR_DTLS :Sinut on tuotu ottamaan haltuun yksi Euroopan kulttuurimatkakohteista, ja sinun tulee nostaa kävijämäärää jotta voit maksaa EU-tuen takaisin ennen Euroopan parlamentin vaalikauden loppua. -STR_SCNR :Eurooppa - Peruskorjaus +STR_SCNR :Tuhkista nousee STR_PARK :Tuhkista nousee STR_DTLS :Vanha puisto on päässyt ränsistymään. Saat Euroopan unionilta apurahaa tämän puutteellisen alueen kunnostamiseen! Sinun täytyy kunnostaa puisto ja maksaa apuraha takaisin. -STR_SCNR :Pohjois-Amerikka - Extreme-havaijilaissaari +STR_SCNR :Waikikileikki STR_PARK :Waikikileikki STR_DTLS :Havaijin ihmiset ovat tylsistyneitä surffaukseen, ja haluavat jotain jännittävämpää. Pidä tämä mielessä kun rakennat puistoa, joka ylläpitää alueen turistiluokitusta. -STR_SCNR :Pohjois-Amerikka - Grand Canyon +STR_SCNR :Kanjonikepposet STR_PARK :Kanjonikepposet STR_DTLS :Sinun tulee rakentaa puisto rajallisen kokoiselle alueelle tämän luonnon arteen molemmin puolin. Voit ostaa lisää tilaa naapurissa olevalta alkuperäiskansalta. Tavoitteen saavutus takaa paikalliskylän selviytymisen. -STR_SCNR :Pohjois-Amerikka - Vuoristoratojen mekka +STR_SCNR :Vuoristoratojen mekka STR_PARK :Vuoristoratojen mekka STR_DTLS :Olet menestyksekäs liikemies sapattivapaalla, ja haluat käyttää tämän ajan kaupunginpuiston muuttamiseksi vuoristoratojen mekaksi. Raha ei ole este! -STR_SCNR :Etelä-Amerikka - Inkojen kadonnut kaupunki +STR_SCNR :Kadonnut kaupunki STR_PARK :Kadonnut kaupunki STR_DTLS :Edistääksesi paikallista turismia, sinun tulee rakentaa puisto, joka on ympäristönsä kaltainen. -STR_SCNR :Etelä-Amerikka - Sademetsän tasanko +STR_SCNR :Sademetsän seikkailu STR_PARK :Sademetsän seikkailu STR_DTLS :Tila on niukassa tässä korvaamattomassa sademetsässä - sinun täytyy ahtaa mahdollisimman paljon jo raivattuun alueeseen, jotta paikalliselle puuteollisuudelle olisi kannattava vaihtoehto. -STR_SCNR :Etelä-Amerikka - Rion karnevaalit +STR_SCNR :Sokerileipärannikko STR_PARK :Sokerileipärannikko STR_DTLS :Johdat pientä puisto Rion läheisyydessä, mutta pankki vaatii lainan takaisinmaksua. Sinun täytyy pikaisesti nostaa tuottotasoa jotta voit maksaa tämän ennakoimattoman menoerän. @@ -4369,72 +4397,72 @@ STR_DTLS :Johdat pientä puisto Rion läheisyydessä, mutta pankki vaatii lai ## Time Twister Scenarios ############################################################################### -STR_SCNR :Keskiaika - Linna +STR_SCNR :Linnaranta STR_PARK :Linnaranta -STR_DTLS :Paikallinen historian elävöitysryhmä ottavat harrastuksensa aika tosissaan. He ovat luottaneet tämän rannikkolinnan käsiisi, jotta voit rakentaa uuden keskiajan teemapuiston. +STR_DTLS :Paikallinen historian elävöitysryhmä ottaa harrastuksensa aika tosissaan. He ovat luottaneet tämän rannikkolinnan käsiisi, jotta voit rakentaa uuden keskiajan teemapuiston. -STR_SCNR :Keskiaika - Robin Hood +STR_SCNR :Sherwoodin metsä STR_PARK :Sherwoodin metsä STR_DTLS :Vapauttaaksesi rahat rikkailta ja jakaaksesi ne köyhille, sinä ja iloiset veikkosi olette päättäneet rakentaa huvipuiston Sherwoodin metsään. -STR_SCNR :Tulevaisuus - Ensitapaaminen +STR_SCNR :Avaruusolentojen aukio STR_PARK :Avaruusolentojen aukio STR_DTLS :Kaukaisella planeetalla on sittenkin elämää! Rakenna avaruusolio-teemapuisto lyödäksesi rahoiksi tämän ennennäkemättömän kiinnostuksen ansiosta. -STR_SCNR :Tulevaisuus - Tulevaisuuden maailma +STR_SCNR :Kaksoskaupunki STR_PARK :Kaksoskaupunki STR_DTLS :Näytä kekseliäs utooppinen tulevaisuuden mielikuvasi - luo futuristinen puisto, jossa on kaikki huipputekniset laitteet. -STR_SCNR :Mytologia - Animatroninen filmistudio +STR_SCNR :Animatronian antia STR_PARK :Animatronian antia STR_DTLS :Sinulle on annettu tehtäväksi vanhan filmistudion paikalle rakennetun toimivan teemapuiston hoito ja laajennus. Rakenna kunnianosoitus niille stop motion -animaattoreille jotka toivat myyttiset hahmot ensi kertaa valkokankaalle. -STR_SCNR :Mytologia - Sivilisaation alku +STR_SCNR :Mytologian magiaa STR_PARK :Mytologian magiaa STR_DTLS :Omistat saaren jolla on jonkinlaista arkeologista arvoa. Olet päättänyt rahoittaa tämän kulttuuriperinnön suojelua rakentamalla alueen rikkaaseen mytologiaan perustuvan teemapuiston. -STR_SCNR :Esihistoria - Asteroidin jälkeen +STR_SCNR :Kraaterikivaa STR_PARK :Kraaterikivaa STR_DTLS :Omistat pölyisen meteorikraaterin. Bisneselämän tosimiehenä olet päättänyt rakentaa asteroidin teemapuiston ja muuntaa näennäisesti arvottoman maatilkkusi mittavaksi omaisuudeksi. -STR_SCNR :Esihistoria - Jurassinen safari +STR_SCNR :Vuoristosaurus STR_PARK :Vuoristosaurus STR_DTLS :Tehtävänäsi on rakentaa jurassisen kauden teemapuisto. Jotta kävijät pääsevät helposti näkemään eksoottisia kasveja ja eläimiä, sinun tulee rakentaa laitteita joilla pääsee laakson yli ja alle. -STR_SCNR :Esihistoria - Kivikausi +STR_SCNR :Kivikepposet STR_PARK :Kivikepposet STR_DTLS :Estääksesi maantien rakennuksen ja mystisten kivirenkaiden tuhoamisen, sinun pitää rakentaa kivikauden teemapuisto ja tehdä voittoa. Kävijöiden houkutus saattaa tosin olla vaikeaa, koska maasto ei ole kovin vieraanvaraista. -STR_SCNR :Kuohuva 20-luku - Vankisaari +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :Surullisenkuuluisa Vankisaari - joka oli muinoin tupaten täynnä trokareita ja gangstereita - on nyt myynnissä. Olet päättänyt muodostaa siitä korkean luokan matkailukohteen, eikä rahalla ole niinkään väliä. -STR_SCNR :Kuohuva 20-luku - Schneider-kilvat +STR_SCNR :Schneiderrannat STR_PARK :Schneiderrannat STR_DTLS :Isoisäsi Schneider-nopeuskisan voitosta tulee kohta 75 vuotta täyteen. Kunnioita hänen saavutustaan rakentamalla teemapuisto tämän maineikkaan vesilentokonekilvan ympärille. -STR_SCNR :Kuohuva 20-luku - Pilvenpiirtäjät +STR_SCNR :Metropoli STR_PARK :Metropoli STR_DTLS :Omistat tyhjän tontin pienasutusalueen vieressä. 20-luvun art deco -arkkitehtuurin innoittamana rakenna pilvenpiirtäjien teemapuisto puristaaksesi kaupunkitontistasi viimeisetkin tuoton pisarat. -STR_SCNR :Rock ’n’ roll - Kukkavoimaa +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Suuri vuosittainen musiikkifestivaali järjestetään maillasi. Rakenna tajuntaa laajentava huvipuisto vapaamielisen yleisön viihdyttämiseen. -STR_SCNR :Rock ’n’ roll - Rock ’n’ roll +STR_SCNR :Rock ’n’ rollin kukoistus STR_PARK :Rock ’n’ rollin kukoistus STR_DTLS :Tämä vanha huvipuisto on nähnyt parempia päiviä. Auta sen omistajaa antamalla sille retron rock ’n’ roll -muodonmuutoksen, joka tekee puistosta menestyksekkään viihdekeskuksen. @@ -4522,7 +4550,7 @@ STR_DTLS :Äiti rakensi tämän dioraaman joulukuusen alle. Nyt hän haluaa s STR_SCNR :Jättikiven jytky STR_PARK :Jättikiven jytky -STR_DTLS :Jättikiven Kaivokset Oy:n räjähdysonnettomuuden jälkeen Jättikiven kylän asukkaat ovat rakentaneet huvipuiston kylänsä elinkeinoksi.{NEWLINE}Tekijät: rbarclay & buckone +STR_DTLS :Jättikiven Kaivokset Oy:n räjähdysonnettomuuden jälkeen Jättikiven kylän asukkaat ovat rakentaneet huvipuiston kylänsä elinkeinoksi.{NEWLINE}Tekijät: rbarclay ja buckone STR_SCNR :Matkijalinnun leiri @@ -4542,7 +4570,7 @@ STR_DTLS :Lohikäärmesaaret? En ole varma, haluanko mennä sinne…{NEWLINE} STR_SCNR :Kakarakarnevaali II STR_PARK :Kakarakarnevaali -STR_DTLS :Hei muksut! Pidetään hauskaa!{NEWLINE}Tekijät: Piehead & Fossil +STR_DTLS :Hei muksut! Pidetään hauskaa!{NEWLINE}Tekijät: Piehead ja Fossil STR_SCNR :Hiekkadyyni diff --git a/data/language/fr-FR.txt b/data/language/fr-FR.txt index e70314aa0b..16190eac9d 100644 --- a/data/language/fr-FR.txt +++ b/data/language/fr-FR.txt @@ -100,6 +100,7 @@ STR_0093 :Montagnes russes hybrides STR_0094 :Montagnes russes à rail unique STR_0095 :Montagnes russes alpines STR_0096 :Montagnes russes en bois classiques +STR_0097 :Montagnes russes debout classiques STR_0512 :Des voitures individuelles descendent des pentes régulières en virage STR_0513 :Grand huit que les passagers parcourent debout STR_0514 :Des voitures suspendues sous la voie se balancent dans les virages des montagnes russes @@ -183,6 +184,7 @@ STR_0603 :Train de montagnes russes en bois avec des rails en acier, permetta STR_0604 :Les passagers parcourent une voie à rail unique dans des voitures mono-places, à travers des inversions et des virages serrés STR_0605 :Les passagers dévalent une voie en acier sinueuse, freinant pour contrôler leur vitesse STR_0606 :Une montagne russe en bois au style ancien, rapide et turbulente, avec de nombreux moments en suspension, quelques forces latérales et conçues pour paraître hors de contrôle +STR_0607 :Les passagers parcourent debout une montagne russe en acier intense au style ancien, ponctuée d’inversions STR_0767 :Visiteur {INT32} STR_0768 :Agent d’entretien {INT32} STR_0769 :Mécanicien {INT32} @@ -2002,7 +2004,7 @@ STR_2793 :(Réussi par {STRINGID}) STR_2794 :{WINDOW_COLOUR_2}Réussi par : {BLACK}{STRINGID}{NEWLINE}{WINDOW_COLOUR_2} avec une valeur de société de : {BLACK}{CURRENCY} STR_2795 :Trier STR_2796 :Trie la liste des attractions dans l’ordre avec le type d’informations affiché -STR_2797 :Défiler la vue quand le curseur atteint le bord de l’écran +STR_2797 :Défiler la vue quand le curseur est au bord de l’écran STR_2798 :Fait défiler la vue quand le curseur atteint le bord de l’écran STR_2799 :Voir ou modifier les touches de raccourci STR_2800 :{WINDOW_COLOUR_2}Nombre total d’entrées : {BLACK}{COMMA32} @@ -2892,7 +2894,7 @@ STR_5755 :Mauvaise version du programme (le serveur utilise {STRING}) STR_5756 :Mauvais mot de passe STR_5757 :Serveur plein STR_5758 :{OUTLINE}{GREEN}{STRING} a rejoint la partie -STR_5759 :Téléchargement de la carte… ({INT32}/{INT32} Kio) +STR_5759 :Téléchargement de la carte… STR_5760 :Dollars de Hong Kong (HK$) STR_5761 :Nouveau Dollar Taïwanais (NT$) STR_5762 :Yuan Chinois (CN¥) @@ -3456,7 +3458,7 @@ STR_6374 :C STR_6375 :Attraction inconnue STR_6376 :{WINDOW_COLOUR_2}Véhicule : {NEWLINE}{BLACK}{STRINGID} pour {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Type : {BLACK}{STRINGID} pour {STRINGID} -STR_6378 :Réception de la liste des objets : {INT32} / {INT32} +STR_6378 :Réception de la liste des objets : STR_6379 :Donnée(s) invalide(s) reçues STR_6380 :Mise à jour disponible ! STR_6381 :Rejoindre le Discord d’OpenRCT2 ! @@ -3700,6 +3702,26 @@ STR_6619 :Ce type d’objet ne peut pas être restreint ! STR_6620 :Objet introuvable ! STR_6621 :Restreindre STR_6622 :Restreint l’objet à l’éditeur de scénario et au mode bac à sable +STR_6623 :Tapez « help » pour une liste des commandes disponibles. Tapez « hide » pour cacher la console. +STR_6624 :Inspecteur de cases : Trier les éléments +STR_6625 :Couleur invalide +STR_6626 :L’animation est retournée +STR_6627 :Vitesse de voie trop élevée ! +STR_6628 :Ne peut être placé que sur le bord des allées ! +STR_6629 :Centrer les boutons de la barre d’outils +STR_6630 :Ce réglage aligne horizontalement les boutons de la barre d’outil au centre de l’écran, au lieu de les répartir à gauche et à droite +STR_6631 :Chargement… +STR_6632 :Vérification des fichiers d’objet… +STR_6633 :Vérification des fichiers de scénario… +STR_6634 :Vérification des fichiers de conception de voie… +STR_6635 :Vérification des packs de ressources… +STR_6636 :Vérification des séquences titre… +STR_6637 :Chargement de la séquence titre… +STR_6638 :Interface agrandie +STR_6639 :Adapte l’interface à un usage tactile + +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} Kio) ############# # Scenarios # @@ -4280,87 +4302,87 @@ STR_DTLS :Construisez les attractions Six Flags manquantes ou créez vos prop ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Afrique — La mine de diamants +STR_SCNR :Mines d’Afrique STR_PARK :Mines d’Afrique STR_DTLS :Vous héritez d’une mine de diamants désaffectée et découvrez un diamant de grande valeur. Vous décidez d’investir cet argent dans la construction d’un parc à thème de renommée mondiale. -STR_SCNR :Afrique — L’oasis +STR_SCNR :Mirage fou STR_PARK :Mirage fou STR_DTLS :Une oasis offrant le cadre idéal pour un parc a été découverte dans le désert. Des moyens de transport ont été fournis. -STR_SCNR :Afrique — Chutes Victoria +STR_SCNR :Amortir la chute STR_PARK :Amortir la chute STR_DTLS :Un barrage offrant suffisamment de puissance hydroélectrique à faible coût pour la création d’un parc a été construit. Votre but est d’obtenir une haute rentabilité pour rembourser l’emprunt du barrage. -STR_SCNR :Antarctique — Sauvetage écologique +STR_SCNR :Aventures glacées STR_PARK :Aventures glacées STR_DTLS :L’agence pour l’environnement vous charge de transformer une vieille raffinerie de pétrole en attraction touristique de premier ordre. Le terrain n’est pas cher mais l’intérêt sur l’emprunt est élevé. Vous pouvez vendre les équipements. -STR_SCNR :Asie — Développement de la Grande Muraille +STR_SCNR :Grande Muraille de Chine STR_PARK :Grande Muraille de Chine STR_DTLS :Les autorités ont décidé d’accroître le tourisme dans les environs de la Grande Muraille en construisant un parc à thème sur les terrains environnants. Aucune restriction financière. -STR_SCNR :Asie — A la conquête de l’océan +STR_SCNR :Côte Okinawa STR_PARK :Côte Okinawa STR_DTLS :L’un de vos parcs au Japon ne peut plus s’étendre. Une seule possibilité : construire sur la mer. Vous contractez un emprunt et devez respecter des restrictions de hauteur en raison du risque de tremblement de terre. -STR_SCNR :Asia — Le palais du maharajah +STR_SCNR :Parc Maharajah STR_PARK :Parc Maharajah STR_DTLS :Le maharajah vous a chargé de divertir la nombreuse population locale. Construisez un parc inspiré du palais du maharajah. -STR_SCNR :Océanie — Ayers Rock +STR_SCNR :L’aventure aborigène STR_PARK :L’aventure aborigène STR_DTLS :Vous aidez les Aborigènes à construire un parc s’inscrivant dans un programme de sensibilisation culturelle. Vous devez toucher un large public et l’intéresser au patrimoine authentique des Aborigènes. -STR_SCNR :Océanie — Fun at the Beach +STR_SCNR :Attractions sous les tropiques STR_PARK :Attractions sous les tropiques STR_DTLS :Le parc maritime d’un entrepreneur local fait faillite. Vous êtes à la tête d’un petit parc et devez trouver les fonds nécessaires au rachat de l’autre parc. Vous y parviendrez en visant la création d’un immense parc combiné. -STR_SCNR :Europe — Le festival culturel européen +STR_SCNR :L’extravagance européenne STR_PARK :L’extravagance européenne STR_DTLS :Vous avez été choisi pour reprendre un parc d’attractions culturel européen et devez augmenter sa fréquentation pour pouvoir rembourser les subventions européennes à la fin du mandat parlementaire européen. -STR_SCNR :Europe — Rénovation +STR_SCNR :La Renaissance STR_PARK :La Renaissance STR_DTLS :Un ancien parc est tombé en ruines. Vous recevez une subvention de l’Union Européenne pour rendre à cette zone défavorisée sa gloire passée. Vous devez rénover le parc et rembourser la subvention. -STR_SCNR :Amérique du Nord — Hawaii extrême +STR_SCNR :C’est parti Waikiki ! STR_PARK :C’est parti Waikiki ! STR_DTLS :Les habitants de Hawaii en ont assez de surfer et cherche des sensations plus fortes. Vous devez construire un parc qui les satisfera et qui garantira l’attrait touristique de la zone. -STR_SCNR :Amérique du Nord — Le Grand Canyon +STR_SCNR :Pas de faille possible STR_PARK :Pas de faille possible STR_DTLS :Vous devez construire un parc à étendue limitée de chaque côté de ce cadeau de la nature. Vous pouvez acheter les terres avoisinantes aux Indiens locaux. Vous devez remplir cet objectif pour maintenir le nombre d’habitants dans la ville. -STR_SCNR :Amérique du Nord — Le parc de vos rêves +STR_SCNR :Le paradis des montagnes russes STR_PARK :Le paradis des montagnes russes STR_DTLS :Vous êtes un businessman accompli en période sabbatique de 4 ans, désirant construire un parc sans la moindre restriction financière. -STR_SCNR :Amérique du Sud — La cité inca +STR_SCNR :Les aventuriers de la cité perdue STR_PARK :Les aventuriers de la cité perdue STR_DTLS :Pour dynamiser encore plus le tourisme local vous devez construire un parc en harmonie avec son environnement. -STR_SCNR :Amérique du Sud — La forêt équatoriale +STR_SCNR :La forêt en folie STR_PARK :La forêt en folie STR_DTLS :L’espace est limité dans la précieuse forêt équatoriale : vous devez entasser les éléments autant que vous pouvez dans la clairière déjà existante, de manière à fournir une alternative à l’industrie sylvestre locale. -STR_SCNR :Amérique du Sud — Le carnaval de Rio +STR_SCNR :Au pied du pain de sucre STR_PARK :Au pied du pain de sucre STR_DTLS :Vous dirigez un petit parc près de Rio, mais la banque a demandé le remboursement de votre prêt. Vous devez rapidement augmenter votre rentabilité pour rembourser cette dette inattendue. @@ -4368,72 +4390,72 @@ STR_DTLS :Vous dirigez un petit parc près de Rio, mais la banque a demandé ## Time Twister Scenarios ############################################################################### -STR_SCNR :Moyen Âge — Château +STR_SCNR :Château en bord de falaise STR_PARK :Château en bord de falaise STR_DTLS :Les sociétaires d’une association de reconstitution de combats médiévaux prennent leur activité très au sérieux. Ils vous ont chargé de construire un parc sur le thème du Moyen Âge sur les terres d’un château en bord de falaise. -STR_SCNR :Moyen Âge — Robin des Bois +STR_SCNR :Forêt de Sherwood STR_PARK :Forêt de Sherwood STR_DTLS :Pour voler l’argent des riches et le donner aux pauvres, vos joyeux compères et vous-même avez décidé de construire un parc dans la forêt de Sherwood. -STR_SCNR :Futur — Rencontre du 3e type +STR_SCNR :Extravagance extraterrestre STR_PARK :Extravagance extraterrestre STR_DTLS :Une forme de vie a été découverte sur une autre planète. Construisez un parc sur le thème des extraterrestres pour engranger un maximum de profits. -STR_SCNR :Futur — Le monde du futur +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Faites preuve de créativité et laissez parler vos talents de visionnaire en construisant un parc futuriste proposant des attractions du dernier cri. -STR_SCNR :Mythologique — Automates de films +STR_SCNR :Automates de l’Antiquité STR_PARK :Automates de l’Antiquité STR_DTLS :Vous êtes chargé(e) de rénover et d’exploiter un parc déjà existant, construit à partir d’un ancien décor de cinéma. Rendez hommage aux pionniers de l’animation d’automates qui ont donné vie à des créatures mythiques dans les salles obscures. -STR_SCNR :Mythologique — Berceau de la civilisation +STR_SCNR :Folie mythologique STR_PARK :Folie mythologique STR_DTLS :Vous possédez une île contenant des trésors archéologiques. Vous avez décidé d’en financer la préservation en construisant un parc sur le thème des richesses mythologiques du site. -STR_SCNR :Préhistorique — Après l’astéroïde +STR_SCNR :Cratère en folie STR_PARK :Cratère en folie STR_DTLS :Vous possédez un vieux cratère météoritique poussiéreux. Avec l’esprit d’entreprise qui vous caractérise, vous avez décidé de construire un parc sur le thème des astéroïdes et de rendre cet endroit rentable. -STR_SCNR :Préhistorique — Safari jurassique +STR_SCNR :Le retour des dinosaures STR_PARK :Le retour des dinosaures STR_DTLS :Vous êtes chargé(e) de construire un parc sur le thème du jurassique. Pour optimiser l’accès des visiteurs aux plantes exotiques et aux exhibitions d’animaux, vous allez devoir construire des montagnes russes parcourant la vallée. -STR_SCNR :Préhistorique — L’âge de pierre +STR_SCNR :Promenade rocailleuse STR_PARK :Promenade rocailleuse STR_DTLS :Pour concurrencer les promoteurs d’autoroutes et préserver la beauté du site, vous devrez construire un parc sur le thème de l’âge de pierre et le rentabiliser. Attirer les visiteurs ne sera pas facile dans un contexte aussi inhospitalier. -STR_SCNR :Les années folles — Le Rocher +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :La fameuse prison, autrefois remplie de trafiquants et de racketteurs, est aujourd’hui à vendre. Vous avez décidé de la transformer en attraction touristique, sans restriction financière. -STR_SCNR :Les années folles — La Coupe Schneider +STR_SCNR :Course d’hydravions STR_PARK :Course d’hydravions STR_DTLS :Dans quelques années, ce sera le 75e anniversaire de la victoire de votre grand-père dans la Coupe Schneider. Vous allez lui rendre hommage en construisant un parc sur le thème de cette course légendaire d’hydravions. -STR_SCNR :Les années folles — Gratte-ciel +STR_SCNR :Métropolis STR_PARK :Métropolis STR_DTLS :Vous possédez un terrain nu dans les faubourgs de la ville. Pour en tirer un maximum de revenus, construisez un parc sur le thème des gratte-ciel en vous inspirant de l’architecture art déco des années folles. -STR_SCNR :Rock & Roll — Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Un grand festival de musique se tient sur votre terrain chaque année. Construisez un parc sur le thème du mouvement hippie qui satisfera les amateurs du genre. -STR_SCNR :Rock & Roll — Rock & Roll +STR_SCNR :La renaissance du Rock & Roll STR_PARK :La renaissance du Rock & Roll STR_DTLS :Ce parc sur le thème du Rock & Roll a connu son heure de gloire. Aidez son propriétaire à le réaménager et à lui donner un second souffle. diff --git a/data/language/hu-HU.txt b/data/language/hu-HU.txt index c8da5d4e67..3cd13eec9b 100644 --- a/data/language/hu-HU.txt +++ b/data/language/hu-HU.txt @@ -280,7 +280,7 @@ STR_0884 :Táj betöltése STR_0885 :Táj mentése STR_0887 :Kilépés a pályaszerkesztőből STR_0888 :Kilépés a játéktervezőből -STR_0889 :Kilépés a játékterv-kezelőből +STR_0889 :Kilépés a játéktervkezelőből STR_0891 :Képmentés STR_0892 :A képernyő elmentve ’{STRINGID}’ néven STR_0893 :A képmentés sikertelen ! @@ -2224,7 +2224,7 @@ STR_3204 :Beállítások kiválasztása STR_3205 :Cél kiválasztása STR_3206 :Pálya mentése STR_3207 :Játéktervező -STR_3208 :Játékterv-kezelő +STR_3208 :Játéktervkezelő STR_3209 :Vissza az előző lépésre: STR_3210 :Tovább a következő lépésre: STR_3211 :Térkép mérete: @@ -2349,7 +2349,7 @@ STR_3332 :A parkbejárat rossz irányba néz, vagy nem vezet tőle út a tér STR_3333 :Egyedi objektumok exportálása a mentett játékokkal STR_3334 :Válaszd ki, hogy mentésre kerüljenek-e szükséges hozzáadott egyedi objektumok adatai (a játékhoz nem mellékelt kiegészítő adatok) a mentett játékok vagy pályák fájlaiban, hogy azok is betölthessék őket, akik nem rendelkeznek a hozzáadott objektumok adataival STR_3335 :Játéktervező - Válaszd ki a játék típusát és a járműveket -STR_3336 :Játékterv-kezelő - Válaszd ki a játék típusát +STR_3336 :Játéktervkezelő - Válaszd ki a játék típusát STR_3338 :{BLACK}Egyedi tervezés STR_3339 :{BLACK}{COMMA16} terv érhető el, vagy egyedi tervezés STR_3340 :{BLACK}{COMMA16} terv érhető el, vagy egyedi tervezés @@ -2357,7 +2357,7 @@ STR_3341 :Játékeszközök STR_3342 :Pályaszerkesztő STR_3343 :Mentett játék pályává alakítása STR_3344 :Játéktervező -STR_3345 :Játékterv-kezelő +STR_3345 :Játéktervkezelő STR_3346 :A játékterv nem menthető el… STR_3347 :A játék túl nagy, túl sok elemből áll, vagy a díszlet túl kiterjedt STR_3348 :Átnevezés @@ -2484,8 +2484,8 @@ STR_5211 :Találmányok listája STR_5212 :Pályabeállítások STR_5213 :Cél beállítások STR_5214 :Térkép generálása -STR_5215 :Játékterv-kezelő -STR_5216 :Játékterv-kezelő lista +STR_5215 :Játéktervkezelő +STR_5216 :Játéktervkezelő lista STR_5217 :Csalások STR_5218 :Témák STR_5219 :Beállítások @@ -2885,7 +2885,7 @@ STR_5755 :Hibás szoftververzió (A szerver ezt használja: {STRING}) STR_5756 :Hibás jelszó STR_5757 :A szerver megtelt STR_5758 :{OUTLINE}{GREEN}{STRING} csatlakozott a játékhoz -STR_5759 :Térkép letöltése … ({INT32} / {INT32}) KiB +STR_5759 :Térkép letöltése … STR_5760 :Hongkongi dollár (HK$) STR_5761 :Tajvani új dollár (NT$) STR_5762 :Kínai jüan (CN¥) @@ -2972,7 +2972,7 @@ STR_5843 :A pályák fokozatos feloldásának engedélyezése (RCT1-beli vise STR_5844 :Tartsa fenn a kapcsolatot a többjátékos{NEWLINE}szerverrel akkor is, ha szinkronizációs vagy egyéb hiba jelentkezik STR_5845 :Hozzáadja a hibakereső{NEWLINE}eszközök gombját az eszköztárhoz.{NEWLINE}Engedélyezi a fejlesztői konzol gyorsbillentyűjét STR_5846 :Az OpenRCT2 milyen gyakran mentsen automatikusan -STR_5847 :A címképernyőn használt parkjelenetek kiválasztása.{NEWLINE}Az RCT1/2-ből származó címképernyős jelenetek működéséhez importált pályák szükségesek +STR_5847 :A címképernyőn használt parkjelenetek kiválasztása.{NEWLINE}Az RCT1/2-ből származó nyitójelenetek működéséhez importált pályák szükségesek STR_5849 :Az újonnan felvett alkalmazottak{NEWLINE}automatikus lerakása STR_5851 :Az alapértelmezett vizsgálati időköz megadása{NEWLINE}újonnan épített játékokhoz STR_5853 :A hanghatások be- és kikapcsolása @@ -3278,7 +3278,7 @@ STR_6164 :{WHITE}❌ STR_6165 :Vertikális szinkron STR_6166 :A megjelenített képkockákat a kijelző frissítési gyakoriságához igazítja, így megakadályozza a kép szétcsúszását. STR_6167 :Haladó -STR_6168 :Címképernyős jelenetek +STR_6168 :Nyitójelenetek STR_6169 :Pályaválasztás STR_6170 :Felület finomhangolása STR_6171 :Keresés @@ -3449,7 +3449,7 @@ STR_6374 :K STR_6375 :Ismeretlen játék STR_6376 :{WINDOW_COLOUR_2}Jármű egy játékhoz:{NEWLINE}{BLACK}{STRINGID} a(z) {STRINGID} számára STR_6377 :{WINDOW_COLOUR_2}Típus: {BLACK}{STRINGID} a(z) {STRINGID} számára -STR_6378 :Objektumlista fogadása: {INT32} / {INT32} +STR_6378 :Objektumlista fogadása: STR_6379 :Érvénytelen adatok érkeztek STR_6380 :Frissítés érhető el! STR_6381 :Csatlakozz az OpenRCT2 Discord-hoz! @@ -3590,12 +3590,12 @@ STR_6516 :Egy vagy több hozzáadott objektum RollerCoaster Tycoon 1 összeka STR_6517 :Egy vagy több objektum ebben a parkban RollerCoaster Tycoon 1 összekapcsolást igényel a megfelelő megjelenítéshez. Tartalékképek lesznek használva. STR_6518 :{BLACK}Vidd az egeret egy pálya fölé a leírás és a cél megtekintéséhez. Kattints rá a játék elindításához. STR_6519 :Extrák -STR_6520 :Asset csomagok +STR_6520 :Forráscsomagok STR_6521 :Alacsony prioritás STR_6522 :Magas prioritás -STR_6523 :A kiválasztott asset csomag prioritásának csökkentése. -STR_6524 :A kiválasztott asset csomag prioritásának növelése. -STR_6525 :A játék összes assetjének újratöltése az engedélyezett asset csomagokkal. +STR_6523 :A kiválasztott forráscsomag prioritásának csökkentése. +STR_6524 :A kiválasztott forráscsomag prioritásának növelése. +STR_6525 :A játék összes forráscsomagjának újratöltése az engedélyezett forráscsomagokkal. STR_6526 :(alap grafika, zene és hangeffektek) STR_6527 :Versenyek STR_6528 :Érvénytelen pályaparaméterek! @@ -3688,7 +3688,7 @@ STR_6614 :Nem változtatható meg a park belépési díja STR_6615 :A pályának ezen a mezőn vízre van szüksége STR_6616 :Az adott személyzettípus számára érvénytelen akció STR_6617 :Nem lehet önmagával cserélni mezőelemet -STR_6618 :Nem lehet korlátozni vagy feloldani az objektumot... +STR_6618 :Nem lehet korlátozni vagy feloldani az objektumot… STR_6619 :Az objektumtípus nem korlátozható! STR_6620 :Az objektum nem található! STR_6621 :Korlátozás @@ -3698,6 +3698,24 @@ STR_6624 :Mezővizsgáló: Elemek rendezése STR_6625 :Érvénytelen szín STR_6626 :Az animáció tükrözött STR_6627 :Túl nagy a pálya sebessége! +STR_6628 :Csak az utak szélein helyezhető el! +STR_6629 :Eszköztár gombjainak vízszintes középre igazítása +STR_6630 :Ez a beállítás az eszköztár gombjait vízszintesen a képernyő közepére igazítja. A hagyományos elrendezés a bal és jobb sarokban helyezi el őket. +STR_6631 :Betöltés… +STR_6632 :Objektumfájlok ellenőrzése… +STR_6633 :Pályafájlok ellenőrzése… +STR_6634 :Játéktervfájlok ellenőrzése… +STR_6635 :Forráscsomagok ellenőrzése… +STR_6636 :Nyitójelenetek ellenőrzése… +STR_6637 :Nyitójelenet betöltése… +STR_6638 :Nagyított felhasználói felület +STR_6639 :Módosítja a felületet, hogy megfelelőbb legyen érintőképernyős használathoz +STR_6640 :Forráscsomagok kezelése… +STR_6641 :Betöltés/előrehaladás ablak +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Érintőképernyős javítások +STR_6645 :Néhány UI-elemet nagyobbá tesz, hogy könnyebb legyen kattintani vagy megérinteni őket. ############# # Scenarios # @@ -4278,87 +4296,87 @@ STR_DTLS :Építsd meg a hiányzó Six Flags játékokat, vagy készíts saj ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Afrika - Afrikai gyémántbánya +STR_SCNR :Afrikai Bányák STR_PARK :Afrikai Bányák STR_DTLS :Egy elhagyatott gyémántbányát örököltél, és találtál egy értékes gyémántot. Úgy döntesz, hogy ezt a pénzt egy világhírű vidámpark építésébe fekteted. -STR_SCNR :Afrika - Oázis +STR_SCNR :Délibábos Őrület STR_PARK :Délibábos Őrület STR_DTLS :Felfedeztek egy sivatagi oázist, amely gyönyörű helyszínt biztosítana egy parknak. Az oázisba való eljutás biztosított. -STR_SCNR :Afrika - Viktória-vízesés +STR_SCNR :A Szakadék Szélén STR_PARK :A Szakadék Szélén STR_DTLS :Egy gát épült, amely bőséges és olcsó vízenergiát kínál a park működtetéséhez. Magas parkértéket kell elérned, hogy segítsen visszafizetni a gátra felvett kölcsönt. -STR_SCNR :Antarktisz - Ökológiai mentés +STR_SCNR :Jeges Kalandok STR_PARK :Jeges Kalandok STR_DTLS :A környezetvédelmi ügynökség rád bízta, hogy egy ökológiára káros régi olajfinomítót alakíts át első osztályú turisztikai látványossággá. A föld olcsó, de a hitelkamatok magasak. Az öreg épületeket értékesítheted újrahasznosítási célokra. -STR_SCNR :Ázsia - Kínai Nagy Fal turizmusfejlesztés +STR_SCNR :Kínai Nagy Fal STR_PARK :Kínai Nagy Fal STR_DTLS :A hatóságok úgy döntöttek, hogy a Nagy Fal körüli turizmus élénkítésére egy vidámparkot építenek a szomszédos területen. A pénz nem számít! -STR_SCNR :Ázsia - Japán partvidék visszaszerzése +STR_SCNR :Okinawa Partjai STR_PARK :Okinawa Partjai STR_DTLS :Egy már meglévő park kifogyott a területből. Az egyetlen lehetőséged a tenger felé történő bővítés, ehhez pedig kölcsönt kell felvenned. Az épületekre vonatkozó magassági korlátozások a talapzatok és az esetleges földrengési kockázatok miatt vannak érvényben. -STR_SCNR :Ázsia - Maharadzsa Palota +STR_SCNR :Maharadzsa Park STR_PARK :Maharadzsa Park STR_DTLS :A maharadzsa megbízott, hogy szórakoztasd a nagyszámú helyi lakosságot. Építs egy parkot, amelyet a maharadzsa palotája ihletett. -STR_SCNR :Ausztrálázsia - Ayers Rock +STR_SCNR :Ayers Kaland STR_PARK :Ayers Kaland STR_DTLS :Segítesz az aborigineknek egy parkot építeni egy kulturális tudatossági program részeként. Rengeteg vendéget kell szerezned, hogy megismertesd velük az aborigin nép egyedülálló örökségét. -STR_SCNR :Ausztrálázsia - Móka a tengerparton +STR_SCNR :Tengerparti Grillparti STR_PARK :Tengerparti Grillparti STR_DTLS :Egy helyi vállalkozó tengeri élményparkja tönkrement. Már üzemeltetsz egy kis parkot, és megveszed a másik parkot az építővállalattól. Alakíts ki egy nagy, összekapcsolt parkot. -STR_SCNR :Európa - Európai Kulturális Fesztivál +STR_SCNR :Európai Extravagancia STR_PARK :Európai Extravagancia STR_DTLS :Felkértek, hogy vegyél át egy európai kulturális látványosságot, és növelned kell a vendégszámot, hogy a jelenlegi európai parlamenti ciklus végéig visszafizethesd az EU-támogatást. -STR_SCNR :Európa - Felújítás +STR_SCNR :Hamvakból STR_PARK :Hamvakból STR_DTLS :Egy régi park leromlott állapotba került. Elnyersz egy európai uniós támogatást, hogy ez a lepusztult terület újra régi fényében tündökölhessen! Fel kell újítanod a parkot, és vissza kell fizetned a támogatást. -STR_SCNR :Észak-Amerika - Extrém Hawaii-sziget +STR_SCNR :Veszett Waikiki STR_PARK :Veszett Waikiki STR_DTLS :Hawaii lakói már unják a szörfözést, és valami intenzívebbet keresnek. Erre tekintettel kell parkot építened, hogy a terület turisztikai vonzereje magasan maradjon. -STR_SCNR :Észak-Amerika - Grand Canyon +STR_SCNR :Kanyon Kalamajkák STR_PARK :Kanyon Kalamajkák STR_DTLS :Egy parkot kell építened a természeti kincs mindkét oldalán, de korlátozott a rendelkezésre álló terület - lehetőséged van a szomszédos területek megvásárlására az őslakos amerikai indiánoktól. El kell érned a célt, hogy fenntartsd a helyi város lakosságát. -STR_SCNR :Észak-Amerika - Hullámvasút Paradicsom +STR_SCNR :Hullámvasút Paradicsom STR_PARK :Hullámvasút Paradicsom STR_DTLS :Egy sikeres iparmágnás vagy, aki hosszú szabadságon van, és ezt az időt arra szeretné felhasználni, hogy a városi parkot hullámvasút paradicsommá alakítsa át. A pénz nem számít! -STR_SCNR :Dél-Amerika - Inka elveszett város +STR_SCNR :Elveszett Város Alapító STR_PARK :Elveszett Város Alapító STR_DTLS :A helyi turizmus további fellendítése érdekében egy olyan parkot kell létrehoznod, amely harmonizál a környezetével. -STR_SCNR :Dél-Amerika - Esőerdei fennsík +STR_SCNR :Esőerdei Kaland STR_PARK :Esőerdei Kaland STR_DTLS :A tér korlátozott az értékes esőerdőben - mindent be kell zsúfolnod a meglévő tisztásra, hogy életképes alternatívát nyújthass a helyi faiparnak. -STR_SCNR :Dél-Amerika - Riói karnevál +STR_SCNR :Cukorsüveg-part STR_PARK :Cukorsüveg-part STR_DTLS :Egy kis parkot üzemeltetsz Rio mellett, de a bank felmondta a hiteledet. Gyorsan növelned kell a jövedelemtermelő képességedet, hogy vissza tudd fizetni ezt a váratlan adósságot. @@ -4366,72 +4384,72 @@ STR_DTLS :Egy kis parkot üzemeltetsz Rio mellett, de a bank felmondta a hite ## Time Twister Scenarios ############################################################################### -STR_SCNR :Sötét középkor - Vár +STR_SCNR :Sziklaoldali Vár STR_PARK :Sziklaoldali Vár STR_DTLS :A hagyományörző egyesület helyi tagjai komolyan veszik az emlékcsatákat. Rád bízták a feladatot, hogy építs egy sötét középkor témájú parkot a Sziklaoldali Vár területén. -STR_SCNR :Sötét középkor - Robin Hood +STR_SCNR :Sherwoodi Erdő STR_PARK :Sherwoodi Erdő STR_DTLS :Hogy a gazdagoktól elvegyétek a vagyonukat és szétosszátok az elesettek között, te és a Vidám Fiúk úgy döntöttetek, hogy vidámparkot építetek Sherwood erdejében. -STR_SCNR :Jövő - Első találkozások +STR_SCNR :Földönkívüli Felhajtás STR_PARK :Földönkívüli Felhajtás STR_DTLS :Életet fedeztek egy távoli bolygón. Építs egy űrlény témájú parkot, hogy megtollasodhass a példátlan érdeklődésnek köszönhetően. -STR_SCNR :Jövő - Jövőbeli Világ +STR_SCNR :Gemini Város STR_PARK :Gemini Város STR_DTLS :Mutass egy újszerű, utópisztikus jövőképet - találj ki egy futurisztikus parktervet, amely magában foglalja a legmodernebb látványosságokat. -STR_SCNR :Mitológiai - Animatronikus filmdíszletek +STR_SCNR :Animatronikus Mókák STR_PARK :Animatronikus Mókák STR_DTLS :Egy már létező vidámpark vezetését és fejlesztését kaptad feladatul, amely egy régi film díszleteire épült. Építs egy emlékművet az úttörő stop-motion animátoroknak, akik először keltettek életre mitikus lényeket a mozivásznon. -STR_SCNR :Mitológiai - A civilizáció bölcsője +STR_SCNR :Mitológiai Őrület STR_PARK :Mitológiai Őrület STR_DTLS :Egy különleges régészeti értékkel bíró sziget tulajdonosa vagy. Úgy döntöttél, hogy finanszírozod a megőrzését egy vidámpark létrehozásával, amely az terület gazdag mitológiai örökségére épül. -STR_SCNR :Őskor - Az aszteroida után +STR_SCNR :Kráter Káosz STR_PARK :Kráter Káosz STR_DTLS :Egy poros, régi meteoritkráter tulajdonosa vagy. Az igazi vállalkozói szellem jegyében úgy döntöttél, hogy egy aszteroida témájú parkot építesz, és a látszólag értéktelen területedet egy nagyobb vagyonná alakítod. -STR_SCNR :Őskor - Jura kori szafari +STR_SCNR :Vasútszaurusz STR_PARK :Vasútszaurusz STR_DTLS :Azt a feladatot kaptad, hogy építs egy jura kori vidámparkot. Ahhoz, hogy a látogatók optimálisan közelíthessék meg az egzotikus növény- és állatkiállításokat, a völgy fölé és a völgybe vezető hullámvasutakat kell építened. -STR_SCNR :Őskor - Kőkorszak +STR_SCNR :Sziklás Túrák STR_PARK :Sziklás Túrák STR_DTLS :Hogy megakadályozd az autópálya-építőket és megőrizd a titokzatos ősi kőköröket, egy kőkorszaki vidámparkot kell építened, és nyereséget termelned. A látogatók vonzása azonban kihívást jelenthet, mivel a terep kissé barátságtalan. -STR_SCNR :Dübörgő húszas évek - Börtönsziget +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :A hírhedt börtönsziget - amelynek lakossága egykor szeszcsempészektől és zsarolóktól duzzadt - most eladó. Úgy döntöttél, hogy turisztikai látványossággá alakítod át, és a pénz nem számít. -STR_SCNR :Dübörgő húszas évek - Schneider-kupa +STR_SCNR :Schneider-part STR_PARK :Schneider-part STR_DTLS :Néhány év múlva lesz nagyapád Schneider-kupa győzelmének 75. évfordulója. Azzal tisztelegsz a teljesítménye előtt, hogy egy vidámparkot építesz a híres vízi repülős versenyről mintázva. -STR_SCNR :Dübörgő húszas évek - Felhőkarcolók +STR_SCNR :Metropolisz STR_PARK :Metropolisz STR_DTLS :Egy üres telek tulajdonosa vagy a város alacsonyabb részéhez közel. Hogy a legtöbbet hozd ki városi ingatlanodból, építs egy felhőkarcoló témájú parkot, amelyet a húszas évek szárnyaló art deco építészete ihletett. -STR_SCNR :Rock ‘n’ Roll - Virágbéke +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Évente megrendezésre kerül egy nagyszabású zenei fesztivál a területeden. Építs egy menő vidámparkot, hogy szórakoztasd a szabad szellemű közönséget. -STR_SCNR :Rock ‘n’ Roll - Rock ‘n’ Roll +STR_SCNR :Rock ‘n’ Roll Újjáéledés STR_PARK :Rock ‘n’ Roll Újjáéledés STR_DTLS :Ez az idős park egykor jobb napokat látott. Segíts a tulajdonosnak a retró rock 'n' roll stílusú átalakításban, hogy a hely sikeres szórakozóhellyé váljon. @@ -4534,7 +4552,7 @@ STR_DTLS :Anyu! Apu! Sihuhu városba akarok menni!{NEWLINE}Szerző: Fossil STR_SCNR :Sárkány-szigetek STR_PARK :Sárkány-szigetek -STR_DTLS :Sárkány-szigetek? Nem biztos, hogy oda akarok menni...{NEWLINE}Szerző: Fossil +STR_DTLS :Sárkány-szigetek? Nem biztos, hogy oda akarok menni…{NEWLINE}Szerző: Fossil STR_SCNR :Kölyökkarnevál II diff --git a/data/language/it-IT.txt b/data/language/it-IT.txt index 2874c430f3..391e8d0f3d 100644 --- a/data/language/it-IT.txt +++ b/data/language/it-IT.txt @@ -98,6 +98,7 @@ STR_0093 :Ottovolante ibrido STR_0094 :Ottovolante a binario singolo STR_0095 :Ottovolante Alpino STR_0096 :Ottovolante di legno classico +STR_0097 :Ottovolante in piedi classico STR_0512 :Un ottovolante compatto con una salita a spirale e cadute fluide e tortuose. STR_0513 :Un ottovolante con giro della morte dove i passeggeri si trovano in una posizione eretta STR_0514 :I treni, sospesi sotto l’ottovolante, durante le curve oscillano lateralmente @@ -181,6 +182,7 @@ STR_0603 :Un ottovolante in legno con i binari in acciaio, in grado di avere STR_0604 :I visitatori viaggiano lungo un sottile tracciato da monorotaia, attraverso strette inversioni e cambi di direzione. STR_0605 :I visitatori scendono lungo una rotaia piena di curve, frenando per controllare la velocità del loro vagone STR_0606 :Un ottovolante di legno vecchio stile con un percorso veloce e turbolento, con molto air-time, G laterali, progettato per farti sentire “fuori controllo” +STR_0607 :Un intenso ottovolante d’acciaio vecchio stile, nel quale i passeggeri sono in posizione eretta STR_0767 :Visitatore {INT32} STR_0768 :Tuttofare {INT32} STR_0769 :Meccanico {INT32} @@ -2889,7 +2891,7 @@ STR_5755 :Versione del software errata (il server usa {STRING}) STR_5756 :Password errata STR_5757 :Server pieno STR_5758 :{OUTLINE}{GREEN}{STRING} è entrato in gioco -STR_5759 :Scaricamento mappa … ({INT32} / {INT32}) KiB +STR_5759 :Scaricamento mappa … STR_5760 :Dollari di Hong Kong (HK$) STR_5761 :Nuovi dollari taiwanesi (NT$) STR_5762 :Yuan cinesi (CN¥) @@ -3453,7 +3455,7 @@ STR_6374 :M STR_6375 :Attrazione sconosciuta STR_6376 :{WINDOW_COLOUR_2}Veicolo attrazione:{NEWLINE}{BLACK}{STRINGID} per {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Tipo: {BLACK}{STRINGID} per {STRINGID} -STR_6378 :Scaricamento lista oggetti: {INT32} / {INT32} +STR_6378 :Scaricamento lista oggetti: STR_6379 :Ricevuti dati non validi STR_6380 :Aggiornamento disponibile! STR_6381 :Unisciti al Discord di OpenRCT2! @@ -3693,6 +3695,34 @@ STR_6614 :Non è possibile modificare il prezzo di ingresso STR_6615 :Il tracciato su questa cella necessita acqua STR_6616 :Azione non valida per quel tipo di staff STR_6617 :Non è possibile scambiare l’elemento della cella con sé stesso +STR_6618 :Impossibile cambiare la limitazione dell’oggetto… +STR_6619 :Il tipo di oggetto non può essere sottoposto a limitazione! +STR_6620 :Oggetto non trovato! +STR_6621 :Limitato +STR_6622 :Limita l’oggetto all’editor degli scenari e alla modalità sandbox +STR_6623 :Digita ‘help’ per una lista dei comandi disponibili. Digita ‘hide’ per nascondere la console. +STR_6624 :Analizzatore celle: ordina elementi +STR_6625 :Colore non valido +STR_6626 :L’animazione è invertita +STR_6627 :Velocità percorso troppo alta! +STR_6628 :Può essere posizionato solo sui bordi dei sentieri! +STR_6629 :Allinea barra degli strumenti al centro +STR_6630 :Questa impostazione allinea orizzontalmente i bottoni della barra degli strumenti al centro dello schermo. L’allineamento tradizionale è negli angoli a sinistra e a destra. +STR_6631 :Caricamento… +STR_6632 :Verifica file degli oggetti… +STR_6633 :Verifica file degli scenari… +STR_6634 :Verifica file dei modelli di percorsi… +STR_6635 :Verifica pacchetti di risorse… +STR_6636 :Verifica sequenze del titolo… +STR_6637 :Caricamento sequenze del titolo… +STR_6638 :UI ingrandita +STR_6639 :Modifica l’interfaccia per renderla più adatta a schermi touch +STR_6640 :Modifica pacchetti di risorse… +STR_6641 :Finestra caricamento/progresso +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Migliorie touch +STR_6645 :Rende alcuni elementi della UI più grandi per renderli più semplici da cliccare o premere. ############# @@ -4285,87 +4315,87 @@ STR_DTLS :Costruisci le attrazioni Six Flags mancanti o crea dei progetti tut ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - Miniera di diamanti +STR_SCNR :Miniere africane STR_PARK :Miniere africane STR_DTLS :Hai ereditato una miniera di diamanti abbandonata, da cui è stato estratto l’ultimo prezioso diamante. Decidi di investire il ricavato per creare un parco che diventi famoso in tutto il mondo. -STR_SCNR :Africa - Oasi +STR_SCNR :Il miraggio STR_PARK :Il miraggio STR_DTLS :Nel deserto è stata scoperta un’oasi che costituirebbe una splendida ambientazione per un parco. I mezzi di trasporto per raggiungerla esistono già. -STR_SCNR :Africa - Cascate Vittoria +STR_SCNR :Tuffo nel vuoto STR_PARK :Tuffo nel vuoto STR_DTLS :È stata costruita una diga che eroga energia idroelettrica a basso prezzo e in quantità, con la quale è possibile alimentare un parco. Per rimborsare il prestito della diga, dovrai creare un parco di grande valore. -STR_SCNR :Antartide - Recupero ecologico +STR_SCNR :Avventure fra i ghiacci STR_PARK :Avventure fra i ghiacci STR_DTLS :L’agenzia dei servizi ambientali si è rivolta a te per trasformare una vecchia raffineria, vero pugno nell’occhio, in rinomata attrazione turistica. La terra costa poco ma l’interesse sui prestiti è alto. Puoi vendere i vecchi edifici. -STR_SCNR :Asia - Turismo alla Grande Muraglia +STR_SCNR :La Grande Muraglia Cinese STR_PARK :La Grande Muraglia Cinese STR_DTLS :Le autorità hanno deciso di promuovere il turismo presso la Grande Muraglia costruendo un parco a tema nei paraggi. I soldi non sono un problema -STR_SCNR :Asia - Sfruttamento costiero in Giappone +STR_SCNR :Costa di Okinawa STR_PARK :Costa di Okinawa STR_DTLS :Un parco esistente ha esaurito lo spazio a sua disposizione. L’unica possibilità è costruire in mare aperto e per riuscirci hai chiesto un prestito. Le limitazioni di altezza sono piuttosto restrittive, a causa del terreno cedevole. -STR_SCNR :Asia - Palazzo del Maragià +STR_SCNR :Il parco del Maragià STR_PARK :Il parco del Maragià STR_DTLS :Il Maragià ti ha incaricato di creare qualcosa che intrattenga la vasta popolazione locale. Costruisci un parco ispirato al palazzo del Maragià. -STR_SCNR :Australia - Ayers Rock +STR_SCNR :Avventura all’Ayers STR_PARK :Avventura all’Ayers STR_DTLS :Nell’ambito di un programma di rivalutazione culturale, stai aiutando gli aborigeni a creare un parco. Devi attrarre un numero elevato di visitatori per trasmettergli l’eredità culturale degli aborigeni. -STR_SCNR :Australia - Divertimento in spiaggia +STR_SCNR :Barbecue balneare STR_PARK :Barbecue balneare STR_DTLS :Il parco marino di un imprenditore locale è fallito. Tu possiedi già un piccolo parco e per comprare l’altro devi trovare dei soldi, sviluppando poi entrambi in una grossa struttura combinata. -STR_SCNR :Europa - Festival culturale europeo +STR_SCNR :Festival europeo STR_PARK :Festival europeo STR_DTLS :Ti è stato chiesto di gestire una grande attrazione culturale europea. Devi incrementare il numero di visite per ripagare i sussidi UE prima che scada il termine stabilito dal Parlamento Europeo. -STR_SCNR :Europa - Rinnovo +STR_SCNR :Rinascita dalle ceneri STR_PARK :Rinascita dalle ceneri STR_DTLS :Un vecchio parco è in sfacelo. Ti viene concesso un prestito dall’Unione Europea per riportare questa zona desolata alla sua bellezza originaria. Dovrai rinnovare il parco e ripagare il prestito. -STR_SCNR :Nordamerica - Hawaii estreme +STR_SCNR :Brivido a Waikiki STR_PARK :Brivido a Waikiki STR_DTLS :Gli abitanti delle Hawaii sono stufi del surf e cercano qualcosa di più eccitante. Devi costruire un parco che soddisfi le loro aspettative, mantenendo alto il livello di attrazione turistica locale. -STR_SCNR :Nordamerica - Grand Canyon +STR_SCNR :Calamità nel canyon STR_PARK :Calamità nel canyon STR_DTLS :Devi costruire un parco ai due lati di questa meraviglia naturale. Hai dei limiti di spazio da rispettare, ma potrai acquistare terreno dagli indiani locali. Dovrai raggiungere l’obiettivo per sostenere la popolazione locale. -STR_SCNR :Nordamerica - Paradiso dell’ottovolante +STR_SCNR :Paradiso dell’ottovolante STR_PARK :Paradiso dell’ottovolante STR_DTLS :Sei un magnate della finanza di grande successo, che si è preso 4 anni di vacanza dagli affari e desidera costruire un parco senza badare a spese. -STR_SCNR :Sudamerica - Città perduta Inca +STR_SCNR :Il fondatore della città perduta STR_PARK :Il fondatore della città perduta STR_DTLS :Per potenziare il turismo, devi creare un parco intonato all’ambiente. -STR_SCNR :Sudamerica - La foresta pluviale +STR_SCNR :Scorribanda nella foresta STR_PARK :Scorribanda nella foresta STR_DTLS :Nella preziosa foresta pluviale, lo spazio è limitato. Devi sfruttare al meglio la radura già esistente per creare una valida alternativa all’industria locale del legno. -STR_SCNR :Sudamerica - Carnevale di Rio +STR_SCNR :Pan di zucchero STR_PARK :Pan di zucchero STR_DTLS :Gestisci un piccolo parco presso Rio e la banca ti ha chiesto di rimborsare un debito. Devi aumentare rapidamente le tue entrate per fronteggiare questa situazione imprevista. @@ -4373,72 +4403,72 @@ STR_DTLS :Gestisci un piccolo parco presso Rio e la banca ti ha chiesto di ri ## Time Twister Scenarios ############################################################################### -STR_SCNR :Età Oscura - Castello +STR_SCNR :Castello di Cliffside STR_PARK :Castello di Cliffside STR_DTLS :I membri locali della società per il ripristino delle leggi sulle battaglie prendono seriamente il loro hobby. Ti hanno affidato l’incarico di costruire un parco a tema sull’Età Oscura, da erigere sulle fondamenta del Castello di Cliffside. -STR_SCNR :Età Oscura - Robin Hood +STR_SCNR :Foresta di Sherwood STR_PARK :Foresta di Sherwood STR_DTLS :Per sottrarre i beni ai ricchi e donarli ai poveri, tu e i tuoi uomini avete deciso di costruire un parco a tema nella Foresta di Sherwood. -STR_SCNR :Futuro - Primi incontri +STR_SCNR :Stravaganza extraterrestre STR_PARK :Stravaganza extraterrestre STR_DTLS :Su un lontano pianeta è stata scoperta la vita Costruisci un parco a tema sugli alieni e goditi un successo di visitatori senza precedenti. -STR_SCNR :Futuro - Il mondo del futuro +STR_SCNR :Città di Gemini STR_PARK :Città di Gemini STR_DTLS :Metti in gioco la tua fantastica e utopistica visione del futuro e costruisci un parco futuristico composto dalle attrazioni più all’avanguardia. -STR_SCNR :Mitologico - Set cinematografico animatronico +STR_SCNR :Animatronica antichità STR_PARK :Animatronica antichità STR_DTLS :Hai ricevuto l’incarico di gestire un parco a tema esistente, costruito sul set di un vecchio film. Rendi omaggio ai pionieri dell’animazione cinematografica che per primi hanno portato sul grande schermo e creature mitologiche. -STR_SCNR :Mitologico - La culla della civiltà +STR_SCNR :Follia mitologica STR_PARK :Follia mitologica STR_DTLS :Possiedi un’isola di eccezionale valore archeologico. Hai deciso di preservarne le origini costruendo un parco a tema basato sull’eredità mitologica della zona. -STR_SCNR :Preistoria - Dopo l’asteroide +STR_SCNR :Il massacro del cratere STR_PARK :Il massacro del cratere STR_DTLS :Possiedi un vecchio cratere meteoritico. Con lo spirito che ti contraddistingue, hai deciso di costruire un parco sugli asteroidi, tramutando così la tua terra in una fonte di ingente guadagno. -STR_SCNR :Preistoria - Safari Giurassico +STR_SCNR :Ottovolantosauro STR_PARK :Ottovolantosauro STR_DTLS :Hai ricevuto l’incarico di costruire un parco preistorico ispirato al Giurassico. Per ottimizzare l’accesso dei visitatori, dovrai costruire tragitti che sovrastano la valle e vi si inoltrano. -STR_SCNR :Preistoria - Età della Pietra +STR_SCNR :Passeggiata tra le rocce STR_PARK :Passeggiata tra le rocce STR_DTLS :Per scoraggiare i costruttori di autostrade e conservare i misteriosi e antichi cerchi di pietra, dovrai costruire un parco a tema sull’Età della Pietra e farlo fruttare. L’impresa è una vera e propria sfida, dato il territorio inospitale. -STR_SCNR :Ruggenti Anni Venti - Isola carceraria +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :L’infame isola carceraria, la cui popolazione un tempo si dedicava al contrabbando e alle attività illecite, è in vendita. Hai deciso di trasformarla in un’importante attrazione turistica e il denaro non è un problema. -STR_SCNR :Ruggenti Anni Venti - Coppa Schneider +STR_SCNR :Costa di Schneider STR_PARK :Costa di Schneider STR_DTLS :Manca poco aI 75° anniversario della conquista della Coppa Schneider da parte di tuo nonno. Hai deciso di onorare la sua impresa costruendo un parco a tema basato sulla famosa corsa di idrovolanti. -STR_SCNR :Ruggenti Anni Venti +STR_SCNR :Metropoli STR_PARK :Metropoli STR_DTLS :Possiedi un lotto di terra vuoto vicino alla parte meno sviluppata della città. Per sfruttare al meglio la tua proprietà, costruisci un parco caratterizzato da grattacieli ispirandoti all’architettura art decò degli anni Venti. -STR_SCNR :Rock & Roll - Gli anni dei fiori +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Un importante festival musicale si tiene ogni anno sulla tua proprietà. Costruisci un parco a tema di ispirazione hippy per attrarre gli spiriti liberi. -STR_SCNR :Rock & Roll - Rock & Roll +STR_SCNR :La rinascita del Rock & Roll STR_PARK :La rinascita del Rock & Roll STR_DTLS :Questo vecchio parco a tema ha vissuto tempi migliori. Aiuta il proprietario a ristrutturarlo in stile Rock & Roll e trasformalo in un luogo di successo. diff --git a/data/language/ja-JP.txt b/data/language/ja-JP.txt index ee841f3986..aee1921927 100644 --- a/data/language/ja-JP.txt +++ b/data/language/ja-JP.txt @@ -1729,7 +1729,7 @@ STR_2382 :地形 STR_2383 :水 STR_2384 :{WINDOW_COLOUR_2}あなたの目標: STR_2385 :{BLACK}なし -STR_2386 :{BLACK}{POP16}{MONTHYEAR}の終わりに、 パークの内に{PUSH16}{PUSH16}{COMMA32}以上人の来客し、600以上のパーク評価値を取得する必要があります。 +STR_2386 :{BLACK}{POP16}{POP16}{MONTHYEAR}の終わりに、 パークの内に{PUSH16}{PUSH16}{PUSH16}{COMMA32}以上人の来客し、600以上のパーク評価値を取得する必要があります。 STR_2387 :{BLACK}{POP16}{MONTHYEAR}の終わりに、 {CURRENCY}以上のパーク評価額を取得する必要があります。 STR_2388 :{BLACK}楽しんで下さい! STR_2389 :{BLACK}最高の{STRINGID}を建設してください! @@ -2875,7 +2875,7 @@ STR_5755 :不適切なソフトウェアバージョン(サーバは{STRING STR_5756 :Bad Password STR_5757 :サーバがいっぱいです STR_5758 :{OUTLINE}{GREEN}{STRING}がゲームに参加しました。 -STR_5759 :地図をダウンロード中… ({INT32} / {INT32}) KiB +STR_5759 :地図をダウンロード中… STR_5760 :香港ドル (HK$) STR_5761 :ニュー台湾ドル (NT$) STR_5762 :人民元 (CN¥) @@ -4016,87 +4016,87 @@ STR_DTLS : 不足しているシックスフラッグスの乗物を設置す ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :アフリカ ・ ダイヤモンド鉱山 +STR_SCNR :アフリカの鉱山 STR_PARK :アフリカの鉱山 STR_DTLS :You inherited a disused diamond mine, and find a valuable diamond. You decide to invest that money to build a world-famous theme park. -STR_SCNR :アフリカ ・ オアシス +STR_SCNR :ミラージュ・マッドネス STR_PARK :ミラージュ・マッドネス STR_DTLS :A desert Oasis has been discovered and would provide a beautiful location for a park. Transport to the oasis has been provided. -STR_SCNR :アフリカ ・ ヴィクトリアの滝 +STR_SCNR :オーバー・ザ・エッジ STR_PARK :オーバー・ザ・エッジ STR_DTLS :A dam has been built offering abundant, cheap hydroelectric power with which to run a park. You need to reach a high park value to help repay the loan for the dam. -STR_SCNR :南極 ・ 生態学的なサルベージ +STR_SCNR :氷の冒険 STR_PARK :氷の冒険 STR_DTLS :The environment agency has turned to you to transform an old oil refinery ecological eyesore into a top tourist attraction. Land is cheap but loan interest is high. You can sell the old buildings for salvage. -STR_SCNR :アジア ・ 万里の長城ツーリズムの強化 +STR_SCNR :万里の長城 STR_PARK :万里の長城 STR_DTLS :The authorities have decided to enhance tourism around the Great Wall by building a theme park on the adjacent land. Money is no object! -STR_SCNR :アジア ・ 日本の沿岸再生 +STR_SCNR :沖縄海岸 STR_PARK :沖縄海岸 STR_DTLS :An existing park has run out of space. Your only option is to build out into the sea, and so you have taken out a loan. Height restrictions on your building are enforced due to foundations and earthquake risk. -STR_SCNR :アジア ・ マハラジャのパレス +STR_SCNR :パーク・マハラジャ STR_PARK :パーク・マハラジャ STR_DTLS :You have been commissioned by the Maharaja to bring entertainment to the large local population. Build a park inspired by the Maharaja’s palace. -STR_SCNR :オーストラリア ・ エアーズロック +STR_SCNR :エアーズ・アドベンチャー STR_PARK :エアーズ・アドベンチャー STR_DTLS :You are helping Aboriginal people to build a park as part of a cultural awareness program. You need to get a large number of guests to educate them in the unique heritage of the Aboriginal people. -STR_SCNR :オーストラリア ・ ビーチの楽しみ +STR_SCNR :ビーチ・バーベキュー STR_PARK :ビーチ・バーベキュー STR_DTLS :A local entrepreneur’s sealife park has gone bust. You already operate a small park and buy the other park from the construction company. Develop a big combined park. -STR_SCNR :ヨーロパ ・ ヨーロッパ文化祭 +STR_SCNR :ヨーロッパ文化祭 STR_PARK :ヨーロッパ文化祭 STR_DTLS :You have been brought in to take over a European Cultural Visitor Attraction and must increase the number of guests in order to pay back the EU subsidy by the end of the current European parliament term. -STR_SCNR :ヨーロパ ・ レノベーション +STR_SCNR :灰の中から STR_PARK :灰の中から STR_DTLS :An old park has fallen into disrepair. You gain a European Union grant to return this deprived area to its former glory! You need to renovate the park and repay the grant. -STR_SCNR :北アメリカ ・ ハワイ島 +STR_SCNR :ワッキー・ワイキキ STR_PARK :ワッキー・ワイキキ STR_DTLS :The people of Hawaii are bored of surfing and are looking for something more intense. You need to build a park with this in mind to keep the area’s tourist attraction rating high. -STR_SCNR :北アメリカ ・ グランドキャニオン +STR_SCNR :キャニオン・カラミティー STR_PARK :キャニオン・カラミティー STR_DTLS :You have to build a park on limited land either side of this natural treasure - you do have the opportunity to buy neighbouring land from the Native American Indians. You need to complete the objective to sustain the local town’s population. -STR_SCNR :北アメリカ ・ ジェットコースター天国 +STR_SCNR :ジェットコースター天国 STR_PARK :ジェットコースター天国 STR_DTLS :You are a successful business tycoon on long sabbatical who desires to use this time transforming the city park into Rollercoaster Heaven. Money is no object! -STR_SCNR :南アメリカ ・ インカの失われた都市 +STR_SCNR :ロスト・シティ STR_PARK :ロスト・シティ STR_DTLS :To further boost local tourism you must construct a park that is in tune with its surroundings, and has height restrictions. -STR_SCNR :南アメリカ ・ 熱帯雨林高原 +STR_SCNR :熱帯雨林高原 STR_PARK :熱帯雨林高原 STR_DTLS :Space is limited in the precious rainforest - you must cram as much as possible into the existing clearing, in order to provide a viable alternative to the local timber industry. -STR_SCNR :南アメリカ ・ リオカーニバル +STR_SCNR :シュガーローフ・ショアーズ STR_PARK :シュガーローフ・ショアーズ STR_DTLS :You run a small park near Rio but the bank has called in your loan. You need to quickly increase your earning capacity to repay this unexpected debt. @@ -4104,71 +4104,71 @@ STR_DTLS :You run a small park near Rio but the bank has called in your loan. ## Time Twister Scenarios ############################################################################### -STR_SCNR :暗黒時代 ・ 崖側の城 +STR_SCNR :崖側の城 STR_PARK :崖側の城 STR_DTLS :Local members of the battle re-enactment society are rather serious about their hobby. They’ve entrusted you with the job of constructing a Dark Age theme park on the grounds of Cliffside Castle. -STR_SCNR :暗黒時代 ・ ロビン・フッド +STR_SCNR :シャーウッドの森 STR_PARK :シャーウッドの森 STR_DTLS :To liberate wealth from the rich and distribute it to the needy, you and your Merry Men have decided to build a theme park in Sherwood Forest. -STR_SCNR :未来 ・ 最初の出会い +STR_SCNR :地球外な壮観 STR_PARK :地球外な壮観 STR_DTLS :Life has been discovered on a distant planet Build an alien theme park to cash in on the unprecedented wave of interest. -STR_SCNR :未来 ・ 未来の世界 +STR_SCNR :ジェミニ・シティ STR_PARK :ジェミニ・シティ STR_DTLS :Show off your inventive, utopian vision of the future - come up with a futuristic park design that incorporates state-of-the-art attractions. -STR_SCNR :神話 - アニマトロニクス撮影現場 +STR_SCNR :アニマトロ・アンティクス STR_PARK :アニマトロ・アンティクス STR_DTLS :You have been given the task of running and improving an existing theme park, which has been built on an old film set. Build a tribute to the pioneering stop-motion animators who first brought mythical creatures to life on the silver screen. -STR_SCNR :神話 - 世界四大文明 +STR_SCNR :神話の狂気 STR_PARK :神話の狂気 STR_DTLS :You own an island of particular archaeological value. You’ve decided to fund its preservation by constructing a theme park based on the area’s rich Mythological heritage. -STR_SCNR :前史時代 ・ 小惑星の後 +STR_SCNR :クレーターの大虐殺 STR_PARK :クレーターの大虐殺 STR_DTLS :You own a dusty old meteor crater. In the true entrepreneurial spirit, you’ve decided to construct an asteroid theme park and convert your seemingly worthless land into a sizeable fortune. -STR_SCNR :前史時代 ・ ジュラシックサファリ +STR_SCNR :コースターサウルス STR_PARK :コースターサウルス STR_DTLS :You’ve been given the task of constructing a Jurassic era theme park. To optimize your visitors’ access to the exotic plant and animal exhibits, you will need to build rides going over and into the valley. -STR_SCNR :前史時代 ・ 石器文化 +STR_SCNR :ロッキー・ランブル STR_PARK :ロッキー・ランブル STR_DTLS :To thwart the highway developers and preserve the mysterious ancient stone circles, you will need to construct a Stone Age theme park and turn a profit. However, attracting visitors may pose a challenge, as the terrain is a tad inhospitable. -STR_SCNR :1920時代 - アルカトラズ島 +STR_SCNR :アルカトラズ STR_PARK :アルカトラズ STR_DTLS :The infamous Prison Island - whose population once swelled with bootleggers and racketeers - is now up for sale. You’ve decided to convert it into a top tourist attraction, and money is no object -STR_SCNR :1920時代 - シュナイダー・レース +STR_SCNR :シュナイダー・ショーズ STR_PARK :シュナイダー・ショーズ STR_DTLS :The 75th anniversary of your grandfather’s Schneider Cup victory is coming up in a few years. You’re going to honour his achievement by building a theme park based on the famous seaplane race. -STR_SCNR :1920時代 - 高層ビル +STR_SCNR :メトロポリス STR_PARK :メトロポリス STR_DTLS :You own an empty lot near the low-rise part of town. To squeeze the most out of your urban property, build a skyscraper theme park inspired by the soaring art deco architecture of the twenties. -STR_SCNR :ロックンロール - フラワーパワー +STR_SCNR :ウッドストック STR_PARK :ウッドストック STR_DTLS :A large annual music festival takes place on your land. Build a hip theme park to keep the free-spirited audience entertained. -STR_SCNR :ロックンロール - ロックンロール +STR_SCNR :ロックンロール・リバイバル STR_PARK :ロックンロール・リバイバル STR_DTLS :This aging theme park has seen better days. Help the owner give it a retro rock ’n’ roll makeover and turn the place into a successful venue. diff --git a/data/language/ko-KR.txt b/data/language/ko-KR.txt index ca4849b882..177dba764d 100644 --- a/data/language/ko-KR.txt +++ b/data/language/ko-KR.txt @@ -2889,7 +2889,7 @@ STR_5755 :소프트웨어 버전이 맞지 않습니다 (서버는 {STRING} STR_5756 :비밀번호가 맞지 않습니다 STR_5757 :서버 제한 인원이 꽉 찼습니다 STR_5758 :{OUTLINE}{GREEN}{STRING} 님 입장 -STR_5759 :맵 다운로드 중 … ({INT32} / {INT32}) KiB +STR_5759 :맵 다운로드 중 … STR_5760 :홍콩 달러 (HK$) STR_5761 :신 대만 달러 (NT$) STR_5762 :중국 위안 (CN¥) @@ -3452,7 +3452,7 @@ STR_6374 :겹 STR_6375 :알 수 없는 놀이기구 STR_6376 :{WINDOW_COLOUR_2}놀이기구 차량:{NEWLINE}{BLACK}{POP16}{STRINGID}의 {PUSH16}{PUSH16}{STRINGID} STR_6377 :{WINDOW_COLOUR_2}유형: {BLACK}{POP16}{STRINGID}의 {PUSH16}{PUSH16}{STRINGID} -STR_6378 :오브젝트 목록 수신 중: {INT32} / {INT32} +STR_6378 :오브젝트 목록 수신 중: STR_6379 :올바르지 않은 데이터 수신 STR_6380 :업데이트 사용 가능! STR_6381 :OpenRCT2 디스코드에 참여하세요! @@ -3701,6 +3701,24 @@ STR_6624 :칸 조사 창: 요소 정렬 STR_6625 :유효하지 않은 색상 STR_6626 :애니메이션 반대 STR_6627 :트랙 속력이 너무 높습니다! +STR_6628 :보도 옆 가장자리에만 설치할 수 있습니다! +STR_6629 :메인 메뉴 버튼을 가운데로 정렬 +STR_6630 :이 설정을 켜면 메인 메뉴의 버튼을 화면 가운데에 수평으로 정렬합니다. 기존 방식은 버튼을 좌측과 우측 끝에 두 그룹으로 정렬합니다. +STR_6631 :불러오는 중… +STR_6632 :오브젝트 파일 확인 중… +STR_6633 :시나리오 파일 확인 중… +STR_6634 :트랙 디자인 파일 확인 중… +STR_6635 :에셋 팩 확인 중… +STR_6636 :타이틀 시퀀스 확인 중… +STR_6637 :타이틀 시퀀스 불러오는 중… +STR_6638 :UI 확대 +STR_6639 :터치 환경에서 사용하기 적합하도록 인터페이스를 변경합니다 +STR_6640 :에셋 팩 편집… +STR_6641 :불러오기/진행 창 +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :터치 개선 +STR_6645 :일부 UI 요소를 크게 표시하여 클릭이나 터치가 용이하게 만듭니다. ############# # Scenarios # @@ -4289,87 +4307,87 @@ STR_DTLS :식스 플래그의 빠진 놀이기구를 건설해보거나, 공 ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :아프리카 - 아프리카 다이아몬드 광산 +STR_SCNR :아프리카의 광산 STR_PARK :아프리카의 광산 STR_DTLS :다이아몬드 폐광을 물려받은 당신은 값비싼 다이아몬드를 발견했고 그 판매 수익으로 세계 일류의 테마파크를 짓기로 결심했습니다. -STR_SCNR :아프리카 - 오아시스 +STR_SCNR :신기루의 광기 STR_PARK :신기루의 광기 STR_DTLS :사막에서 놀이공원을 짓기에 아주 적당한 오아시스를 발견했습니다. 오아시스로 가는 교통편은 이미 존재합니다. -STR_SCNR :아프리카 - 빅토리아 폭포 +STR_SCNR :폭포 너머 STR_PARK :폭포 너머 STR_DTLS :공원을 운영하기 충분하고 값싼 전기를 생산하는 수력 발전 댐이 지어졌습니다. 댐을 건설하느라 진 빚을 갚기 위해 높은 가치의 놀이공원을 지어야 합니다. -STR_SCNR :남극 - 버려진 환경 복구 +STR_SCNR :얼음에 뒤덮인 모험 STR_PARK :얼음에 뒤덮인 모험 STR_DTLS :환경부에서 눈꼴사납고 낡은 정유 시설을 최고의 관광 명소로 만들어달라고 합니다. 땅값은 싸지만 대출 이자는 높습니다. 오래된 건물은 고철로 팔아 버릴 수 있습니다. -STR_SCNR :아시아 - 중국 만리장성의 관광 진흥 +STR_SCNR :만리장성 STR_PARK :만리장성 STR_DTLS :관광 당국이 만리장성 주변의 땅에 놀이공원을 지어서 관광객 수를 늘리기로 결정했습니다. 돈이 문제가 아니군요! -STR_SCNR :아시아 - 일본 연안 간척 +STR_SCNR :오키나와 해변 STR_PARK :오키나와 해변 STR_DTLS :기존 공원은 이미 공간이 모자랍니다. 대출을 받아서 바다로 확장해나갈 수밖에 없습니다. 지진 우려와 약한 기반을 이유로 건설 높이가 제한됩니다. -STR_SCNR :아시아 - 마하라자 궁전 +STR_SCNR :마하라자 공원 STR_PARK :마하라자 공원 STR_DTLS :인도의 왕에게서 국민들에게 즐길 거리를 만들어달라는 임무를 받았습니다. 마하라자 궁전을 연상시키는 공원을 만들어보세요. -STR_SCNR :오스트레일리아 - 에어즈 록 +STR_SCNR :에어즈 어드벤처 STR_PARK :에어즈 어드벤처 STR_DTLS :문화 인식 프로그램의 일환으로, 오스트레일리아 원주민들을 도와서 공원을 개발하려 합니다. 원주민들의 독특한 문화유산을 알리기 위해 많은 관광객을 모아야 합니다. -STR_SCNR :오스트레일리아 - 해변의 즐거움 +STR_SCNR :해변의 바베큐 파티 STR_PARK :해변의 바베큐 파티 STR_DTLS :근처 지역 사업가의 해안 공원이 파산해버렸습니다. 이미 작은 공원을 운영하는 당신은 건설사로부터 그 공원을 구입하였습니다. 두 공원을 합쳐 크게 사업을 확장해보세요. -STR_SCNR :유럽 - 유럽 문화 축제 +STR_SCNR :유럽의 축제 STR_PARK :유럽의 축제 STR_DTLS :유럽 문화 축제의 경영권을 확보한 당신은 이제 유럽 연합의 보조금을 갚기 위해 현재의 유럽 의회 임기가 끝날 때까지 손님을 늘려야합니다. -STR_SCNR :유럽 - 혁신 +STR_SCNR :잿더미를 딛고 STR_PARK :잿더미를 딛고 STR_DTLS :방치된 낡은 공원이 있습니다. 이 공원이 과거에 누렸던 영광을 재현하기 위해 유럽 연합의 허가를 받았습니다! 허가를 받은 만큼 공원을 혁신해서 보답하세요. -STR_SCNR :북아메리카 - 최고의 하와이 섬 +STR_SCNR :왁자지껄 와이키키 STR_PARK :왁자지껄 와이키키 STR_DTLS :하와이 주민들이 이제 파도타기가 지겨워져서 좀 더 자극적인 뭔가를 원하고 있습니다. 주민들도 만족시키면서 이 지역의 관광객들이 찾아오고 싶어 하는 공원을 만드세요. -STR_SCNR :북아메리카 - 그랜드 캐니언 +STR_SCNR :불행의 계곡 STR_PARK :불행의 계곡 STR_DTLS :이 아름답지만 제한적인 공간에 공원을 만들어야 합니다. 미국 원주민에게서 반대편 땅을 살 수 있습니다. 줄어들고 있는 마을 인구를 유지하기 위해서라도 목표를 달성해야 합니다. -STR_SCNR :북아메리카 - 롤러코스터 천국 +STR_SCNR :롤러코스터 천국 STR_PARK :롤러코스터 천국 STR_DTLS :당신은 긴 휴식기를 가지는 동안 이 도시 공원을 롤러코스터 천국으로 바꾸고자 하는 성공한 사업 거물입니다. 돈은 문제가 되지 않는군요! -STR_SCNR :남 아메리카 - 잉카의 잊혀진 도시 +STR_SCNR :잊혀진 도시의 발견자 STR_PARK :잊혀진 도시의 발견자 STR_DTLS :이 지역의 관광산업을 보다 활기차게 만들기 위해서는 주변 환경과 잘 어울리는 공원을 지어야 합니다. -STR_SCNR :남 아메리카 - 열대우림 고원 +STR_SCNR :열대우림 고원 STR_PARK :열대우림 고원 STR_DTLS :소중한 열대우림 속의 제한된 공간만을 받았습니다. 이곳의 벌목 산업을 대신할 수 있는 방법을 제공하기 위해 기존의 빈 공간을 최대한 많이 활용해야 합니다. -STR_SCNR :남 아메리카 - 리오 축제 +STR_SCNR :슈거로프 해안 STR_PARK :슈거로프 해안 STR_DTLS :리오 근처의 작은 공원을 운영하고 있는데 은행이 대출금을 조기 회수하려 합니다. 때 이른 빚 독촉을 갚기 위해서 빨리 돈을 벌어야 합니다. @@ -4377,72 +4395,72 @@ STR_DTLS :리오 근처의 작은 공원을 운영하고 있는데 은행이 ## Time Twister Scenarios ############################################################################### -STR_SCNR :암흑시대 - 성 +STR_SCNR :클리프사이드 성 STR_PARK :클리프사이드 성 STR_DTLS :이 지역의 전투 재현 단체는 자신들의 취미를 진지하게 생각하고 있습니다. 그들은 당신에게 클리프사이드 성 부지에 암흑시대 테마파크를 건설해달라고 요청해왔습니다. -STR_SCNR :암흑시대 - 로빈 후드 +STR_SCNR :셔우드 숲 STR_PARK :셔우드 숲 STR_DTLS :부자들의 재산을 빼앗아 필요한 사람들에게 나누어주기 위해서 당신과 수하들은 셔우드 숲에 놀이공원을 만들기로 결정했습니다. -STR_SCNR :미래 - 첫 만남 +STR_SCNR :외계인의 축제 STR_PARK :외계인의 축제 STR_DTLS :먼 행성에서 생명체가 발견되었습니다. 외계인을 주제로 한 놀이공원을 만들어서 전에 없던 관심을 받아 돈을 벌어보세요. -STR_SCNR :미래 - 미래 세계 +STR_SCNR :제미니 시티 STR_PARK :제미니 시티 STR_DTLS :당신의 미래에 대한 독창적이고 이상적인 시각을 보여줄 때입니다. 첨단의 매력이 느껴지는 미래의 공원 디자인을 제안해봅시다. -STR_SCNR :신화 - 영화 세트장 +STR_SCNR :애니매트로닉 앤틱스 STR_PARK :애니매트로닉 앤틱스 STR_DTLS :이번 임무는 옛 영화 세트장에 설립된 기존 테마파크를 운영하고 발전시키는 것입니다. 흑백 스크린에 신화 속 인물을 옮겨놓은 스톱 모션 애니메이션의 선구자들에게 이 공원을 헌정합시다. -STR_SCNR :신화 - 문명의 요람 +STR_SCNR :신화의 광기 STR_PARK :신화의 광기 STR_DTLS :특별한 고고학적 가치를 가진 섬을 소유하게 되었습니다. 이 지역의 풍부한 신화적 유산을 기반으로 한 테마파크를 건설해서 유산 보존 기금을 마련하기로 결정했습니다. -STR_SCNR :선사시대 - 소행성 충돌 후 +STR_SCNR :크레이터 대학살 STR_PARK :크레이터 대학살 STR_DTLS :당신은 오래된 운석공을 소유하고 있습니다. 기업가 정신을 발휘한 당신은 운석 테마 파크를 건설해서 쓸모없어 보이는 이 땅을 엄청난 행운의 땅으로 바꾸기로 결심했습니다. -STR_SCNR :선사시대 - 쥐라기 사파리 +STR_SCNR :코스터사우르스 STR_PARK :코스터사우르스 STR_DTLS :당신은 쥐라기 시대 놀이공원을 건설하는 임무를 받았습니다. 색다른 식물과 동물 전시장에 관객이 쉽게 접근할 수 있도록 하려면, 계곡을 가로지르는 놀이기구를 만들어야 할 것입니다. -STR_SCNR :선사시대 - 석기시대 +STR_SCNR :돌무더기 산책 STR_PARK :돌무더기 산책 STR_DTLS :고속도로 개발자들을 막고 고대 열석을 보호하기 위해, 석기 시대 테마파크를 건설하여 수익을 내야 합니다. 하지만 사람이 살기 조금 힘든 곳인 만큼 손님을 모으기가 어려울 것입니다. -STR_SCNR :광란의 20년대 - 감옥 섬 +STR_SCNR :앨커트래즈 STR_PARK :앨커트래즈 STR_DTLS :주류 밀매자와 폭력범으로 득실대던 악명 높은 감옥 섬이 경매에 부쳐졌습니다. 이곳을 최고의 관광지로 바꾸기로 한 당신에게 돈은 신경 쓸 필요가 없네요. -STR_SCNR :광란의 20년대 - 슈나이더 컵 +STR_SCNR :슈나이더 해안 STR_PARK :슈나이더 해안 STR_DTLS :할아버지의 슈나이더 컵 우승 75주년이 얼마 남지 않았습니다. 당신은 할아버지의 업적을 기리기 위해 유명한 수상비행기 경주를 딴 놀이공원을 짓기로 했습니다. -STR_SCNR :광란의 20년대 - 마천루 +STR_SCNR :메트로폴리스 STR_PARK :메트로폴리스 STR_DTLS :당신은 도시 저층부 근처의 빈 공간을 갖게 되었습니다. 최대한 이익을 많이 얻기 위해, 20년대에 유행했던 아르데코식 건축물을 본딴 마천루 테마파크를 지어보세요. -STR_SCNR :로큰롤 - 사랑과 평화 +STR_SCNR :우드스톡 STR_PARK :우드스톡 STR_DTLS :매년 열리는 대형 음악 축제가 당신의 땅에서 열립니다. 최신 유행하는 놀이공원을 지어, 자유로운 영혼을 가진 관객들이 즐거워할 수 있게 만드세요. -STR_SCNR :로큰롤 - 로큰롤 +STR_SCNR :로큰롤 부흥 STR_PARK :로큰롤 부흥 STR_DTLS :이 오래된 놀이공원은 더 나은 미래를 기대하고 있습니다. 소유자를 도와 이 공원을 복고풍의 로큰롤 공원으로 바꾸어 성공적인 장소로 변모시켜보세요. diff --git a/data/language/nb-NO.txt b/data/language/nb-NO.txt index 5bb28c82f2..c02a792d0a 100644 --- a/data/language/nb-NO.txt +++ b/data/language/nb-NO.txt @@ -2883,7 +2883,7 @@ STR_5755 :Feil Software-versjon (Server bruker {STRING}) STR_5756 :Dårlig passord STR_5757 :Server Full STR_5758 :{OUTLINE}{GREEN}{STRING} har blitt med i spillet -STR_5759 :Laster ned kart … ({INT32} / {INT32}) KiB +STR_5759 :Laster ned kart … STR_5760 :Hong Kong Dollar (HK$) STR_5761 :Nye Taiwanske Dollar (NT$) STR_5762 :Kinesisk Yuan (CN¥) @@ -3447,7 +3447,7 @@ STR_6374 :K STR_6375 :Ukjent attraksjon STR_6376 :{WINDOW_COLOUR_2}Kjøretøy:{NEWLINE}{BLACK}{STRINGID} for {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Type: {BLACK}{STRINGID} for {STRINGID} -STR_6378 :Mottar liste over objekter: {INT32} / {INT32} +STR_6378 :Mottar liste over objekter: STR_6379 :Mottok ugyldig data STR_6380 :Oppdatering tilgjengelig! STR_6381 :Bli med i OpenRCT2 på Discord! @@ -3687,7 +3687,7 @@ STR_6614 :Kan ikke endre inngangsavgift til parken STR_6615 :Spor på denne ruten trenger vann STR_6616 :Handling ugyldig for denne personaltypen STR_6617 :Kan ikke bytte ut rute-element med seg selv -STR_6618 :Kan ikke begrense eller frigjøre objekt... +STR_6618 :Kan ikke begrense eller frigjøre objekt… STR_6619 :Objekt-type kan ikke bli begrenset! STR_6620 :Kunne ikke finne objekt! STR_6621 :Begrens @@ -4272,87 +4272,87 @@ STR_DTLS :Bygg de savnede Six Flags attraksjonene, eller skap dine egne desig ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - African Diamond Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :Du arvet en forlatt diamantgruve, og finner en verdifull diamant. Du bestemmer deg for å investere pengene i å bygge en verdensberømt fornøyelsespark. -STR_SCNR :Africa - Oasis +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :En ørkenoase har blitt oppdaget og vil være et vakkert sted for å bygge en park. Transport til oasen har blitt sørget for. -STR_SCNR :Africa - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :En demning har blitt bygd, som tilbyr store mengder billig strøm som kan drive en park. Du trenger å nå en høy parkverdi for å hjelpe deg betale ned lånet for demningen. -STR_SCNR :Antarctic - Ecological Salvage +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :Miljøbyrået har kontaktet deg for å få transformert et gammelt, stygt oljeraffineri til en populær turistattraksjon. Land er billig men lånerentene er høye. Du kan selge de gamle bygningene for å hjelpe med betalingen. -STR_SCNR :Asia - Great Wall of China Tourism Enhancement +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :Myndighetene har bestemt seg for å øke turismen rundt Den Kinesiske Mur ved å bygge en fornøyelsespark ved siden av. Penger er ikke noe problem! -STR_SCNR :Asia - Japanese Coastal Reclaim +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :En eksisterende park har gått tom for plass. Din eneste mulighet er å bygge ut i sjøen, og så har du tatt ut et lån. Høyderestriksjoner på bygningene blir vernet om pga. fundamenter og jordskjelvsfare. -STR_SCNR :Asia - Maharaja Palace +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :Du har fått i oppdrag av Maharajaen å bringe underholdning til den store lokale befolkningen. Bygg en park inspirert av Maharajaen's palass. -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :Du hjelper Aboriginske folk å bygge en park som del av et kulturelt kunnskapsprogram. Du trenger en stor mengde gjester for å utdanne de om den unike arven til Aboriginerne. -STR_SCNR :Australasia - Fun at the Beach +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :En lokal entreprenør's marinepark har gått konkurs. Du driver allerede en liten park og kjøper den andre parken fra konstruksjonsfirmaet. Utvikle en stor, kombinert park. -STR_SCNR :Europe - European Cultural Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :Du har blitt brakt inn for å overta en European Cultural Visitor Attraction og må øke antall gjester slik at du kan betale tilbake pengestøtten til EU ved slutten av det nåværende Europeiske stortingets termin. -STR_SCNR :Europe - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :En gammel park har forfalt. Du mottar et stipend fra den Europeiske Union for å returne dette forfalne området tilbake til sin tidligere prakt! Du må renovere parken og betale tilbake stipendet. -STR_SCNR :North America - Extreme Hawaiian Island +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :Folket på Hawaii er lei av surfing og ser etter noe mer intenst. Du trenger å bygge en park med tanke på dette for å holde tiltrekningen av turister til området på et høyt nivå. -STR_SCNR :North America - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :Du må bygge en park på et begrenset område på hver side av denne naturlige skjønnheten - du har muligheten til å kjøpe land fra de innfødte Amerikanske Indianerne. Du trenger å fullføre oppdraget for å opprettholde den lokale landsbyens befolkning. -STR_SCNR :North America - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :Du er en suksessfull forretningsmagnat på en lang ferie som ønsker å bruke denne tiden til å transformere byparken til Rollercoaster Heaven. Penger er ikke noe problem! -STR_SCNR :South America - Inca Lost City +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :For å videre øke turisme må du konstruere en park som tar hensyn til sine omgivelser. -STR_SCNR :South America - Rain Forest Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Plass er begrenset i den faretruede regnskogen - du må klemme så mye som mulig inn i den eksisterende klaringen, for å bringe et lønnsomt alternativ til den lokale tømmerindustrien. -STR_SCNR :South America - Rio Carnival +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :Du driver en liten park nær Rio, men banken krever du skal betale ned lånet ditt. Du trenger å raskt øke din inntekt for å betale denne overraskende gjelden. @@ -4360,72 +4360,72 @@ STR_DTLS :Du driver en liten park nær Rio, men banken krever du skal betale ## Time Twister Scenarios ############################################################################### -STR_SCNR :Dark Age - Castle +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Lokale medlemmer av krigs-gjenskapelsesforeningen are svært seriøse med sin hobby. De har betrodd deg med jobben av å lage en middelaldersk fornøyelsespark på marken til Cliffside Castle. -STR_SCNR :Dark Age - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :Å ta fra de rike og gi til de fattige, du og dine Glade Menn har bestemt dere for å bygge en fornøyelsespark i Sherwood Forest. -STR_SCNR :Future - First Encounters +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Liv har blitt funnet på en fjern planet. Bygg en utenomjordisk fornøyelsespark for å utnytte den enestående bølgen av interesse. -STR_SCNR :Future - Future World +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Vis fram din oppfinnsomme, utopiske visjon av fremtiden - skap en futuristisk parkdesign som inneholder toppmoderne attraksjoner. -STR_SCNR :Mythological - Animatronic Film Set +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :Du har blitt gitt oppgaven av å drive og forbedre en eksisterende fornøyelsespark, som har blitt bygd på et gammelt filmstudio. Bygg en hyllest til pionerene av stop-motion animatører som først brakte mytiske skapninger til liv på filmlerretet. -STR_SCNR :Mythological - Cradle of Civilisation +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :Du eier en øy av spesiell arkeologisk verdi. Du har bestemt deg for å finansiere dens bevaring ved å bygge en fornøyelsespark basert på områdets rike mytologiske arv. -STR_SCNR :Prehistoric - After the Asteroid +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :Du eier et støvete gammelt metorittkrater. I sann gründer-ånd, har du bestemt deg for å bygge en fornøyelsespark med asteroide-tema og konvertere din tilsynelatende verdiløse tomt til en stor formue. -STR_SCNR :Prehistoric - Jurassic Safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :Du har blitt gitt oppgaven av å bygge en fornøyelsepark med Juratids-tema. For å optimalisere besøkendes adgang til eksotiske plante- og dyre-utstillinger, trenger du å bygge attraksjoner som går over og ned i dalen. -STR_SCNR :Prehistoric - Stone Age +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :For å stanse byggingen av motorveier og å bevare de mystiske eldgamle steinsirklene, må du bygge en fornøyelsespark med steinalder-tema og skape en profitt. Derimot, å tiltrekke gjester vil være utfordrende pga. det grove terrenget. -STR_SCNR :Roaring Twenties - Prison Island +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :Den berømte fengselsøya - som en gang huset smuglere og andre kriminelle - er nå til salgs. Du har bestemt deg for å konvertere den til en populær turist-attraksjon, og penger er ikke noe problem -STR_SCNR :Roaring Twenties - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :75års dagen til din bestefars Schneider Cup seiere kommer om et par år. Du har tenkt til å hedre hans prestasjon ved å bygge en fornøyelsespark basert på det berømte sjøfly-løpet. -STR_SCNR :Roaring Twenties - Skyscrapers +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :Du eier en øde tomt nær utkanten av byen. For å skvise mest mulig ut av din urbane eiendom, bygg en fornøyelsespark med skyskraper-tema inspirert av art deco arkitekturen til tjuetallet. -STR_SCNR :Rock ‘n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :En stor, årlig musikkfestival finner sted på din tomt. Bygg en hipp fornøyelsespark for å holde det frisinnede publikummet underholdt. -STR_SCNR :Rock ‘n’ Roll - Rock ‘n’ Roll +STR_SCNR :Rock ‘n’ Roll Revival STR_PARK :Rock ‘n’ Roll Revival STR_DTLS :Denne aldrende fornøyelsesparken har sett bedre dager. Hjelp eieren å gi den en retro rock ‘n’ roll makeover og forvandle stedet til en suksessfull møteplass. diff --git a/data/language/nl-NL.txt b/data/language/nl-NL.txt index ef5a35ccdf..bfee257fa2 100644 --- a/data/language/nl-NL.txt +++ b/data/language/nl-NL.txt @@ -2886,7 +2886,7 @@ STR_5755 :Incompatibele softwareversie (server gebruikt {STRING}) STR_5756 :Ongeldig wachtwoord STR_5757 :Server is vol STR_5758 :{OUTLINE}{GREEN}Nieuwe speler: {STRING}. -STR_5759 :Bezig met downloaden van de kaart… ({INT32} / {INT32} KiB) +STR_5759 :Bezig met downloaden van de kaart… STR_5760 :Hong Kong-dollar (HK$) STR_5761 :Taiwanese dollar (NT$) STR_5762 :Chinese yuan (CN¥) @@ -3448,7 +3448,7 @@ STR_6374 :H STR_6375 :Onbekende attractie STR_6376 :{WINDOW_COLOUR_2}Voertuig:{NEWLINE}{BLACK}{STRINGID} voor {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Type: {BLACK}{STRINGID} voor {STRINGID} -STR_6378 :Objectenlijst ophalen: {INT32} / {INT32} +STR_6378 :Objectenlijst ophalen: STR_6379 :Ongeldige gegevens ontvangen STR_6380 :Update beschikbaar! STR_6381 :Meepraten op de OpenRCT2-Discord @@ -3696,6 +3696,25 @@ STR_6623 :Voer ‘help’ in voor een lijst met beschikbare commando’s. Voe STR_6624 :Vakinspecteur: Elementen sorteren STR_6625 :Ongeldige kleur STR_6626 :Animatie is in spiegelbeeld +STR_6627 :Snelheid is te hoog! +STR_6628 :Kan alleen op de rand geplaatst worden! +STR_6629 :Werkbalkknoppen horizontaal centreren +STR_6630 :Hiermee worden de knoppen van de bovenste werkbalk in het midden geplaatst, in plaats van aan weerszijden. +STR_6631 :Bezig met laden… +STR_6632 :Objecten checken… +STR_6633 :Scenario’s checken… +STR_6634 :Baanontwerpen checken… +STR_6635 :Assetpacks checken… +STR_6636 :Titelpresentaties checken… +STR_6637 :Titelpresentatie wordt geladen… +STR_6638 :Grote UI +STR_6639 :Voert een aantal veranderingen door om het spel gemakkelijker te kunnen bedienen met een touchscreen. +STR_6640 :Assetpacks instellen… +STR_6641 :Laadscherm +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Touch-verbeteringen +STR_6645 :Maakt sommige UI-elementen groter zodat ze gemakkelijker aan te klikken/tikken zijn. ############# # Scenarios # @@ -4272,158 +4291,158 @@ STR_DTLS :Maak je eigen Six Flags-park, door gebruik te maken van attracties ## Wacky Worlds Scenarios -STR_SCNR :Afrika - Diamantmijn +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :Je hebt een verlaten diamantmijn geërfd en een waardevolle diamant gevonden. Je besluit dit geld te investeren om een wereldberoemd themapark te bouwen. -STR_SCNR :Afrika - Oase +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :Er is een oase in de woestijn gevonden die een prachtige locatie van een park zou vormen. Voor transport van en naar de oase is gezorgd. -STR_SCNR :Afrika - Victoriawatervallen +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :Er is een stuwdam gebouwd die goedkope energie in overvloed levert voor je park. Je moet een hoge parkwaarde bereiken om de lening voor de dam terug te betalen. -STR_SCNR :Antarctica - Ecologische reddingsactie +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :De milieuorganisatie heeft je gevraagd om een lelijke oude olieraffinaderij om te vormen tot een toeristische trekpleister. Land is goedkoop maar de rente op leningen is hoog. Je kunt de oude gebouwen verkopen als schroot. -STR_SCNR :Azië - Meer toeristen naar de Chinese Muur +STR_SCNR :De Chinese Muur STR_PARK :De Chinese Muur STR_DTLS :De regering heeft besloten om meer toeristen naar de Chinese Muur door er een themapark naast te bouwen. Geld speelt geen rol! -STR_SCNR :Azië - Polderen aan de kust +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :Een bestaand pretpark heeft geen ruimte meer. Je enige optie is om naar de zee uit te breiden, waarvoor je geld hebt geleend. Vanwege het aardbevingsgevaar zijn er hoogtebeperkingen van kracht. -STR_SCNR :Azië - Paleis van de Maharadja +STR_SCNR :Park Maharadja STR_PARK :Park Maharadja STR_DTLS :De Maharadja heeft jou aangewezen om de lokale bevolking te vermaken. Bouw een park dat is geïnspireerd door het paleis van de Maharadja. -STR_SCNR :Australië - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :Je helpt de Aboriginals om een park te bouwen om het bewustzijn voor hun cultuur te vergroten. Je moet een groot aantal bezoekers aantrekken om hen de unieke geschiedenis van de Aboriginals bij te brengen. -STR_SCNR :Australië - Plezier op het strand +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :Het themapark van een lokale ondernemer is over de kop gegaan. Je bezit zelf al een klein park en hebt het andere park overgenomen. Combineer beide parken tot één groot park. -STR_SCNR :Europa - Europees Cultureel Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :Je bent aangesteld om het beheer over een attractiepark over de Europese cultuur over te nemen. Je moet het aantal bezoekers verhogen om de EU-subsidie terug te betalen voor het einde van de huidige termijn van het Europees Parlement. -STR_SCNR :Europa - Renovatie +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :Een oud park is vervallen. Je hebt een lening van de Europese Unie gekregen om het troosteloze terrein weer in oude luister te herstellen! Je moet het park renoveren en de lening terugbetalen. -STR_SCNR :Noord-Amerika - Extreem Hawaiiaans eiland +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :De bevolking van Hawaii wil wel eens iets spannenders dan surfen. Houd dit in het achterhoofd bij het bouwen van een park om zoveel mogelijk mogelijk toeristen aan te trekken. -STR_SCNR :Noord-Amerika - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :Je moet een park bouwen op de beperkte ruimte aan weerszijden van dit natuurschoon. Hierbij heb je de mogelijkheid om land te kopen van de indianen. -STR_SCNR :Noord-Amerika - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :Je bent een succesvol zakenman op een lange sabbatical. Die wil je gebruiken om het stadspark om te toveren in een achtbanenparadijs. Geld speelt geen rol! -STR_SCNR :Zuid-Amerika - Verloren Incastad +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :Om nog meer toeristen te trekken moet je een park bouwen dat past bij de omgeving. -STR_SCNR :Zuid-Amerika - Regenwoudplateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :In het regenwoud is er niet veel plek. Je moet zo veel mogelijk in de open plek zien te persen om een goed alternatief voor de lokale houtindustrie te vormen. -STR_SCNR :Zuid-Amerika - Carnival van Rio +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :Je hebt een klein park in de buurt van Rio, maar de bank wil haar lening terug. Je moet je winst zien te verhogen om je schuld terug te betalen. ## Time Twister -STR_SCNR :Middeleeuwen - Kasteel +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :De leden van de lokale vereniging die oude veldslagen naspeelt nemen hun hobby serieus. Ze hebben jou de klus toevertrouwd om van Cliffside Castle een middeleeuws themapark te maken. -STR_SCNR :Middeleeuwen - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :Om geld van de rijken naar de armen te brengen hebben jij en je Merry Men besloten een themapark te bouwen in Sherwood Forest. -STR_SCNR :Toekomst - Eerste ontmoeting +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Er is leven ontdekt op een verre planeet! Bouw een buitenaards themapark om munt te slaan uit de onverwachte golf van interesse. -STR_SCNR :Toekomst - Stad van de toekomst +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Laat je inventieve, utopische visie van de toekomst zien! Bedenk een furistisch ontwerp met state-of-the-art attracties. -STR_SCNR :Mythologie - Animatronic-filmset +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :Je moet een bestaand pretpark, gebouwd op een oude filmset, beheren en verbeteren. Bouw een eerbetoon aan de pioniers van de stop-motionanimatie, die de wezens uit de mythologie tot leven brachten op het witte doek. -STR_SCNR :Mythologie - Wieg van de beschaving +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :Je bezit een eiland van grote archeologische waarde, dat je voor het nageslacht wilt beschermen. Dit wil je bekostigen door een park te bouwen met de mythologische geschiedenis van je eiland als thema. -STR_SCNR :Prehistorie - Na de meteoriet +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :Je bezit een stoffige oude meteorietkrater. Als echte ondernemer heb je besloten om er een themapark van te maken en zo munt te slaan uit je (op het eerste gezicht) waardeloze land. -STR_SCNR :Prehistorie - Jurasafari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :Je moet een themapark bouwen in Jurastijl. Om de bezoekers zo dicht mogelijk bij de exotische planten en dieren te laten komen, moeten je attracties over en door de vallei gaan lopen. -STR_SCNR :Prehistorie - Steentijd +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :Om te voorkomen dat er een snelweg wordt aangelegd en zo de mysterieuze prehistorische steencirkels te beschermen, moet je een winstgevend themapark bouwen. Het kan echter lastig worden om bezoekers aan te trekken, aangezien het terrein vrij ruw is. -STR_SCNR :Roaring Twenties - Alcatraz +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :Het beruchte gevangeniseiland, dat ooit volzat met illegale drankstokers en gangsters, is nu te koop. Je hebt besloten het te veranderen in een toeristentrekpleister. Geld speelt geen rol! -STR_SCNR :Roaring Twenties - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :Het is al bijna 75 jaar geleden dat je grootvader de Schneider Cup won. Je hebt besloten zijn prestatie te eren met een themapark dat is geïnspireerd door de beroemde watervliegtuigenrace. -STR_SCNR :Roaring Twenties - Wolkenkrabbers +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :Je bezit een lege kavel in de stad, tussen de laagbouw. Bouw een themapark van wolkenkrabbers, geïnspireerd door de artdecostijl van de jaren twintig. -STR_SCNR :Rock-’n-roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Een groot jaarlijks muziekfestival vindt plaats op jouw terrein. Bouw een hip themapark om het publiek van vrije geesten te vermaken. -STR_SCNR :Rock-’n-roll - Rock-’n-roll +STR_SCNR :Rock ’n’ Roll Revival STR_PARK :Rock ’n’ Roll Revival STR_DTLS :Dit verouderde themapark heeft betere tijden gekend. Geef het park een rock-’n-roll-makeover en verander het in een succesvolle onderneming. diff --git a/data/language/pl-PL.txt b/data/language/pl-PL.txt index f6b0c1fdbb..a336253e5a 100644 --- a/data/language/pl-PL.txt +++ b/data/language/pl-PL.txt @@ -2881,7 +2881,7 @@ STR_5755 :Niewłaściwa wersja gry STR_5756 :Błędne hasło STR_5757 :Serwer osiągnął maksymalną liczbę graczy STR_5758 :{OUTLINE}{GREEN}{STRING} dołączył do gry -STR_5759 :Pobieranie mapy … ({INT32} / {INT32}) KiB +STR_5759 :Pobieranie mapy … STR_5760 :Dolar hongkoński (HK$) STR_5761 :Dolar tajwański (NT$) STR_5762 :Juan chiński (CN¥) @@ -3445,7 +3445,7 @@ STR_6374 :P STR_6375 :Nieznana atrakcja STR_6376 :{WINDOW_COLOUR_2}Pojazd:{NEWLINE}{BLACK}{STRINGID} dla {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Typ: {BLACK}{STRINGID} dla {STRINGID} -STR_6378 :Odebrano listę obiektów: {INT32} / {INT32} +STR_6378 :Odebrano listę obiektów: STR_6379 :Odebrano nieprawidłowe dane STR_6380 :Dostępna aktualizacja! STR_6381 :Dołącz do Discorda OpenRCT2! @@ -4171,87 +4171,87 @@ STR_DTLS :Wybuduj brakujące obiekty “Six Flags” lub upiększ lunapark w ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Afryka - Kopalnia diamentów +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :Otrzymujesz w spadku nieużywaną kopalnię diamentów i znajdujesz w niej cenny kamień szlachetny. Postanawiasz zainwestować zdobytą fortunę w budowę parku tematycznego, który zasłynie na całym świecie. -STR_SCNR :Afryka - Oaza +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :Odkryto pustynną oazę, która może stać się dobrym miejscem pod budowę lunaparku. Transport został zapewniony. -STR_SCNR :Afryka - Wodospad Wiktorii +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :Wybudowano tamę umożliwiającą produkcję taniej energii w hydroelektrowni, która będzie zasilać park. Musisz sprawić, aby osiągnął on dużą wartość, dzięki czemu spłacisz kredyt zaciągnięty na budowę. -STR_SCNR :Antarktyka - Ekologiczny odzysk +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :Agencja ochrony środowiska skierowała cię do przekształcenia starej rafinerii, będącej solą w oku ekologów, w czołową atrakcję turystyczną. Ziemia jest tania, lecz odsetki od kredytów wysokie. Możesz sprzedać stare budynki, aby powiększyć swoje fundusze. -STR_SCNR :Azja - Rozwój turystyki wokół Wielkiego Muru Chińskiego +STR_SCNR :Wielki Mur Chiński STR_PARK :Wielki Mur Chiński STR_DTLS :Władze postanowiły przyciągnąć więcej turystów w okolice Wielkiego Muru, budując w pobliżu park tematyczny. Pieniądze nie grają roli! -STR_SCNR :Azja - Odzysk japońskiego wybrzeża +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :W pewnym parku zabrakło miejsca. Twoją jedyną szansą jest wyjście w morze i w tym celu zaciągasz kredyt. Twoje budowle muszą mieć ograniczoną wysokość z uwagi na obciążenie fundamentów i zagrożenie trzęsieniem ziemi. -STR_SCNR :Azja - Pałac Maharadży +STR_SCNR :Park Maharadży STR_PARK :Park Maharadży STR_DTLS :Maharadża zlecił ci zapewnienie rozrywki swoim licznym poddanym. Wybuduj lunapark, wzorując się na pałacu maharadży. -STR_SCNR :Australia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :Pomagasz Aborygenom w budowie lunaparku w ramach programu świadomości kulturalnej. Musisz przyciągnąć wielu gości i zapoznać ich z unikalnym dziedzictwem ludu Aborygenów. -STR_SCNR :Australia - Zabawa na plaży +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :Miejscowe oceanarium zbankrutowało. Masz już niewielki własny lunapark i kupujesz drugi park od firmy budowlanej. Przekształć je w duży połączony lunapark. -STR_SCNR :Europa - Europejski Festiwal Kulturalny +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :Zlecono ci objęcie kierownictwa działu Turystycznych Atrakcji Kulturalnych. Musisz zwiększyć liczbę gości, aby spłacić unijne dofinansowanie przed zakończeniem bieżącej kadencji parlamentu europejskiego. -STR_SCNR :Europa - Odbudowa +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :Pewien stary lunapark popadł w ruinę. Otrzymujesz fundusze z Unii Europejskiej, aby przywrócić temu żałosnemu miejscu jego dawną chwałę! Musisz odnowić park i zwrócić otrzymany kredyt. -STR_SCNR :Ameryka Płn. - Ekstremalne Hawaje +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :Mieszkańcy Hawajów znudzili się surfowaniem i szukają bardziej intensywnych przeżyć. Budując swój lunapark, musisz o tym pamiętać, aby utrzymać wysoką ocenę dla turystów. -STR_SCNR :Ameryka Płn. - Wielki Kanion +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :Twoim celem jest wybudowanie lunaparku na ograniczonym terenie znajdującym się na jednym z brzegów tego przyrodniczego cudu. Będziesz mógł kupować ziemię od Indian. Musisz osiągnąć swój cel, aby zapewnić utrzymanie mieszkańcom pobliskiego miasteczka. -STR_SCNR :Ameryka Płn. - Raj kolejek górskich +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :Jesteś znanym biznesmenem na urlopie i pragniesz wykorzystać wolny czas na przekształcenie miejskiego lunaparku w raj dla miłośników kolejek górskich. Pieniądze nie grają roli! -STR_SCNR :Ameryka Płd. - Zaginione miasto Inków +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :W celu lepszego wypromowania miejscowej turystyki musisz wybudować lunapark pasujący do swego otoczenia. Obowiązuje ograniczenie wysokości budynków. -STR_SCNR :Ameryka Płd. - Tropikalny płaskowyż +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :W lesie deszczowym miejsce jest bardzo cenne - musisz upchnąć jak najwięcej obiektów na dostępnym wykarczowanym obszarze, aby lunapark stał się dobrą alternatywą dla miejscowego przemysłu drzewnego. -STR_SCNR :Ameryka Płd. - Karnawał w Rio +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :Prowadzisz mały lunapark pod Rio, a bank wezwał cię do spłacenia kredytu. Musisz szybko zwiększyć swoje przychody, aby zwrócić dług. @@ -4259,72 +4259,72 @@ STR_DTLS :Prowadzisz mały lunapark pod Rio, a bank wezwał cię do spłaceni ## Time Twister Scenarios ############################################################################### -STR_SCNR :Mroczne Wieki - zamek +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Miejscowi miłośnicy odtwarzania rycerskich turniejów podchodzą do swego hobby raczej poważnie. Powierzyli ci zadanie budowy lunaparku stylizowanego na średniowiecze, który ma powstać na ziemiach Zamku na urwisku. -STR_SCNR :Mroczne Wieki - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :Aby uwolnić bogatych od bogactwa i rozdać go biednym, wraz ze swą bandą wesołych ludzi z lasu planujesz wybudować park tematyczny w lesie Sherwood. -STR_SCNR :Przyszłość - Pierwsze spotkania +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Odkryto życie na odległej planecie! Wybuduj park tematyczny, którego motywem przewodnim będą kosmici, a zgarniesz kasę dzięki bezprecedensowej fali zainteresowania tym zagadnieniem. -STR_SCNR :Przyszłość - Świat przyszłości +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Pokaż ludziom swoją twórczą, utopijną wizję przyszłości - wybuduj futurystyczny lunapark, oferujący atrakcje najwyższej jakości. -STR_SCNR :Mitologia - Mechaniczny plan filmowy +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :Otrzymujesz zadanie prowadzenia i rozbudowy istniejącego lunaparku, wybudowanego na dawnym planie filmowym. Stwórz hołd dla pionierów animacji poklatkowej, którzy przywoływali do życia mitologiczne potwory na srebrnym ekranie. -STR_SCNR :Mitologia - Kołyska cywilizacji +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :Jesteś właścicielem pewnej wyspy o dużej wartości archeologicznej. Postanawiasz sfinansować konserwację tych zabytków, budując lunapark w stylu inspirowanym mitologicznym dziedzictwem regionu. -STR_SCNR :Prehistoria - Po asteroidzie +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :Otrzymujesz na własność zakurzony krater po meteorycie. Jako przedsiębiorca z krwi i kości, postanawiasz zbudować park tematyczny związany z tym obiektem i przekształcić w ten sposób swój bezwartościowy teren w źródło przyzwoitych dochodów. -STR_SCNR :Prehistoria - Jurajskie safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :Otrzymujesz zadanie wybudowania lunaparku w stylu jurajskim. Aby goście mogli wygodnie podziwiać egzotyczne rośliny i okazy zwierząt, musisz skonstruować kolejki przejeżdżające nad doliną i prowadzące do niej. -STR_SCNR :Prehistoria - Epoka kamienna +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :Aby powstrzymać budowniczych autostrady i zachować dla potomności tajemnicze kamienne kręgi, musisz wybudować lunapark w stylu epoki kamiennej i osiągnąć zyski. Jednak przyciągnięcie gości może okazać się trudne, bo okolica jest wybitnie niegościnna. -STR_SCNR :Ryczące Dwudziestki - Wyspa więzienna +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :Niesławna wyspa więzienna, której ludność składała się niegdyś z przemytników i bandytów, jest na sprzedaż. Postanawiasz przekształcić ją w niesamowitą atrakcję turystyczną - pieniądze nie grają roli. -STR_SCNR :Ryczące Dwudziestki - Puchar Schneidera +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :Za kilka lat będzie mieć miejsce 75. rocznica zdobycia przez twego dziadka Pucharu Schneidera. Postanawiasz uczcić ten wielki sukces, budując lunapark stylizowany na ów sławny wyścig hydroplanów. -STR_SCNR :Ryczące Dwudziestki - Drapacze chmur +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :Jesteś właścicielem pustej parceli w pobliżu dzielnicy o niskiej zabudowie. Aby wycisnąć jak największy zysk ze swej nieruchomości, wybuduj lunapark, którego motywem wiodącym będą drapacze chmur w stylu art deco, charakterystycznym dla lat dwudziestych. -STR_SCNR :Rock ’n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Na twoim terenie odbywa się wielki doroczny festiwal muzyczny. Wybuduj lunapark w stylu hipisowskim, by wolnomyślicielska publiczność mogła się w nim zabawić. -STR_SCNR :Rock ’n’ Roll - Rock ’n’ Roll +STR_SCNR :Rock ’n’ Roll Revival STR_PARK :Rock ’n’ Roll Revival STR_DTLS :Ten starzejący się lunapark ma najlepsze dni za sobą. Pomóż właścicielom nadać mu stylowy, rockandrollowy wygląd i przekształć to miejsce w dochodowe przedsięwzięcie. diff --git a/data/language/pt-BR.txt b/data/language/pt-BR.txt index a7817ccfe0..31a7dcf3b1 100644 --- a/data/language/pt-BR.txt +++ b/data/language/pt-BR.txt @@ -2885,7 +2885,7 @@ STR_5755 :Versão de Software Incorreta (Servidor está usando {STRING}) STR_5756 :Senha Ruim STR_5757 :Servidor Cheio STR_5758 :{OUTLINE}{GREEN}{STRING} entrou no jogo -STR_5759 :Baixando mapa … ({INT32} / {INT32}) KiB +STR_5759 :Baixando mapa … STR_5760 :Dólar de Hong Kong (HK$) STR_5761 :Dólar de New Taiwan (NT$) STR_5762 :Yuan Chinês(CN¥) @@ -3449,7 +3449,7 @@ STR_6374 :F STR_6375 :Atração desconhecida STR_6376 :{WINDOW_COLOUR_2}Veículo: {NEWLINE}{BLACK}{STRINGID} para {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Tipo: {BLACK}{STRINGID} para {STRINGID} -STR_6378 :Lista de objetos sendo recebidos: {INT32} / {INT32} +STR_6378 :Lista de objetos sendo recebidos: STR_6379 :Dados inválidos recebidos STR_6380 :Atualização disponível! STR_6381 :Faça parte do Discord do OpenRCT2! @@ -3698,6 +3698,24 @@ STR_6624 :Inspetor de azulejo: Ordenar elementos STR_6625 :Cor inválida STR_6626 :Animação invertida STR_6627 :Velocidade da pista muito alta! +STR_6628 :Só pode ser colocado nas bordas do caminho! +STR_6629 :Alinhar botões da barra ferramentas horizontalmente centralizados +STR_6630 :Essa configuração irá alinhar os botões da barra de ferramentas horizontalmente no centro da tela. A maneira tradicional de alinhá-los é nos cantos esquerdo e direito. +STR_6631 :Carregando… +STR_6632 :Verificando arquivos de objeto… +STR_6633 :Verificando arquivos de cenário… +STR_6634 :Verificando arquivos de projeto de pista… +STR_6635 :Verificando conjuntos de recurso… +STR_6636 :Verificando sequências de título… +STR_6637 :Carregando sequências de título… +STR_6638 :Interface Gráfica Ampliada +STR_6639 :Modifica a interface para ser mais adequada ao uso por toque +STR_6640 :Modificar conjuntos de recurso… +STR_6641 :Janela de carregamento/progresso +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} KiB) +STR_6644 :Melhorias para toque +STR_6645 :Aumenta alguns elementos da interface para ficarem mais fáceis de tocar. ############# # Scenarios # @@ -4287,87 +4305,87 @@ STR_DTLS :Construa os brinquedos Six Flags que faltam, ou crie seus próprios ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :África - Minas de Diamantes +STR_SCNR :Minas da África STR_PARK :Minas da África STR_DTLS :Você herdou uma mina de diamante fora de uso, e encontra um diamante valioso. Você decide investir este dinheiro para construir um parque temático famoso mundialmente. -STR_SCNR :África - Oásis +STR_SCNR :Loucuras da Miragem STR_PARK :Loucuras da Miragem STR_DTLS :Um Oásis deserto foi encontrado e proporcionaria uma bela localização para um parque. Transporte para o oasis foi fornecido. -STR_SCNR :África - Cataratas da Vitória +STR_SCNR :No limite STR_PARK :No limite STR_DTLS :Uma barreira foi construída oferecendo energia hidroelétrica barata e abundante com a qual funcionará um parque. Você precisa atingir um alto valor de parque para ajudar a reembolsar o empréstimo para a barreira. -STR_SCNR :Antártica - Resgate Ecológico +STR_SCNR :Aventuras Geladas STR_PARK :Aventuras Geladas STR_DTLS :Ajude a agência de ambiente a transformar uma grande e velha refinaria ecológica de petróleo em atração turística de alto nível. Terrenos baratos, mas juros do empréstimo não. Pode-se vender os prédios velhos para melhorar a situação. -STR_SCNR :Ásia - Melhorias Turísticas na Grande Muralha da China +STR_SCNR :Grande Muralha da China STR_PARK :Grande Muralha da China STR_DTLS :As autoridades decidiram melhorar o turismo em volta da Grande Muralha construindo um parque no terreno ao lado. Dinheiro não é o problema! -STR_SCNR :Ásia - Recuperação da Costa Japonesa +STR_SCNR :Costa de Okinawa STR_PARK :Costa de Okinawa STR_DTLS :Um parque já existente ficou sem espaço. Sua única opção é construir em cima do mar, e também você pegou um empréstimo. Restrições de altura nas suas construções são obrigatórias por causa das fundações e riscos de terremotos. -STR_SCNR :Ásia - Palácio do Marajá +STR_SCNR :Parque do Marajá STR_PARK :Parque do Marajá STR_DTLS :Você foi contratado pelo Marajá para trazer entretenimento para a grande população local. Construa um parque inspirado no palácio Mahajara. -STR_SCNR :Australásia - Uluru +STR_SCNR :Aventura Uluru STR_PARK :Aventura Uluru STR_DTLS :Você está ajudando os aborígenes a construir um parque como parte do programa de conscientização cultural. Você precisa conseguir um grande número de visitantes para educá-los no patrimônio único dos aborígenes. -STR_SCNR :Australásia - Diversão na Praia +STR_SCNR :Explosão de Churrasco na Praia STR_PARK :Explosão de Churrasco na Praia STR_DTLS :Um empreendimento local de parque de vida marinha foi derrubado. Você já opera um pequeno parque e compra o outro parque da companhia de construção. Desenvolva um grande parque combinado. -STR_SCNR :Europa - Festival Cultural Europeu +STR_SCNR :Extravagância Europeia STR_PARK :Extravagância Europeia STR_DTLS :Você foi trazido para controlar uma Atração Cultural Europeia do Visitante e deve aumentar o número de visitantes a fim de reembolsar o subsídio da União Europeia no fim do mandato atual do Parlamento Europeu. -STR_SCNR :Europa - Renovação +STR_SCNR :Das Cinzas STR_PARK :Das Cinzas STR_DTLS :Um velho parque caiu em ruínas. Você ganha uma concessão da União Europeia para retornar essa área privada à sua antiga glória! Você precisa renovar o parque e reembolsar a concessão. -STR_SCNR :América do Norte - Longínqua Ilha Havaiana +STR_SCNR :Waikiki Maluca STR_PARK :Waikiki Maluca STR_DTLS :As pessoas do Havaí estão entediadas de surfar e estão procurando por algo mais intenso. Você precisa construir um parque com isto em mente para manter a atração turística da área com classificação alta. -STR_SCNR :América do Norte - Grand Canyon +STR_SCNR :Calamidades do Canyon STR_PARK :Calamidades do Canyon STR_DTLS :Você tem que construir um parque num terreno limitado nos dois lados desse tesouro natural - tenha a oportunidade de comprar terrenos vizinhos dos Índios Nativos Americanos. Você precisa completar o objetivo para suprir a população da cidade local. -STR_SCNR :América do Norte - Paraíso da Montanha-Russa +STR_SCNR :Paraíso da Montanha-Russa STR_PARK :Paraíso da Montanha-Russa STR_DTLS :Você é um bem-sucedido magnata dos negócios em longas férias que deseja usar esse tempo transformando o parque da cidade em um Céu de Montanha-Russa. Dinheiro não é o problema! -STR_SCNR :América do Norte - Cidade Perdida Inca +STR_SCNR :Fundadação da Cidade Perdida STR_PARK :Fundadação da Cidade Perdida STR_DTLS :Para dar um impulso adicional ao turismo local você deve construir um parque que está em sintonia com seus arredores. -STR_SCNR :América do Sul - Planalto da Floresta Tropical +STR_SCNR :Diversão na Floresta STR_PARK :Diversão na Floresta STR_DTLS :Espaço é limitado nessa preciosa floresta tropical - você deve amontoar o máximo possível na clareira existente, a fim de prover uma alternativa viável para a indústria madeireira local. -STR_SCNR :América do Sul - Carnaval do Rio +STR_SCNR :Praia do Pão de Açúcar STR_PARK :Praia do Pão de Açúcar STR_DTLS :Você gere um pequeno parque perto do Rio, mas o banco convocou o seu empréstimo. Você precisa aumentar rapidamente a sua capacidade de ganhos para reembolsar este débito inesperado. @@ -4375,72 +4393,72 @@ STR_DTLS :Você gere um pequeno parque perto do Rio, mas o banco convocou o s ## Time Twister Scenarios ############################################################################### -STR_SCNR :Idade Média - Castelo +STR_SCNR :Castelo Cliffside STR_PARK :Castelo Cliffside STR_DTLS :Membros locais da sociedade de reconstituição da batalha são bastante sérios acerca de seus hobbies. Eles lhe confiaram o trabalho de construir um parque temático da Idade das Trevas nos terrenos do Castelo Cliffside. -STR_SCNR :Idade Média - Robin Hood +STR_SCNR :Floresta de Sherwood STR_PARK :Floresta de Sherwood STR_DTLS :Para liberar a riqueza dos ricos e distribuir para os necessitados, você e seus seguidores decidiram construir um parque temático na Floresta de Sherwood. -STR_SCNR :Futuro - Primeiro Contado +STR_SCNR :Extravagância Extraterrestre STR_PARK :Extravagância Extraterrestre STR_DTLS :Vida foi descoberta em um planeta distante. Construa um parque temático alienígena para ganhar dinheiro com a onda de juros sem precedentes. -STR_SCNR :Futuro - Mundo Futurista +STR_SCNR :Cidade Gemini STR_PARK :Cidade Gemini STR_DTLS :Mostre sua inventiva, utópica visão do futuro - mostre um projeto futurista de parque que incorpore atrações de ponta. -STR_SCNR :Mitológico - Set de Filmagem Animatrônico +STR_SCNR :Travessuras Animatrônicas STR_PARK :Travessuras Animatrônicas STR_DTLS :Você foi designado para gerir e melhorar um parque temático existente, que foi construído num velho set de filme. Faça um tributo aos animadores pioneiros de stop-motion, os primeiros a trazer criaturas míticas à vida na tela prateada. -STR_SCNR :Mitológico - Berço da Civilização +STR_SCNR :Loucura Mitológica STR_PARK :Loucura Mitológica STR_DTLS :Você é dono de uma ilha de valor arqueológico particular. Você decidiu financiar sua preservação construindo um parque temático baseado no rico patrimônio Mitológico da área. -STR_SCNR :Pré-Histórico - Depois do Asteroide +STR_SCNR :Diversão na Cratera STR_PARK :Diversão na Cratera STR_DTLS :Você é dono de uma velha cratera de meteoro empoeirada. No verdadeiro espírito empreendedor, você decidiu construir um parque temático de asteroide e converta seu terreno aparentemente sem valor em uma grande fortuna. -STR_SCNR :Pré-Histórico - Jurassic Safari +STR_SCNR :Parquessauro STR_PARK :Parquessauro STR_DTLS :Você recebeu a tarefa de construir um parque temático da Era Jurássica. Para otimizar o acesso de seus visitantes para a exibição de plantas e animais exóticos, você precisará construir brinquedos envolta e dentro do vale. -STR_SCNR :Pré-Histórico - Idade da Pedra +STR_SCNR :Passeio Rochoso STR_PARK :Passeio Rochoso STR_DTLS :Frustre os construtores da rodovia e preserve os misteriosos círculos de pedra antigos ao construir um parque temático da Idade da Pedra e lucrar. No entanto, atrair visitantes pode ser desafiador, já que o terreno é um pouco inóspito. -STR_SCNR :Anos 20 - Ilha-Prisão +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :A infame Ilha da Prisão - cuja população uma vez inchou com contrabandistas e estragos - agora está à venda. Você decidiu convertê-la em uma atração turística de alto nível, e dinheiro não é o problema. -STR_SCNR :Anos 20 - Copa Schneider +STR_SCNR :Praia Schneider STR_PARK :Praia Schneider STR_DTLS :O 75º aniversário da vitória do seu avô na Copa Schneider está chegando em alguns anos. Você vai honrar a conquista dele construindo um parque temático baseado na famosa corrida de hidroavião. -STR_SCNR :Anos 20 - Arranha-Céus +STR_SCNR :Metrópole STR_PARK :Metrópole STR_DTLS :Você é dono de um lote vazio perto da parte baixa da cidade. Para espremer o máximo de sua propriedade urbana, construa um parque temático arranha-céu inspirado pela arquitetura Art Déco crescente dos anos vinte. -STR_SCNR :Rock ’n’ Roll - Paz e Amor +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :Um grande festival anual de música acontece em seu terreno. Construa um parque temático moderno para manter a audiência de espírito livre entretida. -STR_SCNR :Rock ’n’ Roll - Rock ’n’ Roll +STR_SCNR :Renascimento do Rock ’n’ Roll STR_PARK :Renascimento do Rock ’n’ Roll STR_DTLS :Este parque temático envelhecido já viu dias melhores. Ajude o dono dar uma aparência rock ’n’ roll retrô e transforme o lugar em um local bem-sucedido. diff --git a/data/language/ru-RU.txt b/data/language/ru-RU.txt index 5655a22f86..3cd9a5933e 100644 --- a/data/language/ru-RU.txt +++ b/data/language/ru-RU.txt @@ -2813,87 +2813,87 @@ STR_DTLS :Постройте собственный парк Six Flags. Вы ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR : Африка - Добыча алмазов +STR_SCNR :Шахты Африки STR_PARK :Шахты Африки STR_DTLS :Вы унаследовали алмазную шахту и нашли дорогой алмаз. Затем вы решили инвестировать деньги в тематический парк. -STR_SCNR : Африка - Оазис +STR_SCNR :Мираж STR_PARK :Мираж STR_DTLS :Был открыт пустынный оазис, который может стать прекрасным местом для парка. Транспорт в оазис уже обеспечен. -STR_SCNR : Африка - Водопад +STR_SCNR :Водопад STR_PARK :Водопад STR_DTLS :Была построена плотина, котор. дала дешёвую электроэнергию. Вам надо увеличить доходы парка, чтобы помочь выплатить заем за плотину. -STR_SCNR : Антарктика - Экоспасение +STR_SCNR :Ледовый Мир STR_PARK :Ледовый Мир STR_DTLS :Агентство по охране природы обратилось к вам, чтобы попросить помощи в строительстве парка развлечений. Земля недорога, но процент по кредитам высок. Можете продавать старые постройки. -STR_SCNR : Евразия - Великая Cтена +STR_SCNR :Великая стена STR_PARK :Великая стена STR_DTLS :Власти решили развивать туризм вокруг ВКС, построив тематический парк. Деньги - не проблема! -STR_SCNR : Евразия - Восточные берега +STR_SCNR :Окинава STR_PARK :Окинава STR_DTLS :Парку не хватает земли. Единственный шанс - строить в море, и вы берете заем. Высоту сооружений ограничивает фундамент и риск землетрясений. -STR_SCNR : Евразия - Магараджа +STR_SCNR :Парк Магарадж STR_PARK :Парк Магарадж STR_DTLS :Вас выбрали развлекать людей вокруг Магараджи. Постройте парк в духе дворца Магараджей. -STR_SCNR : Австралазия - Скала Айа +STR_SCNR :Приключение Айа STR_PARK :Приключение Айа STR_DTLS :Вы помогаете аборигенам построить парк, как часть культурной программы. Вам нужно привлечь большое число гостей и передать им уникальное наследие местной культуры. -STR_SCNR : Австралазия - Побережье +STR_SCNR :Барбекю на Берегу STR_PARK :Барбекю на Берегу STR_DTLS :Местный морской парк потерпел банкротство. У вас уже есть небольшой парк и вы можете купить еще один у строительной компании. Создайте один общий парк. -STR_SCNR : Европа - Фестиваль Культуры +STR_SCNR :Европейский Фестиваль STR_PARK :Европейский Фестиваль STR_DTLS :Вам передали в управление Европейский Культурный Центр. Вы должны увеличить число гостей и вернуть субсидию Евросоюза до начала парламентских выборов. -STR_SCNR : Европа - Обновление +STR_SCNR :Возрождение STR_PARK :Возрождение STR_DTLS :Старый парк пришел в запустение. Вы получили грант Евросоюза и должны вернуть эту землю к былой славе! Необходимо обновить парк и выплатить грант. -STR_SCNR : С. Америка - Гавайский экстрим +STR_SCNR :Ваки Ваикики STR_PARK :Ваки Ваикики STR_DTLS :Населению Гаваев надоело заниматься сёрфингом и они желают что-нибудь более экстремальное. Вам надо построить парк, чтобы жители островов снова почувствовали вкус жизни! -STR_SCNR : Сев. Америка - Гранд Каньон +STR_SCNR :Гранд Каньон STR_PARK :Гранд Каньон STR_DTLS :Вы должны построить парк на небольшом участке земли - у вас есть возможность покупать близлежащие территории у местных индейцев. Необходимо поддерживать население местного городка. -STR_SCNR : Сев. Америка - Горки в Небесах +STR_SCNR :Горки в Небесах STR_PARK :Горки в Небесах STR_DTLS :Вы - успешный предприниматель и желаете сделать из городского парка Горки на Небесах. Деньги для вас - не проблема! -STR_SCNR : Южн. Америка - Город инков +STR_SCNR :Город Инков STR_PARK :Город Инков STR_DTLS :Чтобы развивать местный туризм, вы должны создать парк в духе местных достопримечательностей. -STR_SCNR : Юж. Америка - Лесное Плато +STR_SCNR :Тропический Лес STR_PARK :Тропический Лес STR_DTLS :Место ограничено ценнейшими тропическими лесами - вы должны строить на существующей территории, чтобы не дать вырубать леса. -STR_SCNR : Юж. Америка - Карнавал в Рио +STR_SCNR :Сахарный Берег STR_PARK :Сахарный Берег STR_DTLS :У вас небольшой парк близ Рио, но банк требует вернуть кредит. Вам срочно нужно увеличить прибыли, чтобы вернуть долг. @@ -2901,71 +2901,71 @@ STR_DTLS :У вас небольшой парк близ Рио, но бан ## Time Twister Scenarios ############################################################################### -STR_SCNR : Темные Века-Замок +STR_SCNR :Замок на Скале STR_PARK :Замок на Скале STR_DTLS :Члены местного исторического клуба серьезно увлечены своим хобби. Они уговаривают вас построить Парк развлечений на средневековую тематику на территории Старинного Замка. -STR_SCNR : Темные Века-Робин Гуд +STR_SCNR :Шервудский Лес STR_PARK :Шервудский Лес STR_DTLS :Чтобы отобрать деньги у богатых и отдать их беднякам, вы и ваши друзья-разбойники решили построить парк развлечений в Шервудском Лесу. -STR_SCNR : Будущее - Первый Контакт +STR_SCNR :Фантастическая Феерия STR_PARK :Фантастическая Феерия STR_DTLS :На отдаленной планете была открыта жизнь. Постройте инопланетный тематический парк, чтобы заработать на сенсации. -STR_SCNR : Будущее-Мир Будущего +STR_SCNR :Геминеи STR_PARK :Геминеи STR_DTLS :Покажите свое видение будущего - постройте тематический парк футуристической направленности с потрясающими аттракционами. -STR_SCNR : Мифология - Анимационная киностудия +STR_SCNR :Студия Абсурда STR_PARK :Студия Абсурда STR_DTLS :Вам поставили задачу улучшить существующий тематический парк, построенный на месте старой киностудии. Сделайте акцент на мифических существах, которых оживили пионеры анимации. -STR_SCNR : Мифология - Колыбель Цивилизации +STR_SCNR :Мифическое Безумство STR_PARK :Мифическое Безумство STR_DTLS :Вы владеете островом, имеющим особое археологическое значение. И решили построить парк развлечений, основанный на богатом мифологическом наследии острова. -STR_SCNR : Древние времена - Астероид +STR_SCNR :Кратер STR_PARK :Кратер STR_DTLS :Вы владеете старым метеоритным кратером. И решаете превратить дешевую бесполезную землю в процветающее предприятие, построив тематический парк. -STR_SCNR : Прехисторик - Юрское Сафари +STR_SCNR :Брегозавр STR_PARK :Брегозавр STR_DTLS :Вам поставили задачу построить парк развлечений Юрского Периода. Для оптимизации доступа посетителей к экзотическим растениям и животным вам придется соорудить аттракционы, катающие людей по территории. -STR_SCNR : Каменный век +STR_SCNR :Деревня STR_PARK :Деревня STR_DTLS :Чтобы помешать дорожным строителям и сохранить таинственные каменные круги, вам придётся построить тематический парк каменного века и получить с него прибыль. Однако, местность вам досталась не особо гостеприимная. -STR_SCNR : Двадцатые годы - Тюремный остров +STR_SCNR :Алкатрас STR_PARK :Алкатрас STR_DTLS :Безымянный тюремный остров, чье население раньше составляли контрабандисты и рэкетиры, сейчас выставлен на продажу. Вы решили превратить его в туристическую достопримечательность. -STR_SCNR : Двадцатые Годы - Кубок Шнайдера +STR_SCNR :Кубок Шнайдера STR_PARK :Кубок Шнайдера STR_DTLS :Через несколько лет наступает 75я годовщина завоевания вашим дедушкой Кубка Шнайдера. Вы собираетесь отметить его достижение, построив тематический парк, посвящённый гонкам на гидросамолетах. -STR_SCNR : Двадцатые годы - Небоскребы +STR_SCNR :Метрополис STR_PARK :Метрополис STR_DTLS :Вы владеете пустырём в одном из районов города. Чтобы выжать из своей земли максимум, постройте парк развлечений в виде небоскрёба в духе двадцатых годов. -STR_SCNR : Рок-н-Ролл - Сила Цветов +STR_SCNR :Цветник STR_PARK :Цветник STR_DTLS :На вашей земле проводится ежегодный музыкальный фестиваль. Постройте людям парк развлечений в духе музыки и свободы. -STR_SCNR : Рок-н-Ролл - Рок-н-Ролл +STR_SCNR :Рок-н-Ролл Жив STR_PARK :Рок-н-Ролл Жив STR_DTLS :Этот чудесный парк видел и лучшие дни. Помогите его владельцу улучшить дела и превратить парк в процветающее предприятие. diff --git a/data/language/sv-SE.txt b/data/language/sv-SE.txt index b335b349f2..a9e7c7dec4 100644 --- a/data/language/sv-SE.txt +++ b/data/language/sv-SE.txt @@ -2889,7 +2889,7 @@ STR_5755 :Fel version av OpenRCT2 (servern använder {STRING}) STR_5756 :Fel lösenord STR_5757 :Servern är full STR_5758 :{OUTLINE}{GREEN}{STRING} har anslutit till spelet -STR_5759 :Laddar ner banan… ({INT32} av {INT32}) KiB +STR_5759 :Laddar ner banan… STR_5760 :Hong Kong-dollar (HK$) STR_5761 :New Taiwan-dollar (NT$) STR_5762 :Kinesiska Yuan (CN¥) @@ -3453,7 +3453,7 @@ STR_6374 :F STR_6375 :Okänd åktur STR_6376 :{WINDOW_COLOUR_2}Fordon:{NEWLINE}{BLACK}{STRINGID} för {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Typ: {BLACK}{STRINGID} för {STRINGID} -STR_6378 :Mottar objektlista: {INT32} / {INT32} +STR_6378 :Mottar objektlista: STR_6379 :Mottog ogiltiga data STR_6380 :Uppdatering tillgänglig! STR_6381 :Gå med i OpenRCT2 Discord! @@ -3617,7 +3617,7 @@ STR_6539 :Bromsen stängd STR_6540 :{WINDOW_COLOUR_2}Särskilt tack till följande företag för att de tillåter oss att använda deras likhet: STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG STR_6542 :Medverkande -STR_6543 :Medverkande ... +STR_6543 :Medverkande … STR_6544 :Lånet kan inte vara negativt! STR_6545 :Använd RCT1-ränteberäkning STR_6546 :Använd RollerCoaster Tycoon 1:s ränteberäkningsalgoritm, som använder en fast procentsats på cirka 1,33 %. @@ -3659,7 +3659,7 @@ STR_6581 :Är du säker på att du vill återställa alla kortkommandon på d STR_6582 :Öppna fönstret för kortkommandon STR_6583 :{WINDOW_COLOUR_2}Bakvända tåg STR_6584 :Välj att köra tåg baklänges -STR_6585 :Ändringar kan inte göras... +STR_6585 :Ändringar kan inte göras… STR_6586 :OpenRCT2 STR_6587 :OpenRCT2:s omslagstema är ett verk av Allister Brimble,{NEWLINE}licensierat under CC BY-SA 4.0. STR_6588 :Tack till Herman Riddering för att vi fick spela in 35er Voigt. @@ -4263,87 +4263,87 @@ STR_DTLS :Bygg de Six Flags-attraktionerna som saknas eller skapa dina egna f ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Afrika – Afrikansk diamantgruva +STR_SCNR :Afrikas gruvor STR_PARK :Afrikas gruvor STR_DTLS :Du har hittat en diamant efter att ha ärvt en övergiven diamantgruva. Du beslutar dig för att satsa pengarna på ett storslaget nöjesfält. -STR_SCNR :Afrika – Oas +STR_SCNR :Hägring och fägring STR_PARK :Hägring och fägring STR_DTLS :Man har upptäckt en ökenoas som skulle passa utmärkt till ett nöjesfält. Transportmöjligheter till oasen har ordnats redan. -STR_SCNR :Afrika – Victoriafallen +STR_SCNR :Över kanten STR_PARK :Över kanten STR_DTLS :En nybyggd damm ger tillräckligt med billig vattenkraft för att kunna driva ett nöjesfält. Du måste dock uppnå ett högt parkvärde för att kunna betala tillbaka lånet för dammen. -STR_SCNR :Antarktis – Miljöräddning +STR_SCNR :Iskallt äventyr STR_PARK :Iskallt äventyr STR_DTLS :En miljöorganisation har bett dig att bygga om ett gammalt, miljöfarligt oljeraffinaderi till en toppmodern turistattraktion. Marken är billig, men låneräntan är hög. Du kan dock sälja de gamla byggnaderna. -STR_SCNR :Asien – Turistsatsning vid Kinesiska muren +STR_SCNR :Kinesiska muren STR_PARK :Kinesiska muren STR_DTLS :Myndigheterna har beslutat att stödja turismen kring Kinesiska muren genom att bygga ett nöjesfält i dess närhet. Pengar är inget hinder! -STR_SCNR :Asien – Japansk kustremsa +STR_SCNR :Okinawa-kusten STR_PARK :Okinawa-kusten STR_DTLS :Ett nöjesfält behöver mer plats. Din enda möjlighet är att ta ett lån och bygga ut mot havet. Höjdrestriktioner råder på grund av jordbävningsfaran. -STR_SCNR :Asien – Maharadjans palats +STR_SCNR :Maharadjaparken STR_PARK :Maharadjaparken STR_DTLS :Du har fått i uppdrag av maharadjan att underhålla lokalbefolkningen. Inhämta inspiration från maharadjans palats när du bygger nöjesfältet. -STR_SCNR :Australasien – Ayers Rock +STR_SCNR :Ayers äventyr STR_PARK :Ayers äventyr STR_DTLS :Du hjälper urbefolkningen att bygga ett nöjesfält som en del av ett kulturprogram. Du måste locka tillräckligt med besökare för att kunna sprida urbefolkningens kultur. -STR_SCNR :Australasien – Fun at the Beach +STR_SCNR :Strandhugg STR_PARK :Strandhugg STR_DTLS :En lokal affärsmans vattenpark har gått i konkurs. Du driver redan en liten välfungerande park, och har köpt upp konkursboet. Utveckla det hela till en stor gemensam park. -STR_SCNR :Europa – Europeisk kulturfestival +STR_SCNR :Europeisk festival STR_PARK :Europeisk festival STR_DTLS :Du har blivit erbjuden att ta över en europeisk turistattraktion, men måste öka besöksfrekvensen för att kunna betala tillbaka ett EU-lån innan det europeiska parlamentet tar sommarlov. -STR_SCNR :Europa – Renovering +STR_SCNR :Ur askan STR_PARK :Ur askan STR_DTLS :Ett gammalt nöjesfält har förfallit. Du har beviljats ett EU-lån för att kunna återställa det nedgångna området till sin forna prakt. Du måste renovera nöjesfältet och betala tillbaka lånet. -STR_SCNR :Nordamerika – Extrem Hawaii-ö +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :Folket på Hawaii har tröttnat på att surfa och vill göra något mer spännande. Du måste bygga ett nöjesfält för att hålla dem på gott humör och bibehålla områdets attraktionskraft. -STR_SCNR :Nordamerika – Grand Canyon +STR_SCNR :Trubbel i Canyon STR_PARK :Trubbel i Canyon STR_DTLS :Du måste bygga ett nöjesfält på ett begränsat område på båda sidor om detta naturfenomen. Du har möjlighet att köpa upp angränsande land från urbefolkningen. Målet med bygget är att bibehålla den lokala befolkningssiffran. -STR_SCNR :Nordamerika – Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :Du är en framgångsrik affärsman som under ett sabbatsår beslutar dig för att förvandla en stadspark till ett ”Rollercoaster Heaven”, oavsett kostnad! -STR_SCNR :Sydamerika – Förlorad inka-stad +STR_SCNR :Grundare av Förlorade Staden STR_PARK :Grundare av Förlorade Staden STR_DTLS :Du måste öka de lokala turistintäkterna genom att bygga ett nöjesfält som passar omgivningen och håller sig inom höjdrestriktionerna. -STR_SCNR :Sydamerika – Regnskogsplatå +STR_SCNR :Kul i regnskog STR_PARK :Kul i regnskog STR_DTLS :Utrymmet är begränsat i den utrotningshotade regnskogen. Du måste få plats med så mycket som möjligt i gläntan för att kunna erbjuda ett alternativ till den lokala timmerindustrin. -STR_SCNR :Sydamerika – Rio-karneval +STR_SCNR :Sockersöta stränder STR_PARK :Sockersöta stränder STR_DTLS :Du driver ett litet nöjesfält nära Rio, men banken kräver plötsligt betalning av ditt lån. Du måste öka dina intäkter snabbt för att kunna klara den uppkomna krisen. @@ -4351,72 +4351,72 @@ STR_DTLS :Du driver ett litet nöjesfält nära Rio, men banken kräver plöt ## Time Twister Scenarios ############################################################################### -STR_SCNR :Medeltiden – Slott +STR_SCNR :Slott på klipporna STR_PARK :Slott på klipporna STR_DTLS :Medlemmarna i den lokala medeltidsföreningen tar sin hobby på allvar. De har bett dig konstruera en nöjespark med medeltidstema på det gamla slottets ägor. -STR_SCNR :Medeltiden – Robin Hood +STR_SCNR :Sherwoodskogen STR_PARK :Sherwoodskogen STR_DTLS :För att kunna stjäla mer från de rika och ge till de fattiga har du och dina män bestämt er för att bygga ett nöjesfält i Sherwoodskogen. -STR_SCNR :Framtid – Första kontakt +STR_SCNR :Utomjordisk extravagans STR_PARK :Utomjordisk extravagans STR_DTLS :Liv har påträffats på en främmande planet. Bygg en park med utomjordiskt tema för att tjäna pengar på folks nyväckta intresse. -STR_SCNR :Framtid – Framtidsvärld +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Realisera din innovativa och utopiska vision av framtiden. Bygg en futuristisk park med de allra senaste attraktionerna. -STR_SCNR :Mytologisk tid – Animatronisk filminspelning +STR_SCNR :Animatroniska äventyr STR_PARK :Animatroniska äventyr STR_DTLS :Du har fått i uppgift att driva och förbättra en existerande park som ligger på en gammal filminspelningsplats. Bygg en hyllning till filmhistoriens animationspionjärer som först gav liv åt förhistoriska vidunder på vita duken. -STR_SCNR :Mytologisk tid – Civilisationens vagga +STR_SCNR :Mytologiskt arv STR_PARK :Mytologiskt arv STR_DTLS :Du äger en ö av högt arkeologiskt värde. Du har bestämt dig för att finansiera dess bevarande genom att konstruera ett nöjesfält med ett tema baserat på områdets rika mytologiska arv. -STR_SCNR :Förhistorisk tid – Efter asteroiden +STR_SCNR :Kraterkatastrof STR_PARK :Kraterkatastrof STR_DTLS :Du äger en dammig gammal meteorkrater. Som den entreprenör du är bestämmer du dig för att bygga ett nöjesfält med asteroidtema och omvandla den till synes värdelösa marken till en förmögenhet. -STR_SCNR :Förhistorisk tid – Dinosauriesafari +STR_SCNR :Bergosaurier STR_PARK :Bergosaurier STR_DTLS :Du har fått i uppgift att bygga en park med Juratema. För att besökarna ska kunna uppleva den exotiska floran och faunan ordentligt krävs det att du bygger attraktioner som går ovanför och ned i dalen. -STR_SCNR :Förhistorisk tid – Stenålder +STR_SCNR :Stenigt värre STR_PARK :Stenigt värre STR_DTLS :Stoppa motorvägsbygget och bevara de urtida stencirklarna genom att bygga ett nöjesfält med stenålderstema som går med vinst. Det kan dock bli en smula problematiskt att locka besökare eftersom terrängen är aningen oländig. -STR_SCNR :Det glada tjugotalet – Fängelseön +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :Den ökända fängelseön, vars befolkning en gång i tiden utgjordes av smugglare och gangsters, är till salu. Du har bestämt dig för att förvandla den till en förstklassig turistattraktion. Pengar är inget hinder. -STR_SCNR :Det glada tjugotalet – Schneidertrofén +STR_SCNR :Schneiders strand STR_PARK :Schneiders strand STR_DTLS :75-årsjubiléet av din faders vinst av Schneidertrofén inträffar om några år. Du vill hedra hans prestation genom att bygga en park baserad på den berömda sjöflygplanstävlingen. -STR_SCNR :Det glada tjugotalet – Skyskrapor +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :Du äger en tom tomt i närheten av stadens lågt byggda kvarter. För att få ut så mycket vinst som möjligt av marken bygger du ett nöjesfält i form av en skyskrapa inspirerad av tjugotalets art déco-arkitektur. -STR_SCNR :Rock’n’roll – Flower power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :En stor årlig rockfestival äger rum på din mark. Bygg en hipp nöjespark i den fritänkande publikens smak. -STR_SCNR :Rock’n’roll – Rock’n’roll +STR_SCNR :Rock’n’roll-revival STR_PARK :Rock’n’roll-revival STR_DTLS :Denna åldrande park har sett bättre dagar. Hjälp ägaren med att ge den ett retro-rock’n’roll-tema för att förvandla den till en framgångsrik park. diff --git a/data/language/tr-TR.txt b/data/language/tr-TR.txt index e9a953f418..4c2991b842 100644 --- a/data/language/tr-TR.txt +++ b/data/language/tr-TR.txt @@ -32,26 +32,26 @@ STR_0027 :Çarpışan Arabalar STR_0028 :Korsan Gemisi STR_0029 :Tepe Takla Gemisi STR_0030 :Yiyecek Standı -STR_0031 :Bilinmeyen Stand (1D) -STR_0032 :Içecek Standı -STR_0033 :Bilinmeyen Stand (1F) +STR_0031 :Bilinmeyen Stant (1D) +STR_0032 :İçecek Standı +STR_0033 :Bilinmeyen Stant (1F) STR_0034 :Dükkan STR_0035 :Atlıkarınca -STR_0036 :Bilinmeyen Stand (22) +STR_0036 :Bilinmeyen Stant (22) STR_0037 :Danışma STR_0038 :Tuvalet STR_0039 :Dönme Dolap -STR_0040 :Kaza Simulatörü +STR_0040 :Kaza Simülatörü STR_0041 :3D Sinema STR_0042 :Sapan -STR_0043 :Astronot Antremanı +STR_0043 :Astronot Antrenmanı STR_0044 :Ters Düşüşlü Tren STR_0045 :Asansör STR_0046 :Vertikal Düşüşlü tren STR_0047 :ATM STR_0048 :Twister STR_0049 :Perili Ev -STR_0050 :Ilk yardım kulübesi +STR_0050 :İlk yardım kulübesi STR_0051 :Sirk STR_0052 :Hayalet Treni STR_0053 :Çelik Yapılı Twister Treni @@ -71,7 +71,7 @@ STR_0066 :Bilinmeyen Alet (40) STR_0067 :Yön değiştiren Tren STR_0068 :Heartline Twister Coaster STR_0069 :Mini Golf -STR_0070 :Devasal Tren +STR_0070 :Devasa Tren STR_0071 :Rotasyonlu Düşüş STR_0072 :Çarpışan Araçlar STR_0073 :Yamuk Ev @@ -82,7 +82,7 @@ STR_0077 :Pnömatik Vertikal Tren STR_0078 :Teleferik Treni STR_0079 :Sihirli Halı STR_0080 :Denizaltı Kiralama -STR_0081 :Sal Seyehati +STR_0081 :Sal Seyahati STR_0082 :Bilinmeyen Alet (50) STR_0083 :Dönen Teker STR_0084 :Bilinmeyen Alet (52) @@ -95,18 +95,18 @@ STR_0090 :Küçük Maden Treni STR_0091 :Bilinmeyen Alet (59) STR_0092 :LIM Tren STR_0096 :Klasik Tahta Tren -STR_0512 :Sardal şeklinde tırmanma zinciri rayı ile yükseğe çıkabilen çelik yapılı bir tren -STR_0513 :Yolcuların ayakda durdukları koltuksuz tren +STR_0512 :Sarmal şeklinde tırmanma zinciri rayı ile yükseğe çıkabilen çelik yapılı bir tren +STR_0513 :Yolcuların ayakta durdukları koltuksuz tren STR_0514 :Trenin vagonları salıncak gibi yukarıdan aşağı asılı. Virajlarda vagonlar sağa veya sola doğru sallanıyor -STR_0515 :Vagonlar üstde bulunan raylara monte edilmiş halde. Bu trende büyük döngüler ve dik inişler mümkündür +STR_0515 :Vagonlar üstte bulunan raylara monte edilmiş halde. Bu trende büyük döngüler ve dik inişler mümkündür STR_0516 :Hızlı trenlere cesaret edip binemeyen müşteriler için ölçülü bir tren STR_0517 :Yolcular minyatür treni hızlı ve kolay ulaşım için kullanabilirler STR_0518 :Yolcular monorayı hızlı ve kolay ulaşım için kullanabilirler -STR_0519 :Yolcular üstde bulunan yuvarlak raylara monte edilmiş tekli vagonlara biniyor. Virajlarda vagonlara sağa veya sola sallanıyor -STR_0520 :Müşteriler kıraladıkları sandalları gölde ya bağımsız bir şekilde yada belirlenmiş bir şeritde kullanabilirler +STR_0519 :Yolcular üstte bulunan yuvarlak raylara monte edilmiş tekli vagonlara biniyor. Virajlarda vagonlara sağa veya sola sallanıyor +STR_0520 :Müşteriler kiraladıkları sandalları gölde ya bağımsız bir şekilde yada belirlenmiş bir şeritte kullanabilirler STR_0521 :Fare şeklindeki vagonlar ahşap rayların üzerinde hızlıca virajlara girdiğinde yana yatıyorlar STR_0522 :Tek ray üzerinde süren bir tren -STR_0523 :Müşteriler kiraladığı arablar ile belirlenmiş bir yol üzerinde sürebilirler +STR_0523 :Müşteriler kiraladığı arabalar ile belirlenmiş bir yol üzerinde sürebilirler STR_0524 :Pnömatik şekilde havaya fırlatılan araç zirveye çıktığı gibi geri düşüyor STR_0525 :Rayları beşiğe benzeyen bu trende vagonlar serbest bir şekilde sürüyor STR_0526 :Asansör gibi zirveye düz ve dönerek çıkan gözetleme kulesi @@ -115,72 +115,72 @@ STR_0528 :Yolcular şişme sandal üzerinde yarı veya tüm boru içinde kay STR_0529 :Eski maden trenlerine bezeyen hız treni STR_0530 :Müşteriler teleferiği yol kısaltmak için kullanabilirler STR_0531 :Çelik yapılı tren. Döngüler ve sarmallar mümkündür -STR_0532 :Labirentde müşterilerin çıkışı kafa karıştırıcı yollarda gezerek bulması gerekdir +STR_0532 :Labirentte müşterilerin çıkışı kafa karıştırıcı yollarda gezinerek bulması gerekir STR_0533 :Bu ahşap kaydırak iç kısmında merdiven bulunduruyor. Müşteriler özel hasır ile kayıyor STR_0534 :Mazot ile çalışan Kartlar ile Kart yarışı STR_0535 :Ağaç gövdesine benzeyen vagonlar ile yolcuları ıslatmak amacıyla dik inişler mümkündür -STR_0536 :Müşteriler yuvarlak gemiler ile fokurduyan sularda, şelalelerde ve akıntılarda gezdiren bir alet +STR_0536 :Müşteriler yuvarlak gemiler ile fokurdayan sularda, şelalelerde ve akıntılarda gezdiren bir alet STR_0537 :Elektrik ile çalışan çarpışan arabalar -STR_0538 :Deniz fırtınasına kapılmış korsan gemisi gibi sağa ve sola sallanan bir alet +STR_0538 :Deniz fırtınasına kapılmış korsan gemisi gibi sağa ve sola sallanan bir alet STR_0539 :Gemiye benzeyen bu alet yolcuları 360 dereceye kadar tepe takla sallıyor -STR_0540 :Müşterilerin yiyecek satın alabileceği bir stand -STR_0542 :Müşterilerin içecek satın alabileceği bir stand -STR_0544 :Müşterilerin hatıra satın alabileceği bir stand -STR_0545 :Gelenksel atlıkarınca -STR_0547 :Müşterilerin park haritası ve şemsiye satın alabileceği bir stand +STR_0540 :Müşterilerin yiyecek satın alabileceği bir stant +STR_0542 :Müşterilerin içecek satın alabileceği bir stant +STR_0544 :Müşterilerin hatıra satın alabileceği bir stant +STR_0545 :Geleneksel atlıkarınca +STR_0547 :Müşterilerin park haritası ve şemsiye satın alabileceği bir stant STR_0548 :Tuvalet -STR_0549 :Koltukları açık olan dönmedolap -STR_0550 :Müşteriler kaza simulatöründe kendileri kaza yapıyormuş gibisine hareketlendiriyor. Heyecanı artdırmak için aynı zamanda 3D Filmi oynuyor -STR_0551 :Müşteriler kendilerini Filmin içinde gibi hisediyorlar -STR_0552 :Müşteriler sapana benzeyen bir aletde yukarı ve aşağı hızlıca sallanıyor -STR_0553 :Astronotların yaptığı antremanın hafif bir türü -STR_0554 :Lineer Indüksiyon Motoru ile 90 derece dikine fırlatılan tren, aynı şekilde 90 derece düşüş ile başlangıca dönüyor -STR_0555 :Müşterilerin farklı katlara ulaşbilmesi için bir alet -STR_0556 :Extra büyük vagonlar ile dikey tırmanmalar ve düşüşler ile heyecanı zirveye çıkarıyor +STR_0549 :Koltukları açık olan dönme dolap +STR_0550 :Müşteriler kaza simülatöründe kendileri kaza yapıyormuş gibisine hareketlendiriyor. Heyecanı arttırmak için aynı zamanda 3D Filmi oynuyor +STR_0551 :Müşteriler kendilerini Filmin içinde gibi hissediyorlar +STR_0552 :Müşteriler sapana benzeyen bir alette yukarı ve aşağı hızlıca sallanıyor +STR_0553 :Astronotların yaptığı antrenmanın hafif bir türü +STR_0554 :Lineer İndüksiyon Motoru ile 90 derece dikine fırlatılan tren, aynı şekilde 90 derece düşüş ile başlangıca dönüyor +STR_0555 :Müşterilerin farklı katlara ulaşabilmesi için bir alet +STR_0556 :Ekstra büyük vagonlar ile dikey tırmanmalar ve düşüşler ile heyecanı zirveye çıkarıyor STR_0557 :Müşterilerin parası bitmek üzere olduğunda bu ATM ile yeniden para çekebiliyorlar STR_0558 :Müşteriler çift koltuklu koltuklarda çevriliyor STR_0559 :Perili evde bir çeşit canavar, hayalet ve peri şeklindeki korkunç robotlar müşterileri korkutmaya hazır STR_0560 :Müşterilerin midesi bulandığı takdirde burada rahatlayabilirler STR_0561 :Sirk hayvanlarının gösteri yaptığı bir alet STR_0562 :Yolcular korku dolu bir yerde seyahat yapıyor (dekorasyon gereklidir) -STR_0563 :Bu çelik yapılı hız treni keskin virajlara ve sarmallara sahiptir. Heyecanı artdırmak için güvenlik askısı kalça kısmındadır +STR_0563 :Bu çelik yapılı hız treni keskin virajlara ve sarmallara sahiptir. Heyecanı arttırmak için güvenlik askısı kalça kısmındadır STR_0564 :Bu hızlı, sesli ve kaba ahşap tren yolculara trenin her an raydan çıkağını hissettiriyor STR_0565 :Hafif inişlere ve virajlara sahip olan ahşap tren. Rayların sağında ve solunda bulunan tekerler ve yerçekimi bu treni rayda tutar -STR_0566 :Tekli vagonlar zig zag bir şeritde keskin virajlardan döner ve dik eğilimlerden iner +STR_0566 :Tekli vagonlar zikzak bir şeritte keskin virajlardan döner ve dik eğilimlerden iner STR_0567 :Bu trenin vagonları yön değiştirir ve bir yukarıda bulunur, bir aşağıda bulunur STR_0569 :Bu trende yolcuların ayakları yere basmadığından dolayı kendilerine uçuyorlarmış gibi bir his vermektedir -STR_0571 :Çorba tasına benzeyen vagonlar zig zag bir şeritde keskin virajlardan dönüyor ve dik eğilimlerden iniyor -STR_0572 :Büyük gemilere benzeyen vagonlar yükseğe tırmandıkdan sonra yolcuları ıslatmak suretiyle aşağı kayıyor -STR_0573 :Helikoptere benziyen tekli araçlar, bisiklet pedalına benzeyen pedallar ile ilerler +STR_0571 :Çorba tasına benzeyen vagonlar zikzak bir şeritte keskin virajlardan dönüyor ve dik eğilimlerden iniyor +STR_0572 :Büyük gemilere benzeyen vagonlar yükseğe tırmandıktan sonra yolcuları ıslatmak suretiyle aşağı kayıyor +STR_0573 :Helikoptere benzeyen tekli araçlar, bisiklet pedalına benzeyen pedallar ile ilerler STR_0574 :Yolcular özel vagonlara karın veya sırt üstü yatarak biniyor STR_0575 :Yolcular bu aracı hızlı ve kolay ulaşım için kullanabilirler STR_0577 :Bu ahşap trendeki bulunan özel raylar vagonları tersine çevirmektedir -STR_0578 :Bu trenin vagonları silindire ve rayları kafesi benzemektedir. Yuvarlama raylarıda bulundurur -STR_0579 :Mini Golf -STR_0580 :Devasal çelik yapılı tren. 90 metreye kadar yükselebilir -STR_0581 :Tekere benzeyen bu alet rotasyon yaparak zirveye çıktıkdan sonra serbeşt düşüş ile aşağı iniyor. Aşağıda manyetik fren ile durduruluyor +STR_0578 :Bu trenin vagonları silindire ve rayları kafesi benzemektedir. Yuvarlama rayları da bulundurur +STR_0579 :Mini Golf +STR_0580 :Devasa çelik yapılı tren. 90 metreye kadar yükselebilir +STR_0581 :Tekere benzeyen bu alet rotasyon yaparak zirveye çıktıktan sonra serbest düşüş ile aşağı iniyor. Aşağıda manyetik fren ile durduruluyor STR_0582 :Hovercraft tekniği ile çalışan çarpışan araçlar STR_0583 :Müşterileri şaşırtan ve kafalarını karıştıran koridorlardan ve odalardan oluşan bir alet STR_0584 :Tekli rayın üstünde bisikletli alet -STR_0585 :Havada bulunan raylara monte edilmiş vagonlar ters döngüler yapmakda ve keskin virajlardan sürmekde -STR_0586 :Gemi şeklindeki vagonlar dar virajlarda ve dik düşüşlerde sürmektedir. Fakat su bölümleri ölçülü ve sakinleştiricir +STR_0585 :Havada bulunan raylara monte edilmiş vagonlar ters döngüler yapmakta ve keskin virajlardan sürmekte +STR_0586 :Gemi şeklindeki vagonlar dar virajlarda ve dik düşüşlerde sürmektedir. Fakat su bölümleri ölçülü ve sakinleştiricidir STR_0587 :Pnömatik teknik ile 90 derece dikine fırlatılan tren, aynı şekilde 90 derece düşüş ile başlangıca döner -STR_0588 :Tekli vagonlar zig zag bir şeritde keskin virajlardan döner ve dik eğilimlerden iner +STR_0588 :Tekli vagonlar zikzak bir şeritte keskin virajlardan döner ve dik eğilimlerden iner STR_0589 :Sihirli halı şeklinde sallanan bir alet -STR_0590 :Müşteriler kıraladıkları denizaltıları ile belirli bir kısımda gezebilirler +STR_0590 :Müşteriler kiraladıkları denizaltıları ile belirli bir kısımda gezebilirler STR_0591 :Sal şeklindeki gemiler ile tırmanışsız ve düşüşsüz sakin bir seyahat için -STR_0593 :Rotating wheel with suspended passenger pods, which first starts spinning and is then tilted up by a supporting arm +STR_0593 :Önce dönmeye başlayan ve daha sonra bir destek kolu tarafından yukarı doğru eğilen asılı yolcu bölmelerine sahip döner tekerlek STR_0598 :Vidaya benzeyen rayları ile 90 derece havaya fırlatılan ve aynı şekilde geri düşen tren STR_0599 :Tekli vagonları ve hafif düşüşleri ile ölçülü bir tren -STR_0600 :Maden vagonlarından oluşan bu tren ölçülü virajlardan ve düşüşlerden gitmekde -STR_0602 :Lineer Indüksiyon Motoru ile 90 derece dikine fırlatılan tren, aynı şekilde 90 derece düşüş ile başlangıca dönüyor +STR_0600 :Maden vagonlarından oluşan bu tren ölçülü virajlardan ve düşüşlerden gitmekte +STR_0602 :Lineer İndüksiyon Motoru ile 90 derece dikine fırlatılan tren, aynı şekilde 90 derece düşüş ile başlangıca dönüyor STR_0606 :Hızlı ve zor bir sürüşe sahip, açık havanın tadını çıkarabileceğiniz, bir miktar G kuvveti bulunan, ‘kontrolden-çıkmış’ gibi hissettirmek için tasarlanmış ahşap bir tren. STR_0767 :Müşteri {INT32} -STR_0768 :Temizlikci {INT32} +STR_0768 :Temizlikçi {INT32} STR_0769 :Mühendis {INT32} STR_0770 :Güvenlik {INT32} STR_0771 :Animatör {INT32} -STR_0777 :Isimsiz park +STR_0777 :İsimsiz park STR_0778 :Bir metin giriniz STR_0779 :1. STR_0780 :2. @@ -271,14 +271,14 @@ STR_0883 :Oyunu kaydet STR_0884 :Araziyi yükle STR_0885 :Araziyi kaydet STR_0887 :Senaryo Editörünü kapat -STR_0888 :Alet Tasarımıcısını kapat -STR_0889 :Alet Menecerini kapat +STR_0888 :Alet Tasarımcısını kapat +STR_0889 :Alet Tasarım Yöneticisini kapat STR_0891 :Screenshot STR_0892 :Screenshot Hard Drive’a bu isim ile kayıt edildi: ‘{STRINGID}’ STR_0893 :Screenshot çekilemedi! STR_0894 :Arazi veri alanı dolu! STR_0895 :Yarı yerüstü, yarı yeraltı inşa edilemez! -STR_0896 :{POP16}{POP16}{STRINGID} Inşası +STR_0896 :{POP16}{POP16}{STRINGID} İnşası STR_0897 :Yön STR_0898 :Sola viraj STR_0899 :Sağa viraj @@ -297,8 +297,8 @@ STR_0911 :Sağ viraj için yuvarla STR_0912 :Yuvarlama STR_0913 :Bir önceki kesim STR_0914 :Bir sonraki kesim -STR_0915 :Şeçdiğiniz kesimi inşa edin -STR_0916 :Şeçdiğiniz kesimi silin +STR_0915 :Seçtiğiniz kesimi inşa edin +STR_0916 :Seçtiğiniz kesimi silin STR_0917 :90 derece düşür STR_0918 :Dik düşür STR_0919 :Düşür @@ -316,7 +316,7 @@ STR_0930 :‘S’ şeklinde viraj (sağ) STR_0931 :Döngü (sol) STR_0932 :Döngü (sağ) STR_0933 :Arazin alçaltılması veya yükseltilmesi gerekli -STR_0934 :Alet girşi engelliyor +STR_0934 :Alet girişi engelliyor STR_0935 :Alet çıkışı engelliyor STR_0936 :Park girişi engelliyor STR_0937 :Görünüm ayarları @@ -325,18 +325,18 @@ STR_0939 :Yeraltı veya iç görünüm STR_0940 :Tabanı gizle STR_0941 :Vertikal duvarları gizle STR_0942 :Aletleri gizle -STR_0943 :Dekorsdyonu gizle +STR_0943 :Dekorasyonu gizle STR_0944 :Kaydet STR_0945 :Kaydetme -STR_0946 :Iptal -STR_0947 :Yüklemeden önce kayıt etmek istermisiniz? -STR_0948 :Kapatmadan önce kaydetmek istermisiniz? -STR_0949 :Kapatmadan önce kaydetmek istermisiniz? +STR_0946 :İptal +STR_0947 :Yüklemeden önce kayıt etmek ister misiniz? +STR_0948 :Kapatmadan önce kaydetmek ister misiniz? +STR_0949 :Kapatmadan önce kaydetmek ister misiniz? STR_0950 :Oyunu yükle STR_0951 :Oyunu kapat STR_0952 :Oyunu kapat STR_0953 :Arazi yükle -STR_0955 :Bu kesim için koltuk eğim dereceseni seçiniz +STR_0955 :Bu kesim için koltuk eğim derecesini seçiniz STR_0956 :-180° STR_0957 :-135° STR_0958 :-90° @@ -353,17 +353,17 @@ STR_0968 :+360° STR_0969 :+405° STR_0970 :+450° STR_0971 :+495° -STR_0972 :Iptal +STR_0972 :İptal STR_0973 :Tamam STR_0974 :Aletler -STR_0975 :Dükkanlar ve Standlar +STR_0975 :Dükkanlar ve Stantlar STR_0976 :Diğer tesisler -STR_0977 :Toplu taşım araçları +STR_0977 :Toplu taşıma araçları STR_0978 :Ölçülü aletler STR_0979 :Hız trenleri STR_0980 :Heyecanlı aletler STR_0981 :Sulu aletler ve trenler -STR_0982 :Dükkanlar ve standlar +STR_0982 :Dükkanlar ve stantlar STR_0983 :Araştırma ve Geliştirme STR_0984 :{WINDOW_COLOUR_2}▲{BLACK} {CURRENCY2DP} STR_0985 :{WINDOW_COLOUR_2}▼{BLACK} {CURRENCY2DP} @@ -371,23 +371,23 @@ STR_0986 :{BLACK}{CURRENCY2DP} STR_0987 :Çok fazla alet var STR_0988 :Yeni alet inşa edilemedi STR_0989 :{STRINGID} -STR_0990 :Inşa et/Değiştir -STR_0991 :Istasyon +STR_0990 :İnşa et/Değiştir +STR_0991 :İstasyon STR_0992 :Tüm aleti sil STR_0993 :Aleti sil STR_0994 :Sil -STR_0995 :{WINDOW_COLOUR_1} {STRINGID}’i silmek istediğinizden eminmisinz? +STR_0995 :{WINDOW_COLOUR_1} {STRINGID}’i silmek istediğinizden emin misiniz? STR_0996 :Genel görünüm STR_0997 :Görünümü seçiniz STR_0998 :Daha fazla istasyon inşa edilemez -STR_0999 :Istasyon inşa etmeniz şart +STR_0999 :İstasyon inşa etmeniz şart STR_1000 :Alet tam devre olmalıdır STR_1001 :Bu ray bu alet için uyumlu değil STR_1002 :{STRINGID} açılamıyor… STR_1003 :{STRINGID} test edilemiyor… STR_1004 :{STRINGID} kapatılamıyor… STR_1005 :{STRINGID} inşa edilemiyor… -STR_1006 :Ilk önce kapatılması lazım +STR_1006 :İlk önce kapatılması lazım STR_1007 :Yeterince vagon oluşturulamıyor STR_1008 :Aleti aç, kapat veya dene STR_1009 :Tüm aletleri aç veya kapat @@ -406,8 +406,8 @@ STR_1021 :{POP16}{POP16}{POP16}{POP16}{STRINGID} STR_1022 :{POP16}{POP16}{POP16}{COMMA16} Tren başı vagon STR_1023 :{POP16}{POP16}{POP16}{COMMA16} Tren başı vagon STR_1024 :Tren başı vagon: {COMMA16} -STR_1025 :Tren başı vagon: {COMMA16} -STR_1026 :Istasyon kesimi çok uzun +STR_1025 :Tren başı vagon: {COMMA16} +STR_1026 :İstasyon kesimi çok uzun STR_1027 :Ana görüntüye getir STR_1028 :Harita sınırının dışında! STR_1029 :Yarı su altı yarı su üstü inşa edilemez! @@ -424,20 +424,20 @@ STR_1039 :Yeni alet tasarımı kur STR_1040 :Oyunu kaydet STR_1041 :Senaryoyu kaydet STR_1042 :Araziyi kaydet -STR_1043 :OpenRCT2 - kayıdlı oyun +STR_1043 :OpenRCT2 - kayıtlı oyun STR_1044 :OpenRCT2 - Senaryo dosyası STR_1045 :OpenRCT2 - Arazi dosyası STR_1046 :OpenRCT2 - Alet tasarımı dosyası -STR_1047 :Oyun kayıdlanamadı! -STR_1048 :Senaryo kayıdlanamadı! +STR_1047 :Oyun kaydedilemedi! +STR_1048 :Senaryo kaydedilemedi! STR_1049 :Arazi kayıtlanamadı! STR_1050 :Yüklenemedi. Dosya yanlış veriler içeriyor! STR_1051 :Direkleri gizle STR_1052 :Müşterileri gizle -STR_1053 :Parkdaki aletler/dükkanlar/tesisler +STR_1053 :Parktaki aletler/dükkanlar/tesisler STR_1054 :Aletin ismini değiştiriniz STR_1055 :Müşterinin ismini değiştiriniz -STR_1056 :Işcinin ismini değiştiriniz +STR_1056 :İşçinin ismini değiştiriniz STR_1057 :Alet ismi STR_1058 :Aletin yeni ismini giriniz: STR_1059 :Aletin ismi değiştirilemiyor… @@ -445,30 +445,30 @@ STR_1060 :Olumsuz alet ismi STR_1061 :Normal mod STR_1062 :Normal tur modu (araçlar herhangi mesafede çıkıyor) STR_1063 :Düşüş modu (alet düşüş ile başlıyor) -STR_1064 :Roket tarzı (Istasyondan frenlenmeden geçerek) +STR_1064 :Roket tarzı (İstasyondan frenlenmeden geçerek) STR_1065 :Servis modu (tek vagonlu) STR_1066 :Kiralama modu STR_1067 :Yukarı atış STR_1068 :Rotasyon modu -STR_1069 :Istasyonlar arası modu +STR_1069 :İstasyonlar arası modu STR_1070 :Biletler tek kullanımlı STR_1071 :Biletler sınırsız kullanımlı STR_1072 :Labirent modu STR_1073 :Yarış modu STR_1074 :Çarpışan araba modu STR_1075 :Salıncak modu -STR_1076 :Stand modu +STR_1076 :Stant modu STR_1077 :Rotasyon modu -STR_1078 :Ileriye rotasyon +STR_1078 :İleriye rotasyon STR_1079 :Geriye rotasyon -STR_1080 :Film: ”Intikamcı Pilotlar” +STR_1080 :Film: ”İntikamcı Pilotlar” STR_1081 :3D-Film: ”Fare Kuyrukları” -STR_1082 :Astronot Antremanı modu +STR_1082 :Astronot Antrenmanı modu STR_1083 :Acemi modu STR_1084 :LIM ile başlangıç STR_1085 :Film: ”Çılgın Kaptan” -STR_1086 :3D-Film: ”Savşcılar” -STR_1087 :3D-Film: ”Uzay Eşkiyaları” +STR_1086 :3D-Film: ”Savaşçılar” +STR_1087 :3D-Film: ”Uzay Eşkıyaları” STR_1088 :Ölçülü mod STR_1089 :Aşırı mod STR_1090 :Perili ev modu @@ -477,7 +477,7 @@ STR_1092 :Düşüşlü başlangıç STR_1093 :Yamuk Ev modu STR_1094 :Serbest düşüş modu STR_1095 :Bloklu tur modu (araçlar blok arası mesafe tutuyor) -STR_1096 :Roket tarzı başlangıç (Istasyonda frenleyerek) +STR_1096 :Roket tarzı başlangıç (İstasyonda frenleyerek) STR_1097 :Bloklu roket tarzı (araçlar blok arası mesafe tutuyor) STR_1098 :{POP16}{STRINGID}’un sonuna gidiyor STR_1099 :{POP16}{STRINGID}’da yolcu bekliyor @@ -493,25 +493,25 @@ STR_1108 :Hız: {VELOCITY} STR_1109 :Sallıyor STR_1110 :Dönüyor STR_1111 :Dönüyor -STR_1112 :Faaliyetde +STR_1112 :Faaliyette STR_1113 :Film gösteriliyor STR_1114 :Dönüyor -STR_1115 :Faaliyetde -STR_1116 :Faaliyetde +STR_1115 :Faaliyette +STR_1116 :Faaliyette STR_1117 :Sirk gösterisinde -STR_1118 :Faaliyetde +STR_1118 :Faaliyette STR_1119 :Asansörlü tırmanma zincirini bekliyor STR_1120 :Hız: {VELOCITY} STR_1121 :Duruyor STR_1122 :Yolcu bekliyor STR_1123 :Başlamayı bekliyor STR_1124 :Başlıyor -STR_1125 :Faaliyetde +STR_1125 :Faaliyette STR_1126 :Duruyor STR_1127 :Yolcuları indiriyor STR_1128 :Blok fren ile durduruldu STR_1129 :Tüm vagonlara eşit renk -STR_1130 :{STRINGID} başı farklı renk +STR_1130 :{STRINGID} başı farklı renk STR_1131 :Vagon başı farklı renk STR_1132 :Vagon {POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_1133 :Vagon {POP16}{COMMA16} @@ -519,21 +519,21 @@ STR_1134 :{POP16}{POP16}{POP16}{POP16}{POP16}{STRINGID} {COMMA16} STR_1135 :{STRINGID} {COMMA16} STR_1136 :Ana rengi seçiniz STR_1137 :Birinci ek rengi seçiniz -STR_1138 :Ikinci ek rengi seçiniz +STR_1138 :İkinci ek rengi seçiniz STR_1139 :Desteklerin rengini seçiniz STR_1140 :Bu araç için renk seçiniz -STR_1141 :Modife etmek istediğiniz vagonu seçiniz +STR_1141 :Modifiye etmek istediğiniz vagonu seçiniz STR_1142 :{MOVE_X}{10}{STRINGID} STR_1143 :»{MOVE_X}{10}{STRINGID} -STR_1144 :Bu aletin girşi değiştirilemiyor veya inşa edilemiyor… +STR_1144 :Bu aletin girişi değiştirilemiyor veya inşa edilemiyor… STR_1145 :Bu aletin çıkışı değiştirilemiyor veya inşa edilemiyor… STR_1146 :Giriş inşa edilmeli STR_1147 :Çıkış inşa edilmeli -STR_1148 :Çeyrek’de başlat -STR_1149 :Yarı’da başlat -STR_1150 :Dörtte üç’de başlat +STR_1148 :Çeyrekte başlat +STR_1149 :Yarıda başlat +STR_1150 :Dörtte üçte başlat STR_1151 :Dolu ise başlat -STR_1152 :Herhangi dolulukda başlat +STR_1152 :Herhangi dolulukta başlat STR_1153 :Alet yüksekliğini görüntüle STR_1154 :Arazı yüksekliğini görüntüle STR_1155 :Yol yüksekliğini görüntüle @@ -541,10 +541,10 @@ STR_1156 :{MOVE_X}{10}{STRINGID} STR_1157 :✓{MOVE_X}{10}{STRINGID} STR_1158 :Silinemedi… STR_1159 :Dekorasyonlar, çiçekler veya diğer cisimler -STR_1160 :Su ayarları +STR_1160 :Su ayarları STR_1161 :Buraya inşa edilemez… STR_1162 :{OUTLINE}{TOPAZ}{STRINGID} -STR_1163 :{STRINGID}{NEWLINE}(Modife etmek için sağ mouse tuşuna basınız) +STR_1163 :{STRINGID}{NEWLINE}(Modifiye etmek için sağ mouse tuşuna basınız) STR_1164 :{STRINGID}{NEWLINE}(Silmek için sağ mouse tuşuna basınız) STR_1165 :{STRINGID} - {STRINGID} {COMMA16} STR_1166 :Su seviyesi burada indirilemez… @@ -552,8 +552,7 @@ STR_1167 :Su seviyesi burada yükseltilemez… STR_1168 :Seçenekler STR_1169 :(Hiç birisi) STR_1170 :{STRING} -STR_1171 :{RED}Kapalı - - -STR_1172 :{YELLOW}{STRINGID} - - +STR_1171 :{RED}Kapalı STR_1173 :Yollar ve bekleme sıraları STR_1174 :Banner engelliyor STR_1175 :Eğimli yola koyulamaz @@ -564,9 +563,9 @@ STR_1179 :Yol engelliyor STR_1180 :Suyun altında inşa edilemez! STR_1181 :Yollar STR_1182 :Tür -STR_1183 :Istikamet +STR_1183 :İstikamet STR_1184 :Eğim -STR_1185 :Istikamet +STR_1185 :İstikamet STR_1186 :Aşağı eğ STR_1187 :Düz STR_1188 :Yukarı eğ @@ -590,14 +589,14 @@ STR_1205 :{COMMA16} dakika bekleme süresi STR_1206 :{WINDOW_COLOUR_2}Doluluk: STR_1207 :{WINDOW_COLOUR_2}Tren istasyona vardığında diğer treni yolla STR_1208 :{WINDOW_COLOUR_2}Bot istasyona vardığında diğer botu yolla -STR_1209 :Aletin başlaması için en az kaç kişinin binmesi gerektiğni seçiniz +STR_1209 :Aletin başlaması için en az kaç kişinin binmesi gerektiğini seçiniz STR_1210 :Bir aracın istasyona varmasıyla diğer bir aracın çıkmasını sağlar STR_1211 :{WINDOW_COLOUR_2}En az bekleme süresi: STR_1212 :{WINDOW_COLOUR_2}En yüksek bekleme süresi: STR_1213 :Aletin başlangıcından önceki{NEWLINE}beklenecek en az süreyi seçiniz STR_1214 :Aletin başlangıcından önceki{NEWLINE}beklenecek en fazla süreyi seçiniz STR_1215 :{WINDOW_COLOUR_2}Komşu istasyonlarla senkronize et -STR_1216 :Iki alet yan yana inşa edildi ise bu iki aletin aynı anda başlamasını sağlayınız (mesela hız treni yarışı için) +STR_1216 :İki alet yan yana inşa edildi ise bu iki aletin aynı anda başlamasını sağlayınız (mesela hız treni yarışı için) STR_1217 :{COMMA16} Saniye STR_1218 :{BLACK}+ STR_1219 :{BLACK}- @@ -609,7 +608,7 @@ STR_1224 :Ölçülü aletler STR_1225 :Hız trenleri STR_1226 :Heyecanlı aletler STR_1227 :Su temalı trenler ve aletler -STR_1228 :Dükkanlar ve standlar +STR_1228 :Dükkanlar ve stantlar STR_1229 :Tren STR_1230 :Trenler STR_1231 :Tren @@ -631,20 +630,20 @@ STR_1246 :Raylar STR_1247 :{COMMA16} ray STR_1248 :{COMMA16} ray STR_1249 :Ray {COMMA16} -STR_1250 :Iskele -STR_1251 :Iskeleler -STR_1252 :Iskele -STR_1253 :Iskeleler -STR_1254 :{COMMA16} Iskele -STR_1255 :{COMMA16} Iskele -STR_1256 :Iskele {COMMA16} -STR_1257 :Istasyon -STR_1258 :Istasyonlar -STR_1259 :Istasyon -STR_1260 :Istasyonlar -STR_1261 :{COMMA16} Istasyon -STR_1262 :{COMMA16} Istasyon -STR_1263 :Istasyon {COMMA16} +STR_1250 :İskele +STR_1251 :İskeleler +STR_1252 :İskele +STR_1253 :İskeleler +STR_1254 :{COMMA16} İskele +STR_1255 :{COMMA16} İskele +STR_1256 :İskele {COMMA16} +STR_1257 :İstasyon +STR_1258 :İstasyonlar +STR_1259 :İstasyon +STR_1260 :İstasyonlar +STR_1261 :{COMMA16} İstasyon +STR_1262 :{COMMA16} İstasyon +STR_1263 :İstasyon {COMMA16} STR_1264 :Araç/Alet STR_1265 :Araçlar/Aletler STR_1266 :Araç/Alet @@ -711,15 +710,15 @@ STR_1326 :Kurs {COMMA16} STR_1327 :Cisimleri 90° çevir STR_1328 :Düz arazi şart STR_1329 :{WINDOW_COLOUR_2}Başlangıç hızı: -STR_1330 :Istasyonu hangi hız ile{NEWLINE}terk edeceğini seçiniz +STR_1330 :İstasyonu hangi hız ile{NEWLINE}terk edeceğini seçiniz STR_1331 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{VELOCITY} STR_1332 :{VELOCITY} STR_1333 :{STRINGID} - {STRINGID}{POP16} STR_1334 :{STRINGID} - {STRINGID} {COMMA16} STR_1335 :{STRINGID} - Giriş{POP16}{POP16} -STR_1336 :{STRINGID} - Istasyon {POP16}{COMMA16} Giriş +STR_1336 :{STRINGID} - İstasyon {POP16}{COMMA16} Giriş STR_1337 :{STRINGID} - Çıkış{POP16}{POP16} -STR_1338 :{STRINGID} - Istasyon {POP16}{COMMA16} Çıkış +STR_1338 :{STRINGID} - İstasyon {POP16}{COMMA16} Çıkış STR_1339 :{BLACK}Henüz test sonuçları yok… STR_1340 :{WINDOW_COLOUR_2}Azami hız: {BLACK}{VELOCITY} STR_1341 :{WINDOW_COLOUR_2}Alet süreci: {BLACK}{STRINGID}{STRINGID}{STRINGID}{STRINGID} @@ -775,7 +774,7 @@ STR_1390 :{CURRENCY2DP} STR_1391 :{RED}{CURRENCY2DP} STR_1392 :Genel seçenekler STR_1393 :Alet bilgisi ve seçenekleri -STR_1394 :Işletim seçenekleri +STR_1394 :İşletim seçenekleri STR_1395 :Bakım seçenekleri STR_1396 :Renk seçenekleri STR_1397 :Ses ve Müzik seçenekleri @@ -790,11 +789,11 @@ STR_1405 :Aleti yansıtınız STR_1406 :Dekorasyonu aç/kapat (hazır dekorasyon varsa) STR_1407 :{WINDOW_COLOUR_2}Bunu inşa ediniz… STR_1408 :{WINDOW_COLOUR_2}Maliyet: {BLACK}{CURRENCY} -STR_1409 :Iniş/Biniş alanı +STR_1409 :İniş/Biniş alanı STR_1410 :Kule STR_1411 :{STRINGID} engelliyor STR_1412 :{WINDOW_COLOUR_3}Bu alet için diyagram yok -STR_1413 :{WINDOW_COLOUR_3}Diyagramlar ilk {STRINGID}{STRINGID}u terk ettiğinde oluşturulacakdır +STR_1413 :{WINDOW_COLOUR_3}Diyagramlar ilk {STRINGID}{STRINGID}u terk ettiğinde oluşturulacaktır STR_1414 :{BLACK}{DURATION} STR_1415 :{WINDOW_COLOUR_2}Hız STR_1416 :{WINDOW_COLOUR_2}Yükseklik @@ -803,7 +802,7 @@ STR_1418 :{WINDOW_COLOUR_2}Yatay. G STR_1419 :{BLACK}{VELOCITY} STR_1420 :{BLACK}{LENGTH} STR_1421 :{BLACK}{COMMA16}g -STR_1422 :{POP16}{STRINGID}in veri kayıdı +STR_1422 :{POP16}{STRINGID}in veri kaydı STR_1423 :Bekleme sırası STR_1424 :Yol STR_1425 :Yol @@ -839,7 +838,7 @@ STR_1454 :Müşteri ismi değiştirilemiyor… STR_1455 :Geçersiz müşteri ismi STR_1456 :{WINDOW_COLOUR_2}Harcadığı para: {BLACK}{CURRENCY2DP} STR_1457 :{WINDOW_COLOUR_2}Cebindeki para: {BLACK}{CURRENCY2DP} -STR_1458 :{WINDOW_COLOUR_2}Parkda geçirdiği zaman: {BLACK}{REALTIME} +STR_1458 :{WINDOW_COLOUR_2}Parkta geçirdiği zaman: {BLACK}{REALTIME} STR_1459 :Ray türü STR_1460 :Yarı boru STR_1461 :Kapalı boru @@ -849,9 +848,9 @@ STR_1464 :Sarmal yukarı (küçük) STR_1465 :Sarmal yukarı (büyük) STR_1466 :Sarmal aşağı (küçük) STR_1467 :Sarmal aşağı (büyük) -STR_1468 :Işciler +STR_1468 :İşçiler STR_1469 :Alet istasyonlar başlayıp istasyonla bitmeli -STR_1470 :Istasyon çok kısa +STR_1470 :İstasyon çok kısa STR_1471 :{WINDOW_COLOUR_2}Hız: STR_1472 :Bu aletin hızı STR_1473 :{WINDOW_COLOUR_2}Heyecan oranı: {BLACK}{COMMA2DP32} ({STRINGID}) @@ -876,14 +875,14 @@ STR_1491 :“Bundan var bile bende ({STRINGID})” STR_1492 :“{STRINGID} için param yetmiyor” STR_1493 :“Aç değilim” STR_1494 :“Susamadım” -STR_1495 :“Imdat!Boğuluyorum!” +STR_1495 :“İmdat! Boğuluyorum!” STR_1496 :“Kayıp oldum!” STR_1497 :“{STRINGID} süperdi!” STR_1498 :“{STRINGID} için çok fazla bekledim” STR_1499 :“Uykum geldi” -STR_1500 :“Acıkdım” +STR_1500 :“Acıktım” STR_1501 :“Susadım” -STR_1502 :“Tuvalete gitmem lazim” +STR_1502 :“Tuvalete gitmem lazım” STR_1503 :“{STRINGID} aletini bulamıyorum” STR_1504 :“Buna bu kadar para harcamam ({STRINGID})” STR_1505 :“{STRINGID} aletine yağmur yağdığı sürece binmem ” @@ -892,11 +891,11 @@ STR_1507 :“Park çıkışını bulamıyorum” STR_1508 :“{STRINGID} aletini terk etmek istiyorum” STR_1509 :“{STRINGID} aletinden inmek istiyorum” STR_1510 :“{STRINGID} güvenli olmadığı sürece binmem” -STR_1511 :“Bu yol berbat bir vaziyetde” +STR_1511 :“Bu yol berbat bir vaziyette” STR_1512 :“Burada çok insan var” STR_1513 :“Buradaki vandalizm felaket” STR_1514 :“Harika bir manzara!” -STR_1515 :“Bu Park gerçekden çok derli ve toplu” +STR_1515 :“Bu Park gerçekten çok derli ve toplu” STR_1516 :“Bu çeşmeler harika” STR_1517 :“Müzik hoşuma gitti” STR_1518 :“Bu {STRINGID} balonu fiyatına değer” @@ -915,12 +914,12 @@ STR_1530 : STR_1531 :“Bu {STRINGID} pizzası fiyatına değer” STR_1532 : STR_1533 :“Bu {STRINGID} patlamış mısırı fiyatına değer” -STR_1534 :“Bu {STRINGID} Hot Dogu fiyatına değer” +STR_1534 :“Bu {STRINGID} Hot Dog’u fiyatına değer” STR_1535 :“Bu {STRINGID} deniz ürünleri fiyatına değer” STR_1536 :“Bu {STRINGID} şapkası fiyatına değer” STR_1537 :“Bu {STRINGID} şeker elması fiyatına değer” -STR_1538 :“Bu {STRINGID} tişörü fiyatına değer” -STR_1539 :“Bu {STRINGID} donutı fiyatına değer” +STR_1538 :“Bu {STRINGID} tişörtü fiyatına değer” +STR_1539 :“Bu {STRINGID} donut’ı fiyatına değer” STR_1540 :“Bu {STRINGID} kahvesi fiyatına değer” STR_1541 : STR_1542 :“Bu {STRINGID} kızarmış tavuğu fiyatına değer” @@ -1029,7 +1028,7 @@ STR_1644 : STR_1645 : STR_1646 : STR_1647 : -STR_1648 :“Imdat! Yere bırakın beni!” +STR_1648 :“İmdat! Yere bırakın beni!” STR_1649 :“Param bitiyor!” STR_1650 :“Wow! Yeni alet inşa ediliyor!” STR_1653 :“…sonunda varabildim! ({STRINGID})” @@ -1055,11 +1054,11 @@ STR_1672 :Fren STR_1673 :Rotasyon ayarlayıcısı STR_1674 :Frenleme hızı STR_1675 :{POP16}{VELOCITY} -STR_1676 :Frenlerin{NEWLINE}kaç km/h’dan itibaren frenlemeseni seçiniz +STR_1676 :Frenlerin{NEWLINE}kaç km/h’ten itibaren frenlemesini seçiniz STR_1677 :{WINDOW_COLOUR_2}Popülerlik: {BLACK}Bilinmiyor STR_1678 :{WINDOW_COLOUR_2}Popülerlik: {BLACK}%{COMMA16} -STR_1679 :Sarmal yuarkı (sol) -STR_1680 :Sarmal yuarkı (sağ) +STR_1679 :Sarmal yukarı (sol) +STR_1680 :Sarmal yukarı (sağ) STR_1681 :Sarmal aşağı (sol) STR_1682 :Sarmal aşağı (sağ) STR_1683 :Taban boyutu 2 × 2 @@ -1073,24 +1072,24 @@ STR_1690 :{WINDOW_COLOUR_2}{STRINGID}{NEWLINE}{BLACK}{STRINGID} STR_1691 :{WINDOW_COLOUR_2} Maliyet: {BLACK}{CURRENCY} STR_1692 :{WINDOW_COLOUR_2} Maliyet: {BLACK}{CURRENCY}’dan itibaren STR_1693 :Müşteriler -STR_1694 :Işciler +STR_1694 :İşçiler STR_1695 :Gelir ve Gider STR_1696 :Müşteri bilgisi STR_1697 :Bekleme sırasına koyulamaz STR_1698 :Sadece bekleme sırasına koyulabilir STR_1699 :Oyunda çok fazla kişi var -STR_1700 :Yeni temizlikci al +STR_1700 :Yeni temizlikçi al STR_1701 :Yeni tamirci al STR_1702 :Yeni güvenlik al STR_1703 :Yeni animatör al -STR_1704 :Yeni işci işe alınamıyor… -STR_1705 :Bu işciyi kov +STR_1704 :Yeni işçi işe alınamıyor… +STR_1705 :Bu işçiyi kov STR_1706 :Bu kişiyi başka yere taşı -STR_1707 :Çok fazla işci var -STR_1708 :Iscinin hangi bölgede{NEWLINE}çalışıcağını seçiniz -STR_1709 :Işci kovmak +STR_1707 :Çok fazla işçi var +STR_1708 :İsçinin hangi bölgede{NEWLINE}çalışacağını seçiniz +STR_1709 :İşçi kovmak STR_1710 :Evet -STR_1711 :{WINDOW_COLOUR_1}Bu işciyi kovmak istediğinizden eminmisiniz: {STRINGID} +STR_1711 :{WINDOW_COLOUR_1}Bu işçiyi kovmak istediğinizden emin misiniz: {STRINGID} STR_1712 :{INLINE_SPRITE}{247}{19}{00}{00}{WINDOW_COLOUR_2}Yolları temizlesin STR_1713 :{INLINE_SPRITE}{248}{19}{00}{00}{WINDOW_COLOUR_2}Çiçekleri sulasın STR_1714 :{INLINE_SPRITE}{249}{19}{00}{00}{WINDOW_COLOUR_2}Çöp bidonlarını boşaltsın @@ -1106,17 +1105,17 @@ STR_1723 :Park açılamıyor… STR_1724 :Park kapatılamıyor… STR_1725 :Arazi satın alınamıyor… STR_1726 :Arazi satılık değil! -STR_1727 :Inşa hakkı satılmıyor! +STR_1727 :İnşa hakkı satılmıyor! STR_1728 :Burada inşa hakkı alınamıyor… STR_1729 :Bu alan parka ait değil -STR_1730 :{RED}Kapalı - - -STR_1731 :{WHITE}{STRINGID} - - -STR_1732 :Inşa et +STR_1730 :{RED}Kapalı - - +STR_1731 :{WHITE}{STRINGID} - - +STR_1732 :İnşa et STR_1733 :Mod STR_1734 :{WINDOW_COLOUR_2}Tur sayısı: STR_1735 :Tur miktarını seçiniz STR_1736 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} -STR_1738 :Tur sayısı değistirelimiyor… +STR_1738 :Tur sayısı değiştirilemiyor… STR_1739 :Yarışı {INT32} kazandı STR_1740 :Yarışı {STRINGID} kazandı STR_1741 :Daha inşa edilmedi! @@ -1134,24 +1133,24 @@ STR_1754 :{BLACK}{COMMA32} Müşteri STR_1755 :{BLACK}{COMMA32} Müşteri STR_1756 :{WINDOW_COLOUR_2}Giriş ücreti: STR_1757 :{WINDOW_COLOUR_2}Güvenilirlik: {MOVE_X}{255}{BLACK}%{COMMA16} -STR_1758 :Inşa modu +STR_1758 :İnşa modu STR_1759 :Atlama modu STR_1760 :Doldurma modu STR_1761 :Labirenti buraya doğru inşa et STR_1762 :Şelale STR_1763 :Kaynar su -STR_1764 :Agaç gövdeleri +STR_1764 :Ağaç gövdeleri STR_1765 :Fotoğraf alanı STR_1766 :Çevirici STR_1767 :Türbin STR_1768 :Sallama sayısı değiştirilemiyor… STR_1769 :{WINDOW_COLOUR_2}Sallama sayısı: -STR_1770 :Aletin kaç tur salıncağanı seçiniz +STR_1770 :Aletin kaç tur salınacağını seçiniz STR_1771 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_1773 :Alet başı bir tane fotoğraf alanı inşa edilebilir -STR_1774 :Alet başı bır tane asansörlü tırmanma zinciri inşa edilebilir +STR_1774 :Alet başı bir tane asansörlü tırmanma zinciri inşa edilebilir STR_1777 :{WINDOW_COLOUR_2}Alet müziği -STR_1778 :{STRINGID} - - +STR_1778 :{STRINGID} - - STR_1779 :{INLINE_SPRITE}{254}{19}{00}{00} Panda kıyafeti STR_1780 :{INLINE_SPRITE}{255}{19}{00}{00} Kaplan kıyafeti STR_1781 :{INLINE_SPRITE}{00}{20}{00}{00} Fil kıyafeti @@ -1159,11 +1158,11 @@ STR_1782 :{INLINE_SPRITE}{01}{20}{00}{00} Romalı kıyafeti STR_1783 :{INLINE_SPRITE}{02}{20}{00}{00} Goril kıyafeti STR_1784 :{INLINE_SPRITE}{03}{20}{00}{00} Kardan adam kıyafeti STR_1785 :{INLINE_SPRITE}{04}{20}{00}{00} Şövalye kıyafeti -STR_1786 :{INLINE_SPRITE}{05}{20}{00}{00} Uzaycı kıyafeti -STR_1787 :{INLINE_SPRITE}{06}{20}{00}{00} Eşkiya kıyafeti +STR_1786 :{INLINE_SPRITE}{05}{20}{00}{00} Astronot kıyafeti +STR_1787 :{INLINE_SPRITE}{06}{20}{00}{00} Eşkıya kıyafeti STR_1788 :{INLINE_SPRITE}{07}{20}{00}{00} Şerif kıyafeti STR_1789 :{INLINE_SPRITE}{08}{20}{00}{00} Korsan kıyafeti -STR_1790 :Bu işcinin üniforma{NEWLINE}rengini seçiniz +STR_1790 :Bu işçinin üniforma{NEWLINE}rengini seçiniz STR_1791 :{WINDOW_COLOUR_2}Üniforma rengi: STR_1792 :{STRINGID} aletinin tamirine gidiyor STR_1793 :{STRINGID} aletini kontrol etmeye gidiyor @@ -1172,13 +1171,13 @@ STR_1795 :Telsizi dinliyor STR_1796 :Bozuk - tamir edilmesi gerek STR_1798 :Hortum STR_1799 :{POP16}{POP16}{POP16}{POP16}{POP16}{CURRENCY2DP} -STR_1800 :Acil stop şalteri +STR_1800 :Acil stop şalteri STR_1801 :Emniyet kemerleri açılmıyor STR_1802 :Emniyet kemerleri kapanmıyor STR_1803 :Kapılar açılmıyor STR_1804 :Kapılar kapanmıyor STR_1805 :Arızalı alet -STR_1806 :Istasyon frenleri arızalı +STR_1806 :İstasyon frenleri arızalı STR_1807 :Emniyet kontrolü arızalı STR_1808 :{WINDOW_COLOUR_2}Son arıza: {BLACK}{STRINGID} STR_1809 :{WINDOW_COLOUR_2}Şu anki arıza: {OUTLINE}{RED}{STRINGID} @@ -1195,9 +1194,9 @@ STR_1819 :{WINDOW_COLOUR_2}Tüm müşteriler (özetli) STR_1820 :{WINDOW_COLOUR_2}Müşteri {STRINGID} STR_1821 :{WINDOW_COLOUR_2}Düşünce: {SMALLFONT}{STRINGID} STR_1822 :{WINDOW_COLOUR_2}Müşterilerin {POP16}{STRINGID} hakkında düşündükleri -STR_1823 :Müşterilerin bu alet{NEWLINE}üzeri düşünceleri -STR_1824 :Bu aletin müşterile -STR_1825 :Bu alet için{NEWLINE}bekliyen müşteriler +STR_1823 :Müşterilerin bu alet{NEWLINE}üzerine düşünceleri +STR_1824 :Bu aletteki müşterileri göster +STR_1825 :Bu alet için{NEWLINE}bekleyen müşterileri göster STR_1826 :Durum STR_1827 :Popülerlik STR_1828 :Memnuniyet @@ -1213,29 +1212,29 @@ STR_1837 :Bilinmiyor STR_1838 :%{COMMA16} STR_1839 :%{COMMA16} STR_1840 :%{COMMA16} -STR_1841 :saatde {CURRENCY2DP} +STR_1841 :Kâr: Saatte {CURRENCY2DP} STR_1842 :{COMMA32} kişinin favorisi STR_1843 :{COMMA32} kişinin favorisi -STR_1844 :Informationsart auswählen, die{NEWLINE}in Attraktionsliste angezeigt{NEWLINE}werden soll +STR_1844 : Yolculuk/çekicilik listesinde{NEWLINE}gösterilecek bilgi türünü seçin STR_1845 :{MONTHYEAR} STR_1846 :{COMMA32} müşteri STR_1847 :{INLINE_SPRITE}{11}{20}{00}{00}{COMMA32} müşteri STR_1848 :{INLINE_SPRITE}{10}{20}{00}{00}{COMMA32} müşteri STR_1849 :{WINDOW_COLOUR_2}Müziği aç/kapat STR_1850 :Bu alet için müziği{NEWLINE}seçiniz -STR_1851 :{WINDOW_COLOUR_2}Işletme maliyeti:{BLACK} saatde {CURRENCY2DP} -STR_1852 :{WINDOW_COLOUR_2}Işletme maliyeti:{BLACK} Bilinmiyor -STR_1853 :{WINDOW_COLOUR_2}Inşa:{BLACK} Bu yıl -STR_1854 :{WINDOW_COLOUR_2}Inşa:{BLACK} Geçen yıl -STR_1855 :{WINDOW_COLOUR_2}Inşa:{BLACK} {COMMA16} yıl önce +STR_1851 :{WINDOW_COLOUR_2}İşletme maliyeti:{BLACK} saatte {CURRENCY2DP} +STR_1852 :{WINDOW_COLOUR_2}İşletme maliyeti:{BLACK} Bilinmiyor +STR_1853 :{WINDOW_COLOUR_2}İnşa:{BLACK} Bu yıl +STR_1854 :{WINDOW_COLOUR_2}İnşa:{BLACK} Geçen yıl +STR_1855 :{WINDOW_COLOUR_2}İnşa:{BLACK} {COMMA16} yıl önce STR_1856 :{WINDOW_COLOUR_2}Satış başı kâr: {BLACK}{CURRENCY2DP} STR_1857 :{WINDOW_COLOUR_2}Satış başı zarar: {BLACK}{CURRENCY2DP} STR_1858 :{WINDOW_COLOUR_2}Maaş: {BLACK}Aylık {CURRENCY2DP} -STR_1859 :Temizlikci +STR_1859 :Temizlikçi STR_1860 :Tamirci STR_1861 :Güvenlik STR_1862 :Animatör -STR_1863 :Temizlikci +STR_1863 :Temizlikçi STR_1864 :Tamirci STR_1865 :Güvenlik STR_1866 :Animatör @@ -1244,8 +1243,8 @@ STR_1868 :Çevirme miktarı değiştirilemiyor… STR_1869 :{WINDOW_COLOUR_2}Çevirme miktarı: STR_1870 :Aletin kaç defa çevirme yapacağını seçiniz STR_1871 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} -STR_1873 :{WINDOW_COLOUR_2}Gelir: {BLACK} saatde {CURRENCY2DP} -STR_1874 :{WINDOW_COLOUR_2}Kâr: {BLACK} saatde {CURRENCY2DP} +STR_1873 :{WINDOW_COLOUR_2}Gelir: {BLACK} saatte {CURRENCY2DP} +STR_1874 :{WINDOW_COLOUR_2}Kâr: {BLACK} saatte {CURRENCY2DP} STR_1875 :{BLACK} {SPRITE}{BLACK} {STRINGID} STR_1876 :{WINDOW_COLOUR_2}{INLINE_SPRITE}{251}{19}{00}{00}Aletleri kontrol etsin STR_1877 :{WINDOW_COLOUR_2}{INLINE_SPRITE}{252}{19}{00}{00}Aletleri tamir etsin @@ -1259,10 +1258,10 @@ STR_1884 :2 saate bir STR_1885 :Hiç bir zaman STR_1886 :{STRINGID} aletini kontrol ediyor STR_1887 :{WINDOW_COLOUR_2}Son kontrol: {BLACK}{COMMA16} dakika önce -STR_1888 :{WINDOW_COLOUR_2}Son kontrol: {BLACK}4 saatden fazla +STR_1888 :{WINDOW_COLOUR_2}Son kontrol: {BLACK}4 saatten fazla STR_1889 :{WINDOW_COLOUR_2}Sıra dışı: {MOVE_X}{255}{BLACK}%{COMMA16} STR_1890 :Tamircilerin bu aleti kaç defa kontrol{NEWLINE}edeceğini seçiniz -STR_1891 :Parkda henüz {STRINGID} yok! +STR_1891 :Parkta henüz {STRINGID} yok! STR_1894 :{WINDOW_COLOUR_2}{STRINGID} (satılan miktar): {BLACK}{COMMA32} STR_1895 :Yeni alet/dükkan inşa et STR_1896 :{WINDOW_COLOUR_2}Gider/Gelir @@ -1272,11 +1271,11 @@ STR_1899 :{WINDOW_COLOUR_2}Arazi satın alma STR_1900 :{WINDOW_COLOUR_2}Arazi düzenleme STR_1901 :{WINDOW_COLOUR_2}Park biletleri STR_1902 :{WINDOW_COLOUR_2}Alet biletleri -STR_1903 :{WINDOW_COLOUR_2}Diğer stand satışları -STR_1904 :{WINDOW_COLOUR_2}Diğer stand giderleri +STR_1903 :{WINDOW_COLOUR_2}Diğer stant satışları +STR_1904 :{WINDOW_COLOUR_2}Diğer stant giderleri STR_1905 :{WINDOW_COLOUR_2}Gıda satışları STR_1906 :{WINDOW_COLOUR_2}Gıda giderleri -STR_1907 :{WINDOW_COLOUR_2}Işci maaşları +STR_1907 :{WINDOW_COLOUR_2}İşçi maaşları STR_1908 :{WINDOW_COLOUR_2}Pazarlama STR_1909 :{WINDOW_COLOUR_2}Araştırma STR_1910 :{WINDOW_COLOUR_2}Kredi faizi @@ -1302,20 +1301,20 @@ STR_1931 :{STRINGID} {STRINGID} için sıra bekliyor STR_1932 :{STRINGID} {STRINGID} aletine bindi STR_1933 :{STRINGID} {STRINGID} aletine bindi STR_1934 :{STRINGID} {STRINGID} aletinden indi -STR_1935 :{STRINGID} parkdan çıktı +STR_1935 :{STRINGID} parktan çıktı STR_1936 :{STRINGID} {STRINGID} aldı STR_1937 :Bu bilginin penceresini göster STR_1938 :Müşteriyi takip ediniz -STR_1939 :Işciyi takip ediniz +STR_1939 :İşçiyi takip ediniz STR_1940 :Müşteri durumu STR_1941 :Müşterinin bindiği aletler STR_1942 :Müşterinin para durumu STR_1943 :Müşterinin düşünceleri STR_1944 :Müşterinin taşıdıkları -STR_1945 :Işcinin talimatları ve seçenekleri +STR_1945 :İşçinin talimatları ve seçenekleri STR_1946 :Animatörün kıyafeti -STR_1947 :Bu işci türüne bağlı olan bölgeler -STR_1948 :Yeni işci alınız +STR_1947 :Bu işçi türüne bağlı olan bölgeler +STR_1948 :Yeni işçi alınız STR_1949 :Finansal genel bakış STR_1950 :Finans grafiği STR_1951 :Parkın değer grafiği @@ -1332,7 +1331,7 @@ STR_1961 :{WINDOW_COLOUR_2}Oyuncak fiyatı: STR_1962 :{WINDOW_COLOUR_2}Harita fiyatı: STR_1963 :{WINDOW_COLOUR_2}Fotoğraf fiyatı: STR_1964 :{WINDOW_COLOUR_2}Şemsiye fiyatı: -STR_1965 :{WINDOW_COLOUR_2}Içecek fiyatı: +STR_1965 :{WINDOW_COLOUR_2}İçecek fiyatı: STR_1966 :{WINDOW_COLOUR_2}Burger fiyatı: STR_1967 :{WINDOW_COLOUR_2}Patates fiyatı: STR_1968 :{WINDOW_COLOUR_2}Dondurma fiyatı: @@ -1360,7 +1359,7 @@ STR_1989 :Oyuncak STR_1990 :Park haritası STR_1991 :Fotoğraf STR_1992 :Şemsiye -STR_1993 :Içecek +STR_1993 :İçecek STR_1994 :Burger STR_1995 :Patates STR_1996 :Dondurma @@ -1388,7 +1387,7 @@ STR_2017 :Oyuncaklar STR_2018 :Park haritası STR_2019 :Fotoğraflar STR_2020 :Şemsiye -STR_2021 :Içecekler +STR_2021 :İçecekler STR_2022 :Burgerler STR_2023 :Patatesler STR_2024 :Dondurmalar @@ -1416,7 +1415,7 @@ STR_2045 :Oyuncak STR_2046 :Park haritası STR_2047 :Fotoğraf STR_2048 :Şemsiye -STR_2049 :Içecek +STR_2049 :İçecek STR_2050 :Burger STR_2051 :Cips STR_2052 :Dondurma @@ -1444,7 +1443,7 @@ STR_2073 :“{STRINGID}” oyuncağı STR_2074 :{STRINGID} haritası STR_2075 :{STRINGID} fotoğrafı STR_2076 :“{STRINGID}” şemsiyesi -STR_2077 :Içecek +STR_2077 :İçecek STR_2078 :Burger STR_2079 :Cips STR_2080 :Dondurma @@ -1525,7 +1524,7 @@ STR_2163 :Boş meyve suyu şişeleri STR_2164 :Sosisler STR_2165 :Boş taslar STR_2169 :simit -STR_2170 :sicak çikolata +STR_2170 :sıcak çikolata STR_2171 :ice tea STR_2172 :kek STR_2173 :güneş gözlüğü @@ -1562,11 +1561,11 @@ STR_2206 :Boş meyve suyu kutusu STR_2207 :Boş meyve suyu şişesi STR_2208 :Sosis STR_2209 :Boş tas -STR_2210 :Parkdaki tüm temizlikciler -STR_2211 :Parkdaki tüm tamirciler -STR_2212 :Parkdaki tüm güvenlikler -STR_2213 :Parkdaki tüm animatörler -STR_2214 :Oyun durudurulduğu sürece inşa edilemiyor! +STR_2210 :Parktaki tüm temizlikçiler +STR_2211 :Parktaki tüm tamirciler +STR_2212 :Parktaki tüm güvenlikler +STR_2213 :Parktaki tüm animatörler +STR_2214 :Oyun durdurulduğu sürece inşa edilemiyor! STR_2215 :{STRINGID}{NEWLINE}({STRINGID}) STR_2216 :{WINDOW_COLOUR_2}{COMMA16}°C STR_2217 :{WINDOW_COLOUR_2}{COMMA16}°F @@ -1575,17 +1574,17 @@ STR_2219 :{RED}{STRINGID} aletinde {COMMA16} kişi canını kayıp etti STR_2220 :{WINDOW_COLOUR_2}Park değerlendirmesi: {BLACK}{COMMA16} STR_2221 :Park değerlendirmesi: {COMMA16} STR_2222 :{BLACK}{STRINGID} -STR_2223 :{WINDOW_COLOUR_2}Parkdaki müşteri sayısı: {BLACK}{COMMA32} +STR_2223 :{WINDOW_COLOUR_2}Parktaki müşteri sayısı: {BLACK}{COMMA32} STR_2224 :{WINDOW_COLOUR_2}Para: {BLACK}{CURRENCY2DP} STR_2225 :{WINDOW_COLOUR_2}Para: {RED}{CURRENCY2DP} STR_2226 :{WINDOW_COLOUR_2}Park değeri: {BLACK}{CURRENCY} STR_2227 :{WINDOW_COLOUR_2}Şirket değeri: {BLACK}{CURRENCY} -STR_2228 :{WINDOW_COLOUR_2}Geçen ay dükkanlardan ve standlardan kalan kâr: {BLACK}{CURRENCY} +STR_2228 :{WINDOW_COLOUR_2}Geçen ay dükkanlardan ve stantlardan kalan kâr: {BLACK}{CURRENCY} STR_2229 :Dikine doğru ray STR_2230 :Dik ray STR_2231 :Düşüş freni (heyecan arttırmak için) STR_2232 :Asansörlü tırmanma zinciri -STR_2233 :Park biligisi +STR_2233 :Park bilgisi STR_2234 :Son bildirimler STR_2235 :{STRINGID} {STRINGID} STR_2236 :Ocak @@ -1595,7 +1594,7 @@ STR_2239 :Nisan STR_2240 :Mayıs STR_2241 :Haziran STR_2242 :Temmuz -STR_2243 :Auğustos +STR_2243 :Ağustos STR_2244 :Eylül STR_2245 :Ekim STR_2246 :Kasım @@ -1605,12 +1604,12 @@ STR_2249 :{BABYBLUE}Yeni alet araştırıldı:{NEWLINE}{STRINGID} STR_2250 :{BABYBLUE}Yeni dekorasyon araştırıldı:{NEWLINE}{STRINGID} STR_2251 :Sadece yollara inşa edilir! STR_2252 :Sadece yolların üstünde inşa edilir! -STR_2253 :Toplu taşım araçları +STR_2253 :Toplu taşıma araçları STR_2254 :Ölçülü aletler STR_2255 :Hız trenleri STR_2256 :Heyecanlı aletler STR_2257 :Sulu aletler -STR_2258 :Dükkanlar ve standlar +STR_2258 :Dükkanlar ve stantlar STR_2259 :Dekorasyon STR_2260 :Yok STR_2261 :Düşük bütçe @@ -1622,7 +1621,7 @@ STR_2266 :Araştırma seçenekleri STR_2267 :Şu an araştırılan STR_2268 :Son araştırma STR_2269 :{WINDOW_COLOUR_2}Tür: {BLACK}{STRINGID} -STR_2270 :{WINDOW_COLOUR_2}Ilerleme: {BLACK}{STRINGID} +STR_2270 :{WINDOW_COLOUR_2}İlerleme: {BLACK}{STRINGID} STR_2271 :{WINDOW_COLOUR_2}Tahmin: {BLACK}{STRINGID} STR_2272 :{WINDOW_COLOUR_2}Ürün:{NEWLINE}{BLACK}{STRINGID} STR_2273 :{WINDOW_COLOUR_2}Dekorasyon:{NEWLINE}{BLACK}{STRINGID} @@ -1630,21 +1629,21 @@ STR_2274 :Bu araştırma üzeri bilgi STR_2275 :Araştırma seçenekleri STR_2276 :Araştırma durumu STR_2277 :Bilinmiyor -STR_2278 :Toplu taşım araçları +STR_2278 :Toplu taşıma araçları STR_2279 :Ölçülü alet STR_2280 :Hız treni -STR_2281 :Heycanlı alet +STR_2281 :Heyecanlı alet STR_2282 :Sulu alet -STR_2283 :Dükkan/Stand +STR_2283 :Dükkan/Stant STR_2284 :Dekorasyon -STR_2285 :Ilk çizimler +STR_2285 :İlk çizimler STR_2286 :Tasarım STR_2287 :Tasarım tamamlanıyor STR_2288 :Bilinmiyor STR_2289 :{STRINGID} {STRINGID} STR_2291 :Yeni oyun için senaryoyu seçiniz STR_2292 :{WINDOW_COLOUR_2}Bindiği aletler: -STR_2293 :{BLACK} Hiç birşey +STR_2293 :{BLACK} Hiçbir şey STR_2294 :Zemin türünü değiştir STR_2295 :Duvar türünü değiştir STR_2296 :{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2} park girişi için harcadı @@ -1669,7 +1668,7 @@ STR_2314 :{WINDOW_COLOUR_2}Alet uzunluğu: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Maliyet: {BLACK} yaklaşık {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Gerekli alan: {BLACK}{COMMA16} × {COMMA16} blok STR_2321 :{WINDOW_COLOUR_2}Alet sayısı: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Işci: {BLACK}{COMMA32} +STR_2322 :{WINDOW_COLOUR_2}İşçi: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Park büyüklüğü: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Park büyüklüğü: {BLACK}{COMMA32}sq.ft. STR_2325 :Satılık arazi var ise yeni arazi satın alınız @@ -1679,11 +1678,11 @@ STR_2328 :{WINDOW_COLOUR_2}Para birimi: STR_2329 :{WINDOW_COLOUR_2}Mesafe ve hız birimi: STR_2330 :{WINDOW_COLOUR_2}Sıcaklık ölçüm birimi: STR_2331 :{WINDOW_COLOUR_2}Yükseklik birimi: -STR_2332 :“General Units” +STR_2332 :Birimler STR_2333 :Ses efektleri STR_2334 :Pounds (£) STR_2335 :Dollar ($) -STR_2336 :Franc (F) +STR_2336 :Frank (F) STR_2337 :Alman Markı (DM) STR_2338 :Yen (¥) STR_2339 :Peseta (Pts) @@ -1694,22 +1693,22 @@ STR_2343 :Euro (€) STR_2344 :Amerikan sistemi STR_2345 :Metrik sistemi STR_2347 :{RED}{STRINGID} boğuldu! -STR_2348 :Işci istatikleri +STR_2348 :İşçi istatistikleri STR_2349 :{WINDOW_COLOUR_2}Aylık maaş: {BLACK}{CURRENCY} -STR_2350 :{WINDOW_COLOUR_2}Işe giriş tarihi: {BLACK}{MONTHYEAR} -STR_2351 :{WINDOW_COLOUR_2}Biçdiği çim: {BLACK}{COMMA32} +STR_2350 :{WINDOW_COLOUR_2}İşe giriş tarihi: {BLACK}{MONTHYEAR} +STR_2351 :{WINDOW_COLOUR_2}Biçtiği çim: {BLACK}{COMMA32} STR_2352 :{WINDOW_COLOUR_2}Suladığı çiçek: {BLACK}{COMMA32} STR_2353 :{WINDOW_COLOUR_2}Süpürdüğü yer: {BLACK}{COMMA32} -STR_2354 :{WINDOW_COLOUR_2}Boşaltığı çöp bidonu: {BLACK}{COMMA32} +STR_2354 :{WINDOW_COLOUR_2}Boşalttığı çöp bidonu: {BLACK}{COMMA32} STR_2355 :{WINDOW_COLOUR_2}Tamir ettiği alet: {BLACK}{COMMA32} STR_2356 :{WINDOW_COLOUR_2}Kontrol ettiği alet: {BLACK}{COMMA32} -STR_2358 :“General Units” +STR_2358 :Birimler STR_2359 :Gerçek birim STR_2360 :Ekran çözünürlüğü: STR_2361 :Arazi yumuşatma STR_2362 :Döşeme kenarı düzleştirmeyi aç/kapat STR_2363 :Zemin çizgisini göster -STR_2364 :Yerin üzerine inşayı kolaylaştırmak için parmaklık şeklinde çizgiler oluşturuluyor +STR_2364 :Yerin üzerine inşayı kolaylaştırmak için parmaklık şeklinde çizgiler oluşturuluyor STR_2365 :Banka daha fazla kredi vermiyor! STR_2366 :Celsius (°C) STR_2367 :Fahrenheit (°F) @@ -1722,7 +1721,7 @@ STR_2373 :Normal STR_2374 :Yüksek STR_2375 :Çok yüksek STR_2376 :Aşırı yüksek -STR_2377 :Devasal yüksek +STR_2377 :Devasa yüksek STR_2378 :Küçült STR_2379 :Büyüt STR_2380 :Küçült @@ -1733,28 +1732,28 @@ STR_2384 :{WINDOW_COLOUR_2}Hedefiniz: STR_2385 :{BLACK}Yok STR_2386 :{BLACK}Parkınızda en az {COMMA32} müşteri {MONTHYEAR} sonuna kadar bulunması ve park değerlendirmesinin en az 600 olması gerekli STR_2387 :{BLACK}Park değeri en az {POP16}{POP16}{CURRENCY} {PUSH16}{PUSH16}{PUSH16}{PUSH16}{PUSH16}{MONTHYEAR} kadar olmalı -STR_2388 :{BLACK}Iyi eğlenceler! +STR_2388 :{BLACK}İyi eğlenceler! STR_2389 :{BLACK}Kendinize göre en iyi {STRINGID} inşa ediniz! -STR_2390 :{BLACK}Parkınızda heyecan oranı en az 6.00 olan, 10 çesitli hız treni inşa edilmeli +STR_2390 :{BLACK}Parkınızda heyecan oranı en az 6.00 olan, 10 çeşitli hız treni inşa edilmeli STR_2391 :{BLACK}Parkınızda en az {COMMA32} müşteri bulunması ve park değerlendirmesinin hiç bir zaman 700’den aşağı düşmemesi gerekli STR_2392 :{BLACK}Alet bileti satışlarından aylık en az {POP16}{POP16}{CURRENCY} geliriniz olmalı STR_2393 :{BLACK}Parkınızda heyecan oranı en az 7.00 ve uzunluğu en az {LENGTH} olan 10 çeşitli hız treni inşa edilmeli STR_2394 :{BLACK}Parkınızda bulunan 5 kısmen inşa edilmiş hız trenlerinin inşasını en az {POP16}{POP16}{COMMA2DP32} heyecan oranı ile tamamlayınız STR_2395 :{BLACK}Pakınızın kredi borcunu ödeyip, park değerini en az {POP16}{POP16}{CURRENCY} yükseltiniz -STR_2396 :{BLACK}Dükkan ve stand gelirleniz aylık en az {POP16}{POP16}{CURRENCY} olmalı +STR_2396 :{BLACK}Dükkan ve stant gelirleriniz aylık en az {POP16}{POP16}{CURRENCY} olmalı STR_2397 :Yok STR_2398 :Belirli bir tarihe kadar müşteri sayısı STR_2399 :Belirli bir tarihe kadar park değeri STR_2400 :Hedefsiz STR_2401 :En iyi alet inşası STR_2402 :10 çeşitli hız treni inşası -STR_2403 :Belirli bir müşteri sayısı +STR_2403 :Belirli bir müşteri sayısı STR_2404 :Aylık alet bileti satışları STR_2405 :Belirli bir uzunluk ile 10 çeşitli hız treni STR_2406 :5 kısmen inşa edilmiş hız trenini tamamlamak STR_2407 :Kedi borcunu geri ödemek ve park değeri yükseltmek -STR_2408 :Aylık dükkan ve stand satışları -STR_2409 :{WINDOW_COLOUR_2}Faaliyetde olan pazarlama kampanyaları +STR_2408 :Aylık dükkan ve stant satışları +STR_2409 :{WINDOW_COLOUR_2}Faaliyette olan pazarlama kampanyaları STR_2410 :{BLACK}Yok STR_2411 :{WINDOW_COLOUR_2}Mevcut olan pazarlama kampanyaları STR_2412 :Bu pazarlamayı başlatınız @@ -1801,16 +1800,16 @@ STR_2462 :Park girişini görüntüle STR_2463 :Park değerlendirme grafiği STR_2464 :Aylık müşteri sayısı grafiği STR_2465 :Park ücreti -STR_2466 :Park istatikleri +STR_2466 :Park istatistikleri STR_2467 :Hedef(ler) STR_2468 :Parkın aldığı son ödüller STR_2469 :Araştırma için ne kadar para harcamak istediğinizi seçiniz -STR_2470 :Toplu taşım araçları araştırınız +STR_2470 :Toplu taşıma araçları araştırınız STR_2471 :Ölçülü aletler araştırınız STR_2472 :Hız trenleri araştırınız -STR_2473 :Heyecanlı aletler araştırnız +STR_2473 :Heyecanlı aletler araştırınız STR_2474 :Sulu aletler araştırınız -STR_2475 :Dükkan/Stand araştırınız +STR_2475 :Dükkan/Stant araştırınız STR_2476 :Yeni dekorasyon araştırınız STR_2477 :Alet modunu seçiniz STR_2478 :Zamana karşı hız grafiğini göster @@ -1828,12 +1827,12 @@ STR_2491 :Varsayılan ayarlar STR_2492 : STR_2493 :Son açılan pencereyi kapat STR_2494 :Tüm pencereleri kapat -STR_2495 :Inşayı kapat +STR_2495 :İnşayı kapat STR_2496 :Oyunu durdur STR_2497 :Görüntüyü uzaklaştır STR_2498 :Görüntüyü yakınlaştır STR_2499 :Görünümü saat yönünde döndür -STR_2500 :Inşa modunda çevirme +STR_2500 :İnşa modunda çevirme STR_2501 :Yeraltı görüntüsü STR_2502 :Tabanı gizle STR_2503 :Duvarları gizle @@ -1854,7 +1853,7 @@ STR_2517 :Araştırma penceresi STR_2518 :Aletler listesi STR_2519 :Park bilgisi STR_2520 :Müşteri listesi -STR_2521 :Işci listesi +STR_2521 :İşçi listesi STR_2522 :Son bildirimler STR_2523 :Harita STR_2524 :Screenshot @@ -1922,7 +1921,7 @@ STR_2704 :30 dakikaya bir STR_2705 :Saat başı STR_2706 :Hiç STR_2707 :Sistem iletişim penceresini kullanınız -STR_2708 :{WINDOW_COLOUR_1}{STRINGID} adlı dosya zaten bulunmakda. Kaydetmek istediğinizden eminmisiniz? +STR_2708 :{WINDOW_COLOUR_1}{STRINGID} adlı dosya zaten bulunmakta. Kaydetmek istediğinizden emin misiniz? STR_2709 :Kaydet STR_2710 :Dosya ismini giriniz. STR_2718 :Geri @@ -1932,7 +1931,7 @@ STR_2721 :{UINT16}saniye STR_2722 :{UINT16}dk:{UINT16}san STR_2723 :{UINT16}dk:{UINT16}san STR_2724 :{UINT16}dk:{UINT16}san -STR_2725 :{UINT16}dk:{UINT16}ssa +STR_2725 :{UINT16}dk:{UINT16}san STR_2726 :{UINT16}dk STR_2727 :{UINT16}dk STR_2728 :{UINT16}sa:{UINT16}dk @@ -1965,8 +1964,8 @@ STR_2767 :Havayı dondur STR_2769 :Parkı aç STR_2770 :Parkı kapat STR_2773 :Pencere modu -STR_2774 :Fullscreen -STR_2775 :Fullscreen (kenarsız) +STR_2774 :Tam ekran +STR_2775 :Tam ekran (kenarsız) STR_2776 :Dil: STR_2777 :{MOVE_X}{10}{STRING} STR_2778 :»{MOVE_X}{10}{STRING} @@ -1974,16 +1973,16 @@ STR_2779 :Görüntü alanı #{COMMA16} STR_2780 :Ekstra görüntü alanı # End of new strings STR_2781 :{STRINGID}: -STR_2782 :SHIFT + -STR_2783 :CTRL + +STR_2782 :SHIFT + +STR_2783 :CTRL + STR_2784 :Tuş ayarını değiştiriniz STR_2785 :{WINDOW_COLOUR_2}Bu kısaltma için yeni tuş giriniz:{NEWLINE}“{STRINGID}” STR_2786 :Tuşu değiştirmek için buraya basınız STR_2787 :{WINDOW_COLOUR_2}Park değeri: {BLACK}{CURRENCY} STR_2788 :{WINDOW_COLOUR_2}Tebrikler !{NEWLINE}{BLACK}Park değeri hedefinizi {CURRENCY} ile tamamladınız! STR_2789 :{WINDOW_COLOUR_2}Hedeflerinize ulaşamadınız ! -STR_2790 :Isminizi giriniz -STR_2791 :Isminizi yazınız +STR_2790 :İsminizi giriniz +STR_2791 :İsminizi yazınız STR_2792 :Senaryo listesi için isminizi yazınız: STR_2793 :({STRINGID} tarafından tamamlandı) STR_2794 :{BLACK}{STRINGID}{WINDOW_COLOUR_2} tarafından{NEWLINE}{BLACK}{CURRENCY}{WINDOW_COLOUR_2} park değeri ile tamamlandı @@ -1992,17 +1991,17 @@ STR_2796 :Aletleri kullandığınız bilgiye göre sıralayınız STR_2797 :Mouse ekran kenarına getirildiğinde görüntü kaydırılsın STR_2798 :Mouse ekran kenarına geldiğinde ekran kaydırılıyor STR_2799 :Tuş ayarlarını değiştiriniz -STR_2800 :{WINDOW_COLOUR_2}Toplam müşteri sayıası: {BLACK}{COMMA32} +STR_2800 :{WINDOW_COLOUR_2}Toplam müşteri sayısı: {BLACK}{COMMA32} STR_2801 :{WINDOW_COLOUR_2}Bilet satışlarından toplam gelir: {BLACK}{CURRENCY2DP} STR_2802 :Harita STR_2803 :Müşterileri haritada göster -STR_2804 :Bu işci türünü haritada göster +STR_2804 :Bu işçi türünü haritada göster STR_2805 :Parkı haritasını göster -STR_2806 :{RED}Müşteriler parkınızdaki pislik ötesi yollardan şikayetciler{NEWLINE}Temizlikcilerin nerede bulunduğunu kontrol ediniz -STR_2807 :{RED}Müşteriler parkınızdaki çöpden şikayetciler{NEWLINE}Temizlikcilerin nerede bulunduğunu kontrol ediniz -STR_2808 :{RED}Müşteriler parkınızdaki vandalizmden şikayetciler{NEWLINE}Güvenliğin nerede bulunduğunu kontrol ediniz -STR_2809 :{RED}Müşteriler karınlarını doyurabilecekleri bir dükkan veya stand bulamıyorlar -STR_2810 :{RED}Müşteriler susuzluğunu giderebilecek bir dükkan veya stand bulamıyorlar +STR_2806 :{RED}Müşteriler parkınızdaki pislik ötesi yollardan şikâyetçiler{NEWLINE}Temizlikçilerin nerede bulunduğunu kontrol ediniz +STR_2807 :{RED}Müşteriler parkınızdaki çöpten şikâyetçiler{NEWLINE}Temizlikçilerin nerede bulunduğunu kontrol ediniz +STR_2808 :{RED}Müşteriler parkınızdaki vandalizmden şikâyetçiler{NEWLINE}Güvenliğin nerede bulunduğunu kontrol ediniz +STR_2809 :{RED}Müşteriler karınlarını doyurabilecekleri bir dükkan veya stant bulamıyorlar +STR_2810 :{RED}Müşteriler susuzluğunu giderebilecek bir dükkan veya stant bulamıyorlar STR_2811 :{RED}Müşteriler parkınızda tuvaletleri bulamıyorlar veya tuvaletlere ulaşamıyorlar STR_2812 :{RED}Müşteriler parkınızda kayıp oluyorlar veya sıkışıyorlar{NEWLINE}Yollarınızın daha düzenli olmasını sağlayınız STR_2813 :{RED}Park giriş fiyatı çok yüksek!{NEWLINE}Müşteri çekmek için giriş fiyatını düşürünüz @@ -2056,18 +2055,18 @@ STR_2973 :Alternatif renkler 2 STR_2974 :Alternatif renkler 3 STR_2975 :Hangi renk şemasını seçmek/değiştirmek istediğinizi seçiniz STR_2976 :Seçili renk şemasını kullanarak bu aletin bir alanını boyayın -STR_2977 :Işci ismi -STR_2978 :Işciye yeni isim giriniz: -STR_2979 :Işci ismi değiştirilemiyor… +STR_2977 :İşçi ismi +STR_2978 :İşçiye yeni isim giriniz: +STR_2979 :İşçi ismi değiştirilemiyor… STR_2980 :Çok fazla banner bulunmakta -STR_2981 :{RED}Geçiş yasak - - -STR_2982 :Banner metini +STR_2981 :{RED}Geçiş yasak - - +STR_2982 :Afiş metni STR_2983 :Bu banner için yeni metin giriniz: -STR_2984 :Banner için yeni metin girilemiyor… -STR_2985 :Banner -STR_2986 :Bannerin metinini değiştiriniz -STR_2987 :Bu banneri yasaklı geçişe getiriniz -STR_2988 :Bu banneri siliniz +STR_2984 :Afiş için yeni metin girilemiyor… +STR_2985 :Afiş +STR_2986 :Afiş metinini değiştiriniz +STR_2987 :Bu afişi yasaklı geçişe getiriniz +STR_2988 :Bu afişi siliniz STR_2989 :Ana rengi seçiniz STR_2990 :Metin rengini seçiniz STR_2991 :Tabela @@ -2091,7 +2090,7 @@ STR_3008 :{PEARLAQUA}ABC STR_3009 :{PALESILVER}ABC STR_3010 :Dosya yüklenemiyor… STR_3011 :Dosya geçersiz veri içeriyor -STR_3045 :Bu aletde çalınacak müzik tarzını seçiniz +STR_3045 :Bu alette çalınacak müzik tarzını seçiniz STR_3047 :Yerel makam tarafından bu aletin değiştirilmesi yasaklandı STR_3048 :Yerel makam tarafından pazarlama kampanyaları yasaklandı STR_3049 :Golf deliği A @@ -2104,7 +2103,7 @@ STR_3058 :Tuğla duvarları STR_3059 :Doğasal çitler STR_3060 :Buz blokları STR_3061 :Ahşap duvarlar -STR_3062 :Standard ray +STR_3062 :Standart ray STR_3063 :Sulu ray STR_3064 :Acemi parkları STR_3065 :Deneyimli parkları @@ -2113,13 +2112,13 @@ STR_3067 :“Gerçek” parklar STR_3068 :Diğer parklar STR_3069 :Üst bölüm STR_3070 :Eğimli ray -STR_3071 :{WINDOW_COLOUR_2}Tüm parkda aynı fiyat +STR_3071 :{WINDOW_COLOUR_2}Tüm parkta aynı fiyat STR_3072 :Bu fiyatı tüm park için uygulayınız -STR_3073 :{RED}UYARI: Park değerlendirmesi 700’ün altına düşdü !{NEWLINE}4 hafta içinde park değerlendirmesini yükseltmeyi başaramazsanız parkınız kapatılacakdır +STR_3073 :{RED}UYARI: Park değerlendirmesi 700’ün altına düştü!{NEWLINE}4 hafta içinde park değerlendirmesini yükseltmeyi başaramazsanız parkınız kapatılacaktır STR_3074 :{RED}UYARI: Park değerlendirmesi halen 700’ün altında !{NEWLINE}Yükseltmek için 3 hafta süreniz kaldı -STR_3075 :{RED}UYARI: Park değerlendirmesi halen 700’ün altında !{NEWLINE}2 hafta içinde park değerlendirmesini yükseltmeyi başaramazsanız parkınız kapatılacakdır +STR_3075 :{RED}UYARI: Park değerlendirmesi halen 700’ün altında !{NEWLINE}2 hafta içinde park değerlendirmesini yükseltmeyi başaramazsanız parkınız kapatılacaktır STR_3076 :{RED}SON UYARI: Park değerlendirmesi halen 700’ün altında !{NEWLINE}Parkın kapanmasına sadece 7 gün süreniz kaldı -STR_3077 :{RED}KAPANMA BILGISI: Parkınız kapatıldı ! +STR_3077 :{RED}KAPANMA BILGISI: Parkınız kapatıldı! STR_3090 :Giriş kulübesinin hangi tarzda olacağını seçiniz STR_3091 :Bu bölümü değiştirmeye izin verilmiyor! STR_3092 :Bu aletin istasyonunu değiştiremezsiniz! @@ -2129,13 +2128,13 @@ STR_3095 :{WINDOW_COLOUR_2}Tırmanma zinciri hızı: STR_3096 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{VELOCITY} STR_3097 :Aletin tırmanma zincirinde hangi hız ile zirveye taşınacağını belirleyiniz STR_3099 :Renk seçiniz -STR_3100 :Ikinci rengi seçiniz +STR_3100 :İkinci rengi seçiniz STR_3101 :Üçüncü rengi seçiniz -STR_3102 :Dekorsayon rengini değiştiriniz +STR_3102 :Dekorasyon rengini değiştiriniz STR_3103 :Renk değiştirilemiyor… STR_3104 :Tüm aletler -STR_3105 :Tüm dükkanlar ve standlar -STR_3106 :Tüm danışma standları ve diğer tesisler +STR_3105 :Tüm dükkanlar ve stantlar +STR_3106 :Tüm danışma stantları ve diğer tesisler STR_3107 :Kapalı STR_3108 :Test STR_3109 :Açık @@ -2160,7 +2159,7 @@ STR_3127 :{WINDOW_COLOUR_2}Bulantı oranı: {BLACK}+%{COMMA16} STR_3128 :Tasarımı kaydediniz STR_3129 :Tasarımı dekorasyon ile kaydediniz STR_3130 :Kaydet -STR_3131 :Iptal +STR_3131 :İptal STR_3132 :{BLACK}Tasarım ile kaydetmek istediğiniz cisimleri seçiniz STR_3133 :Bu yokuş aşağı ray üzerine inşa edilemez STR_3134 :{RED}(Tasarım senaryoda (henüz) bulunmayan dekorasyon içeriyor) @@ -2169,26 +2168,26 @@ STR_3136 :Uyarı: Bu tasarım alternatif bir araç tipi ile inşa edilecek ve STR_3137 :Yakındaki cisimleri seçiniz STR_3138 :Seçiminizi sıfırlayınız STR_3139 :Asansörlü tırmanma zinciri bu çalışma modunda kullanılamıyor -STR_3140 :Asansörlü tırmanma zinciri istansyondan hemen sonra bulunması lazım +STR_3140 :Asansörlü tırmanma zinciri istasyondan hemen sonra bulunması lazım STR_3141 :Asansörlü tırmanma zinciri ile tur modu uygulanamıyor STR_3142 :{WINDOW_COLOUR_2}Kapasite: {BLACK}{STRINGID} STR_3143 :Müşterileri göster STR_3144 :Aletleri ve dükkanları göster STR_3160 :Aletin kaç tur yapacağını seçiniz STR_3162 :Yeterli bellek ayrılamıyor -STR_3163 :Yeni dosya kuruluyor: +STR_3163 :Yeni dosya kuruluyor: STR_3164 :{BLACK}{COMMA16} tane seçildi (en fazla {COMMA16}) STR_3167 :{WINDOW_COLOUR_2}Cisim miktarı: {BLACK}{COMMA16} cisim içeriyor -STR_3169 :Bu cisim için dosya bulunamadı: +STR_3169 :Bu cisim için dosya bulunamadı: STR_3170 :Grafikler için yeterli alan yok -STR_3171 :Bu cisim türünden yeterince seçdiniz -STR_3172 :Ilk önce bunlar seçilmeli: {STRING} -STR_3173 :Şu an kullanılmakda +STR_3171 :Bu cisim türünden yeterince seçtiniz +STR_3172 :İlk önce bunlar seçilmeli: {STRING} +STR_3173 :Şu an kullanılmakta STR_3174 :Başka bir alet/dükkan/cisim için gerekli -STR_3175 :Bu standard olarak gerekli +STR_3175 :Bu standart olarak gerekli STR_3176 :Bu seçilemiyor STR_3177 :Bu kaldırılamıyor -STR_3179 :En az bir alet veya dükkan/stand seçilmeli +STR_3179 :En az bir alet veya dükkan/stant seçilmeli STR_3180 :Olumsuz seçenekler STR_3181 :Şu an seçilen - {STRINGID} STR_3182 :Park girişi tarzı seçilmeli @@ -2197,7 +2196,7 @@ STR_3184 :Aletler STR_3185 :Küçük dekorasyonlar STR_3186 :Büyük dekorasyonlar STR_3187 :Duvarlar/Çitler -STR_3188 :Bannerler +STR_3188 :Afişler STR_3189 :Yollar STR_3190 :Yol eklentileri STR_3191 :Dekorasyon temaları @@ -2205,7 +2204,7 @@ STR_3192 :Park girişi tarzı STR_3193 :Su tarzı STR_3195 :Araştırma listesi STR_3196 :{WINDOW_COLOUR_2}Tür: {BLACK}{STRINGID} -STR_3197 :{WINDOW_COLOUR_2}Başdan araştırılmış ve mevcut olanlar: +STR_3197 :{WINDOW_COLOUR_2}Baştan araştırılmış ve mevcut olanlar: STR_3198 :{WINDOW_COLOUR_2}Sonradan araştırılması gerekenler: STR_3199 :Rastgele karıştır STR_3200 :Tüm listeyi rastgele karıştırınız @@ -2216,7 +2215,7 @@ STR_3204 :Park ayarları STR_3205 :Hedef ayarları STR_3206 :Senaryoyu kaydet STR_3207 :Alet Tasarımcısı -STR_3208 :Alet Meneceri +STR_3208 :Alet Tasarım Yöneticisi STR_3209 :Bir önceki adım: STR_3210 :Bir sonraki adım: STR_3211 :Harita büyüklüğü: @@ -2226,7 +2225,7 @@ STR_3214 :Arazi daha fazla yükseltilemiyor STR_3215 :Arazi sınırına çok fazla yakın STR_3216 :Park sınırı seçenekleri STR_3217 :Parka ait alan -STR_3218 :Inşa izni +STR_3218 :inşa izni STR_3219 :Satılık alan STR_3220 :Satılık inşa izni STR_3221 :Parka ait olan alanı seçiniz @@ -2235,7 +2234,7 @@ STR_3223 :Parkın satın alabileceği alanı seçiniz STR_3224 :Parkın satın alabileceği inşa izni alanını seçiniz STR_3225 :Seçilen konumun etrafına rastgele bir nesne kümesi oluşturmayı aç/kapat STR_3226 :Park girişini inşa ediniz -STR_3227 :Çok fazla park girişi bulunmakda! +STR_3227 :Çok fazla park girişi bulunmakta! STR_3228 :Müşterilerin parka geleceği pozisyonu seçiniz STR_3229 :Blok frenler istasyondan hemen sonra inşa edilemez STR_3230 :Blok frenler peş peşe inşa edilemez @@ -2286,18 +2285,18 @@ STR_3274 :Senaryoyu zorlaştırmak için bu ayarı seçiniz STR_3275 :Müşteri kazanmayı zorlaştır STR_3276 :Senaryoyu zorlaştırmak için bu ayarı seçiniz STR_3277 :{WINDOW_COLOUR_2}Alan satın alma fiyatı: -STR_3278 :{WINDOW_COLOUR_2}Inşa izni satın alma fiyatı: +STR_3278 :{WINDOW_COLOUR_2}İnşa izni satın alma fiyatı: STR_3279 :Ücretsiz park girişi / Ücretli aletler STR_3280 :Ücretli park girişi / Ücretsiz aletler -STR_3281 :{WINDOW_COLOUR_2}Giriş fiyati: +STR_3281 :{WINDOW_COLOUR_2}Giriş fiyatı: STR_3282 :Park hedefi ve ismi seçiniz STR_3283 :Korunmasını istediğiniz aletleri seçiniz{NEWLINE}(bu aletler silinemiyor veya değiştirilemiyor) STR_3284 :Hedef seçimi STR_3285 :Koruma altında olan aletler STR_3286 :Bu senaryo için hedef seçiniz STR_3287 :{WINDOW_COLOUR_2}Hedef(ler): -STR_3288 :Iklimi seçiniz -STR_3289 :{WINDOW_COLOUR_2}Iklim: +STR_3288 :İklimi seçiniz +STR_3289 :{WINDOW_COLOUR_2}İklim: STR_3290 :Serin ve ıslak STR_3291 :Sıcak STR_3292 :Sıcak ve kuru @@ -2338,55 +2337,55 @@ STR_3329 :Park girişi henüz inşa edilmedi STR_3330 :Parka ait alan gerekli STR_3331 :Arazi sınırından park girişine giden yol ya tamamlanmadı yada çok karışık - Yollar mümkün olduğu kadar tek şeritli ve az geçitli olmalı STR_3332 :Park girişi ya ters inşa edildi veya park girişinden arazi sınırına giden yol inşa edilmeli -STR_3333 :Eklenti aletler/cisimler birlikde kaydedilsin -STR_3334 :Sonradan eklenmiş aletlerin/cisimlerin oyun ile kaydedilmesini veya edilmemesini şeçiniz. Bir kişiye eklenti bulunan park/alet dosyasını yollamak isterseniz, ve o kişide kullanılan eklentiler yok ise, bu ayarı kapatıp oyunu tekrar kayediniz +STR_3333 :Eklenti aletler/cisimler birlikte kaydedilsin +STR_3334 :Sonradan eklenmiş aletlerin/cisimlerin oyun ile kaydedilmesini veya edilmemesini seçiniz. Bir kişiye eklenti bulunan park/alet dosyasını yollamak isterseniz ve o kişide kullanılan eklentiler yok ise, bu ayarı kapatıp oyunu tekrar kaydediniz STR_3335 :Alet Tasarımcısı - Alet seçiniz -STR_3336 :Alet Meneceri - Alet seçiniz -STR_3338 :{BLACK}Standard tasarım -STR_3339 :{BLACK}{COMMA16} standard tasarım veya kendi tasarımınız -STR_3340 :{BLACK}{COMMA16} standard tasarım veya kendi tasarımınız +STR_3336 :Alet Tasarım Yöneticisi - Alet seçiniz +STR_3338 :{BLACK}Standart tasarım +STR_3339 :{BLACK}{COMMA16} standart tasarım veya kendi tasarımınız +STR_3340 :{BLACK}{COMMA16} standart tasarım veya kendi tasarımınız STR_3341 :Oyun Araçları STR_3342 :Senaryo editörü STR_3343 :Kaydedilen Oyunu Senaryoya Dönüştür STR_3344 :Alet Tasarımcısı -STR_3345 :Alet Meneceri +STR_3345 :Alet Tasarım Yöneticisi STR_3346 :Alet tasarımı kaydedilemiyor… -STR_3347 :Alet çok büyük, çok fazla cisimli veya dekorasyon çok fazla dışda +STR_3347 :Alet çok büyük, çok fazla cisimli veya dekorasyon çok fazla dışta STR_3348 :Yeni isim STR_3349 :Sil STR_3350 :Tasarım ismi STR_3351 :Bu alet tasarımı için yeni isim giriniz: -STR_3352 :Isim değiştirilemiyor… +STR_3352 :İsim değiştirilemiyor… STR_3353 :Yeni isim olumsuz harfler/semboller içeriyor -STR_3354 :Bu isim ile dosya bulunmakda veya dosya ‘Salt okunur’ modunda +STR_3354 :Bu isim ile dosya bulunmakta veya dosya ‘Salt okunur’ modunda STR_3355 :Dosya ya ‘Salt okunur’ modunda veya kilitli STR_3356 :Dosyayı sil -STR_3357 :{WINDOW_COLOUR_2}Bunu silmek istediğinizden eminmisiniz {STRING} ? +STR_3357 :{WINDOW_COLOUR_2}Bunu silmek istediğinizden emin misiniz {STRING} ? STR_3358 :Tasarım silinemiyor… STR_3359 :{BLACK}Bu alet türünden tasarım yok STR_3360 :Uyarı! -STR_3361 :Bu alet türünden çok fazla tasarım bulunmakta - Bazıları listede görüntülenmiyecektir +STR_3361 :Bu alet türünden çok fazla tasarım bulunmakta - Bazıları listede görüntülenmeyecektir STR_3364 :Gelişmiş STR_3365 :Tema gruplarına ek olarak ayrı tema öğelerinin seçilmesine izin verir STR_3366 :{BLACK}= Alet STR_3367 :{BLACK}= Yemek standı -STR_3368 :{BLACK}= Içecek standı +STR_3368 :{BLACK}= İçecek standı STR_3369 :{BLACK}= Hatıra standı STR_3370 :{BLACK}= Danışma -STR_3371 :{BLACK}= Ilk yardım +STR_3371 :{BLACK}= İlk yardım STR_3372 :{BLACK}= ATM STR_3373 :{BLACK}= Tuvalet -STR_3374 :Uyarı: Çok fazla seçdiniz! +STR_3374 :Uyarı: Çok fazla seçtiniz! STR_3375 :Bu tema grubundaki tüm cisimler seçilemedi STR_3376 :Yeni kur STR_3377 :Yeni alet tasarımı kurunuz STR_3378 :Kur -STR_3379 :Iptal +STR_3379 :İptal STR_3380 :Yeni alet tasarımı kurulamadı… STR_3381 :Dosya uyumlu değil veya geçersiz veri içeriyor STR_3382 :Dosya kopyalama başarısız STR_3383 :Alet tasarımı için yeni isim seçiniz -STR_3384 :Bu isim kullanılmakda - Yeni isim seçiniz: +STR_3384 :Bu isim kullanılmakta - Yeni isim seçiniz: STR_3389 :Daha fazla cisim seçilemiyor STR_3390 :Çok fazla cisim seçildi STR_3437 :Büyük ölçüde tema veya cisim siliniz @@ -2398,11 +2397,11 @@ STR_3446 :Tüm bölgeyi sıfırlayınız # New strings, cleaner STR_5120 :Finansal bakış STR_5121 :Araştırma -STR_5122 :Select rides by track type (like in RCT1) +STR_5122 :Pist türüne göre sürüşleri seçin (RCT1'deki gibi) STR_5123 :Aletleri yenile STR_5125 :Silinebilir aletler STR_5126 :Rastgele müzik -STR_5127 :Zeminin üstünden geçdiğiniz takdirde zemin yükseltilmeden taban değiştirilebiliyor +STR_5127 :Zeminin üstünden geçtiğiniz takdirde zemin yükseltilmeden taban değiştirilebiliyor STR_5128 :Boyut STR_5129 :{COMMA16} ile {COMMA16} arası bir boyut seçiniz STR_5130 :Harita büyüklüğü @@ -2421,7 +2420,7 @@ STR_5142 :Normal hız STR_5143 :Hızlı STR_5144 :Çok hızlı STR_5145 :Turbo hızı -STR_5146 :Devasal hız +STR_5146 :Devasa hız STR_5147 :Hileler STR_5148 :Oyunu hızlandırınız STR_5149 :Hile seçenekleri @@ -2429,7 +2428,7 @@ STR_5150 :Debugging araçlarını etkinleştir STR_5151 :, STR_5152 :. STR_5153 :Temayı değiştir… -STR_5154 :Hardware display +STR_5154 :Donanım ekranı STR_5155 :Tamamen inşa edilmemiş aletleri test etmeyi aç/kapat STR_5156 :Tamamen inşa edilmemiş aletlerin test edilmesine bu ayar ile izin veriliyor (bloklu tur modlarına geçerli değildir) STR_5158 :Ana ekrana çık @@ -2440,19 +2439,19 @@ STR_5162 :Gün/Ay/Yıl STR_5163 :Ay/Gün/Yıl STR_5177 :Ekran modu: STR_5178 :Finansal hileleri göster -STR_5179 :Müşteri hilelerni göster +STR_5179 :Müşteri hilelerini göster STR_5180 :Park hilelerini göster STR_5181 :Alet hilelerini göster STR_5182 :{INT32} -STR_5183 :Base height -STR_5184 :Enter base height between {COMMA16} and {COMMA16} -STR_5185 :Water level -STR_5186 :Enter water level between {COMMA16} and {COMMA16} +STR_5183 :Taban yüksekliği +STR_5184 :{COMMA16} ile {COMMA16} arasında taban yüksekliğini girin +STR_5185 :Su seviyesi +STR_5186 :{COMMA16} ile {COMMA16} arasındaki su seviyesini girin STR_5187 :Finansal bakış STR_5188 :Yeni Pazarlama Kampanyası STR_5189 :Araştırma STR_5190 :Harita -STR_5191 :Extra Görüntü Alanı +STR_5191 :Ekstra Görüntü Alanı STR_5192 :Son Bildirimler STR_5193 :Zemin/Arazi STR_5194 :Su @@ -2460,7 +2459,7 @@ STR_5195 :Cisim silme STR_5196 :Arazi satın alma STR_5197 :Dekorasyon STR_5198 :Yol -STR_5199 :Alet Inşaası +STR_5199 :Alet İnşası STR_5200 :Alet Yerleştirme STR_5201 :Alet Listesi STR_5202 :Tasarım Listesi @@ -2468,16 +2467,16 @@ STR_5203 :Alet STR_5204 :Aletler Listesi STR_5205 :Müşteri STR_5206 :Müşteri Listesi -STR_5207 :Işci -STR_5208 :Işciler Listesi +STR_5207 :İşçi +STR_5208 :İşçiler Listesi STR_5209 :Banner STR_5210 :Alet/Dükkan/Cisim Seçimi STR_5211 :Araştırma Listesi STR_5212 :Senaryo Editörü Ayarları STR_5213 :Senaryo Hedefleri Ayarları STR_5214 :Harita Üretimi -STR_5215 :Alet Meneceri -STR_5216 :Alet Meneceri Listesi +STR_5215 :Alet Tasarım Yöneticisi +STR_5216 :Alet Tasarım Yöneticisi Listesi STR_5217 :Hile STR_5218 :Tema STR_5219 :Seçenekler @@ -2486,9 +2485,9 @@ STR_5221 :Tuş Değiştirme STR_5222 :Yükleme/Kayıtlama STR_5223 :Kaydetme STR_5224 :Alet/Dükkan silme -STR_5225 :Işci Kovma +STR_5225 :İşçi Kovma STR_5226 :Hızlı alet silme -STR_5227 :Kayıdlı Oyunu Değiştirme +STR_5227 :Kayıtlı Oyunu Değiştirme STR_5228 :Ana kullanıcı arayüzü STR_5229 :Park STR_5230 :Araçlar @@ -2503,7 +2502,7 @@ STR_5238 :Şu an kullanılan tema: STR_5239 :Kopyala STR_5240 :Temaya isim giriniz STR_5241 :Bu tema değiştirilemiyor -STR_5242 :Bu tema ismi kullanılmakda +STR_5242 :Bu tema ismi kullanılmakta STR_5243 :Olumsuz harfler/semboller içeriyor STR_5244 :Temalar STR_5245 :Üst araç çubuğu @@ -2512,7 +2511,7 @@ STR_5247 :Alet Tasarımcısı üst araç çubuğu STR_5248 :Senaryo Editörü üst araç çubuğu STR_5249 :Ana ekran seçenekleri STR_5250 :Ana ekran oyundan çıkış -STR_5251 :Ana ekran seçenekler buttonu +STR_5251 :Ana ekran seçenekler butonu STR_5252 :Senaryo listesi STR_5253 :Park bilgisi STR_5256 :Değiştirmek için kopyalayınız @@ -2533,8 +2532,8 @@ STR_5270 :Diğer STR_5272 :Küçük dekorasyonlar STR_5273 :Büyük dekorasyonlar STR_5274 :Yollar -STR_5275 :Search for Objects -STR_5276 :Enter the name of an object to search for +STR_5275 :Objeleri Arayın +STR_5276 :Aranacak objenin adını girin STR_5277 :Sıfırla STR_5278 :Sandbox modu STR_5279 :Sandbox modunu kapat @@ -2547,7 +2546,7 @@ STR_5287 :Alet zaten arızalı STR_5288 :Alet kapalı STR_5289 :Bu alet için arıza yok STR_5290 :Aleti tamir et -STR_5291 :Alet zorla bozualmıyor +STR_5291 :Alet zorla bozulamıyor STR_5292 :Aleti zorla bozunuz STR_5293 :Aleti kapatınız STR_5294 :Aleti test ediniz @@ -2556,7 +2555,7 @@ STR_5296 :Parkı kapatınız STR_5297 :Parkı açınız STR_5298 :{RED}{STRINGID} STR_5299 :{LIGHTPINK}{STRINGID} -STR_5300 :Hızlı işci kovma +STR_5300 :Hızlı işçi kovma STR_5301 :Krediyi sıfırla STR_5302 :Krediyi sıfırla STR_5303 :Oyun durdurulurken inşa et @@ -2577,7 +2576,7 @@ STR_5337 :Park girişi STR_5338 :Madde türü STR_5339 :Taban yüksekliği STR_5340 :Açıklık yüksekliği -STR_5343 :Otomatik işci yerleştirme +STR_5343 :Otomatik işçi yerleştirme STR_5344 :Değişiklik günlüğü STR_5345 :Finansal hileler STR_5346 :Müşteri hileleri @@ -2594,12 +2593,12 @@ STR_5356 :{BLACK}Bulantı: STR_5357 :{BLACK}Bulantı oranı: STR_5358 :{BLACK}Tuvalet: STR_5359 :Tüm müşterileri sil -STR_5360 :Parkdaki tüm müşterileri siliniz +STR_5360 :Parktaki tüm müşterileri siliniz STR_5361 :Tüm müşterilere ver: STR_5362 :{BLACK}Müşterilerin kabul edeceği şiddet oranı: STR_5363 :1’den fazla STR_5364 :15’den az -STR_5365 :{BLACK}Işci hızı: +STR_5365 :{BLACK}İşçi hızı: STR_5366 :Normal STR_5367 :Hızlı STR_5368 :Arıza raporunu sil @@ -2609,7 +2608,7 @@ STR_5373 :Dosya ismi {STRINGID} STR_5374 :Tarih {STRINGID} STR_5375 :▲ STR_5376 :▼ -STR_5404 :Bu isim kullanılmakda +STR_5404 :Bu isim kullanılmakta STR_5440 :Oyun ön planda değilse oyunu simge durumuna getir STR_5442 :Park değerlendirmesini: STR_5447 :Alet {STRINGID} @@ -2630,16 +2629,16 @@ STR_5461 :Tüm müşterilerin durumunu değiştir STR_5462 :{CURRENCY} STR_5463 :Hedefi sil STR_5464 :Genel -STR_5465 :Iklim -STR_5466 :Işci -STR_5467 :ALT + +STR_5465 :İklim +STR_5466 :İşçi +STR_5467 :ALT + STR_5468 :Son bildirimler STR_5469 :Ekranı yukarı kaydır STR_5470 :Ekranı sola kaydır STR_5471 :Ekranı aşağı kaydır STR_5472 :Ekranı sağa kaydır STR_5473 :Gece/Gündüz çevrimi -STR_5474 :Alet bannerlerini büyük harfler ile yaz +STR_5474 :Alet afişlerini büyük harfler ile yaz STR_5475 :{COMMA16} hafta STR_5476 :Donanım STR_5477 :Görüntü ayarları @@ -2668,7 +2667,7 @@ STR_5501 :Server başlat STR_5502 :Multiplayer STR_5503 :Host ismini veya IP-Adresini giriniz: STR_5504 :Multiplayer durumunu göster -STR_5505 :Server’e bağlanamadı. +STR_5505 :Sunucuya bağlanamadı. STR_5506 :Müşteriler şiddet oranını aldırmasın STR_5510 :Varasayılan aygıt STR_5511 :(BILINMIYOR) @@ -2720,7 +2719,7 @@ STR_5556 :Oyuncuyu atınız STR_5557 :Desync olduğu takdirde bağlantıda kalınız (Multiplayer) STR_5558 :Bu ayarın onaylanması için oyun yeniden başlatılmalı STR_5559 :10 dk’ya bir kontrol -STR_5560 :Tüm aletlerin kontrol sıklılığını 10 dakikaya bire ayarlayınız +STR_5560 :Tüm aletlerin kontrol sıklığını 10 dakikaya bire ayarlayınız STR_5561 :Dil yüklenemedi STR_5562 :DIKKAT! STR_5563 :Bu seçenek henüz deneyim sürecinde. Dikkat ile kullanmanız tavsiye edilir. @@ -2739,13 +2738,13 @@ STR_5577 :Güney Kore Wonu (W) STR_5578 :Rus Rublesi (₽) STR_5579 :Pencere ölçeği: STR_5580 :Çek Korunası (Kč) -STR_5581 :FPS’yi göster -STR_5582 :Mouse’ı pencere modunda kilitle +STR_5581 :FPS’i göster +STR_5582 :Mouse’u pencere modunda kilitle STR_5583 :{COMMA1DP16}m/s STR_5584 :SI -STR_5585 :Bu hile ile kısıtlı rotasyon sayısı, tırmanma zincirlerinin ve hızlandırıcıların hız kısıtması vs. gibi sınırlandırlmalar kaldırılıyor -STR_5586 :Otomatik dükkan/stand açma -STR_5587 :Dükkanlar/Standlar inşa edildiğinde otomatikman açılakakdır +STR_5585 :Bu hile ile kısıtlı rotasyon sayısı, tırmanma zincirlerinin ve hızlandırıcıların hız kısıtlaması vs. gibi sınırlandırmalar kaldırılıyor +STR_5586 :Otomatik dükkan/stant açma +STR_5587 :Dükkanlar/Stantlar inşa edildiğinde otomatikman açılacaktır STR_5588 :Multiplayer STR_5589 :Bildirme seçenekleri STR_5590 :Park ödülleri @@ -2759,23 +2758,23 @@ STR_5597 :Alet/dekorasyon araştırması STR_5598 :Müşteri uyarıları STR_5600 :Müşteri parkı terk etti STR_5601 :Müşteri bir alet için sırada -STR_5602 :Müşteri bir aletde -STR_5603 :Müşteri aletden indi -STR_5604 :Müşteri birşey satın aldı +STR_5602 :Müşteri bir alette +STR_5603 :Müşteri aletten indi +STR_5604 :Müşteri bir şey satın aldı STR_5605 :Müşteri tuvaleti kullandı STR_5606 :Müşteri öldü -STR_5607 :Seçdiğiniz maddeyi zorla siliniz +STR_5607 :Seçtiğiniz maddeyi zorla siliniz STR_5608 :TY STR_5609 :AY -STR_5610 :Seçdiğiniz maddeyi zorla siliniz. Dikkat ile kullanınız +STR_5610 :Seçtiğiniz maddeyi zorla siliniz. Dikkat ile kullanınız STR_5611 :G STR_5612 :Ghost flag STR_5613 :A STR_5614 :Arızalı flag STR_5615 :S STR_5616 :En son kurulan madde flag’i -STR_5617 :Seçdiğiniz maddeyi yukarı aktarınız. -STR_5618 :Seçdiğiniz maddeyi aşağı aktarınız. +STR_5617 :Seçtiğiniz maddeyi yukarı aktarınız. +STR_5618 :Seçtiğiniz maddeyi aşağı aktarınız. STR_5619 :RollerCoaster Tycoon STR_5620 :Added Attractions STR_5621 :Loopy Landscapes @@ -2784,18 +2783,18 @@ STR_5623 :Wacky Worlds STR_5624 :Time Twister STR_5625 :Gerçek parklar STR_5626 :Diğer parklar -STR_5627 :Senrayo listesi sıralandırması: -STR_5628 :Standard +STR_5627 :Senaryo listesi sıralaması: +STR_5628 :Standart STR_5629 :Zorluk seviyesi STR_5630 :Aşamalı ilerleme STR_5631 :Orijinal DLC Parkları STR_5632 :Kendiniz inşa ediniz… -STR_5633 :CMD + -STR_5634 :OPTION + +STR_5633 :CMD + +STR_5634 :OPTION + STR_5635 :{WINDOW_COLOUR_2}Harcadığı para: {BLACK}{CURRENCY2DP} STR_5636 :{WINDOW_COLOUR_2}Yaptığı değişiklikler: {BLACK}{COMMA16} STR_5637 :Bu yapılamıyor… -STR_5638 :Izniniz yok +STR_5638 :İzniniz yok STR_5639 :Oyuncu listesi STR_5640 :Oyuncu gruplarını yönetiniz STR_5641 :Varsayılan grup: @@ -2804,8 +2803,8 @@ STR_5643 :Grup ekle STR_5644 :Grubu sil STR_5645 :Sohbet STR_5646 :Arazi değiştirme -STR_5647 :Oyunu durduma -STR_5648 :Su değiştrime +STR_5647 :Oyunu durdurma +STR_5648 :Su değiştirme STR_5649 :Alet tasarımı STR_5650 :Alet silme STR_5651 :Alet inşası @@ -2813,7 +2812,7 @@ STR_5652 :Alet ayarları STR_5653 :Dekorasyon STR_5654 :Yol STR_5655 :Müşteri -STR_5656 :Işci +STR_5656 :İşçi STR_5657 :Park ayarları STR_5658 :Finansal park ayarları STR_5659 :Oyuncu atmak @@ -2825,12 +2824,12 @@ STR_5664 :Hile STR_5665 :Dekorasyon kümesini aç/kapat STR_5666 :Şifresiz giriş STR_5701 :{WINDOW_COLOUR_2}Son yaptığı: {BLACK}{STRINGID} -STR_5702 :Oyuncunun uyguladığı en çok değişiklikere atlayınız +STR_5702 :Oyuncunun uyguladığı en çok değişikliklere atlayınız STR_5703 :Host atılamaz STR_5704 :Son yaptığı STR_5705 :Bu grup görüntülenemez -STR_5706 :Bu grupda oyuncu olduğu sürece silinemez -STR_5707 :Bu grup değiştirlemez +STR_5706 :Bu grupta oyuncu olduğu sürece silinemez +STR_5707 :Bu grup değiştirilemez STR_5708 :Hostun bağlı olduğu grup değiştirilemez STR_5709 :Yeni isim STR_5710 :Grup ismi @@ -2855,8 +2854,8 @@ STR_5726 :Şu anki hava durumunu değiştiriniz STR_5734 :Rendering STR_5735 :Ağ durumu STR_5736 :Oyuncu -STR_5737 :Kapalı, {COMMA16} kişi halen aletde -STR_5738 :Kapalı, {COMMA16} kişi halen aletde +STR_5737 :Kapalı, {COMMA16} kişi halen alette +STR_5738 :Kapalı, {COMMA16} kişi halen alette STR_5739 :{WINDOW_COLOUR_2}Şu anki müşteri sayısı: {BLACK}{COMMA16} STR_5740 :Hiç bitmeyen pazarlama kampanyaları STR_5741 :Pazarlama kampanyaları hiç bir zaman bitmiyor @@ -2867,17 +2866,17 @@ STR_5745 :Ağ desync tespit edildi STR_5746 :Bağlantı kesildi STR_5747 :Bağlantı kesildi: {STRING} STR_5748 :Atıldınız -STR_5749 :Birdaha gelme! +STR_5749 :Bir daha gelme! STR_5750 :Bağlantı kapandı STR_5751 :Dosya yok -STR_5752 :{OUTLINE}{RED}{STRING} serverden çıktı -STR_5753 :{OUTLINE}{RED}{STRING} serverden çıktı ({STRING}) +STR_5752 :{OUTLINE}{RED}{STRING} sunucudan çıktı +STR_5753 :{OUTLINE}{RED}{STRING} sunucuda çıktı ({STRING}) STR_5754 :Geçersiz isim -STR_5755 :Yanlış yazılım sürümü (Serverda bu kullanılmakda: {STRING}) +STR_5755 :Yanlış yazılım sürümü (Sunucuda bu kullanılmakta: {STRING}) STR_5756 :Şifre yanlış STR_5757 :Server dolu -STR_5758 :{OUTLINE}{GREEN}{STRING} servere katıldı -STR_5759 :Harita indiriliyor … ({INT32} / {INT32}) KiB +STR_5758 :{OUTLINE}{GREEN}{STRING} sunucuya katıldı +STR_5759 :Harita indiriliyor … STR_5760 :Hong Kong Doları (HK$) STR_5761 :Yeni Taiwan Doları (NT$) STR_5762 :Çin Yuanı (CN¥) @@ -2888,129 +2887,129 @@ STR_5767 :Gelir STR_5768 :Toplam müşteri STR_5769 :Toplam kâr STR_5770 :Saat başı müşteri -STR_5771 :Işletme maliyeti -STR_5772 :Inşa yılı +STR_5771 :İşletme maliyeti +STR_5772 :İnşa yılı STR_5773 :{COMMA32} STR_5774 :{CURRENCY2DP} -STR_5775 :saatde {COMMA32} +STR_5775 :Müşteriler: Saatte {COMMA32} STR_5776 :Bu yıl STR_5777 :Geçen yıl STR_5778 :{COMMA16} yıl önce -STR_5779 :saatde {CURRENCY2DP} -STR_5780 :saatde {CURRENCY2DP} +STR_5779 :Gelir: Saatte {CURRENCY2DP} +STR_5780 :İşletme maliyeti: Saatte {CURRENCY2DP} STR_5781 :Bilinmiyor -STR_5782 :Servere bağlandınız. Sohbet için ‘{STRING}’ tuşuna basınız +STR_5782 :Sunucuya bağlandınız. Sohbet için ‘{STRING}’ tuşuna basınız STR_5783 :{WINDOW_COLOUR_2}Senaryo kilitli -STR_5784 :{BLACK}Ilk önce diğer senaryoları kazanınız. +STR_5784 :{BLACK}İlk önce diğer senaryoları kazanınız. STR_5785 :Grup ismi değiştirilemiyor… STR_5786 :Grup ismi geçersiz STR_5787 :{COMMA32} oyuncu çevrimiçi STR_5788 :Varsayılan denetim aralığı: STR_5789 :Şimşek çakmasını devre dışı bırak -STR_5790 :RCT1’deki gibi müşteriler hem park girşi hemde alet ücreti ödesin +STR_5790 :RCT1’deki gibi müşteriler hem park girişi hem de alet ücreti ödesin STR_5791 :Tüm aletlerin güvenirliğini %100’e getiriniz{NEWLINE} ve inşa yılını sıfırlayınız STR_5792 :Tüm arızalı aletleri tamir ediniz -STR_5793 :Tüm aletlerin arıza raporunu sıfırlayınızki{NEWLINE}müşteriler altlerin güvensiz olmasından şikayetci olmasın +STR_5793 :Tüm aletlerin arıza raporunu sıfırlayınız ki{NEWLINE}müşteriler aletlerin güvensiz olmasından şikâyetçi olmasın STR_5794 :Bazı senaryolarda korunmuş durumunda olan aletlerin silinmesine veya değiştirilmesine bu hile ile izin veriliyor -STR_5795 :Şiddet oranı devasal olasada bu hile ile{NEWLINE}müşteriler yinede alete binecekdir +STR_5795 :Şiddet oranı devasa olasa da bu hile ile{NEWLINE}müşteriler yine de alete binecektir STR_5796 :Park kapatılamıyorsa zorla kapatınız -STR_5797 :Hava değişimini durdurunuz ve seçdiğiniz havayı sürekli olarak bırakınız +STR_5797 :Hava değişimini durdurunuz ve seçtiğiniz havayı sürekli olarak bırakınız STR_5798 :Oyun durdurulduğunda her türlü inşaya izin veriliyor STR_5799 :Alet arızalarını ve fren arızalarından kaynaklanan kazaları sıra dışı bırakınız STR_5800 :Aletlerin bozulmasını engelleyiniz STR_5801 :Çevre kirliliğini sıra dışı bırak STR_5802 :Müşterilerin yere çöp atmasını veya kusmasını sıra dışı bırakınız -STR_5803 :Seçdiğiniz maddeyi çeviriniz +STR_5803 :Seçtiğiniz maddeyi çeviriniz STR_5804 :Ses kapatma -STR_5805 :Bu ayar ile serveriniz{NEWLINE}herkes için açık olacakdır +STR_5805 :Bu ayar ile sunucunuz{NEWLINE}herkes için açık olacaktır STR_5806 :Pencere moduna geç STR_5807 :{WINDOW_COLOUR_2}Alet sayısı: {BLACK}{COMMA16} -STR_5808 :{WINDOW_COLOUR_2}Dükkan/Stand sayısı: {BLACK}{COMMA16} +STR_5808 :{WINDOW_COLOUR_2}Dükkan/Stant sayısı: {BLACK}{COMMA16} STR_5809 :{WINDOW_COLOUR_2}Diğer tesis sayısı: {BLACK}{COMMA16} STR_5810 :Araç sınırlamasını sıra dışı bırak -STR_5811 :Bu hile ile alet başı{NEWLINE}255 vagon ve 31 tren kadar{NEWLINE}araç kullanablirsiniz +STR_5811 :Bu hile ile alet başı{NEWLINE}255 vagon ve 31 tren kadar{NEWLINE}araç kullanabilirsiniz STR_5812 :Multiplayer penceresi STR_5813 :“{STRING}” STR_5814 :{WINDOW_COLOUR_1}“{STRING}” #tooltips -STR_5815 :FPS’yi göster -STR_5816 :Oyunu ölçekleme oranı{NEWLINE}Yüksek cözünürlükde tavsiye edilir +STR_5815 :FPS’i göster +STR_5816 :Oyunu ölçekleme oranı{NEWLINE}Yüksek çözünürlükte tavsiye edilir STR_5819 :[Hardware Desteği gerektirir]{NEWLINE}Steam arayüzü kullanıldığında oyun durdurulsun STR_5820 :Tam ekran modunda oyun penceresi ön plandan giderse{NEWLINE}oyunu simge durumuna getir -STR_5822 :Gece ve gündüz değişimi uyuglansın -STR_5823 :Alet giriş kulübelerindeki bannerlerin metini RCT1’deki büyük harfler ile yaılsın +STR_5822 :Gece ve gündüz değişimi uygulansın +STR_5823 :Alet giriş kulübelerindeki afişlerin metini RCT1’deki gibi büyük harfler ile yazılsın STR_5824 :Hava durumu sağanak yağışlı ise{NEWLINE}şimşek çakmasını sıra dışı bırakınız -STR_5825 :Pencere modunda oyandığınız takdirde mouse pencere içinde kalacakdır -STR_5826 :Sağ mouse tuşun ile ekran kaydırma ters çevrilecekdir (mesela sağa çektiğinizde ekran sola kayacakdır) +STR_5825 :Pencere modunda oynadığınız takdirde mouse pencere içinde kalacaktır +STR_5826 :Sağ mouse tuşu ile ekran kaydırma ters çevrilecektir (mesela sağa çektiğinizde ekran sola kayacaktır) STR_5827 :Grafiksel kullanıcı arayüzü temasını değiştiriniz STR_5828 :Mesafe ve hız biriminin hangi sisteme göre uygulanacağını seçiniz STR_5829 :Kullanmak istediğiniz para birimini seçiniz STR_5830 :Kullanmak istediğiniz dili seçiniz STR_5831 :Kullanmak istediğiniz sıcaklık ölçüm birimini seçiniz -STR_5832 :Yükseklik birimin “Mesafe ve Hız” bölümünde seçdiğiniz gibi gerçek birim olarak veya “General Units” olarak ölçülmesini seçiniz. “General Units” birimi, yüksekliği blok olarak ölçmekde +STR_5832 :"Mesafe ve Hız" altında ayarlanan ölçüm biçimi yerine yüksekliği genel birimler olarak gösterme STR_5833 :Kullanmak istediğiniz tarih formatını seçiniz STR_5834 :Kullanmak istediğiniz ses aygıtını seçiniz STR_5835 :Oyun penceresi simge durumuna getirildiğinde oyununu sesini kıs STR_5836 :Ana ekran müziğini.{NEWLINE}RCT1 temasını seçmek için ‘Diğer Ayarlar’ penceresinden RCT1 klasörünü belirlemeniz gereklidir. -STR_5837 :Arayüzü temları değiştiriniz veya oluşturunuz +STR_5837 :Arayüzü temaları değiştiriniz veya oluşturunuz STR_5838 :Üst araç çubuğunda ‘Finansal Bakış’ simgesini göster/gizle STR_5839 :Üst araç çubuğunda ‘Araştırma’ simgesini göster/gizle STR_5840 :Üst araç çubuğunda ‘Hile’ simgesini göster/gizle STR_5841 :Üst araç çubuğunda ‘Son Bildirimler’ simgesini göster/gizle -STR_5842 :Senaryoları senaryo listesinde ya RCT2’deki gibi zorluk seviyesine göre yada RCT1’deki gibi klassik olarak sıralandır -STR_5843 :RCT1’deki gibi bir senaryoyu tamamladıkdan sonra kilitli bir senaryoyu açılsın -STR_5844 :Servere bağşantınız koptuğu halde{NEWLINE}serverden çıkılmasın -STR_5845 :Üst araç çubuğuna ‘Debugging Araçları’ simgesi eklensin/kaldırısın{NEWLINE}Bu ayar ile konsolda aktif olacakdır +STR_5842 :Senaryoları senaryo listesinde ya RCT2’deki gibi zorluk seviyesine göre ya da RCT1’deki gibi klasik olarak sırala +STR_5843 :RCT1’deki gibi bir senaryoyu tamamladıktan sonra kilitli bir senaryoyu açılsın +STR_5844 :Sunucuya bağlantınız koptuğu halde{NEWLINE}sunucudan çıkılmasın +STR_5845 :Üst araç çubuğuna ‘Debugging Araçları’ simgesi eklensin/kaldırısın{NEWLINE}Bu ayar ile konsolda aktif olacaktır STR_5846 :Oyunun hangi ara ile otomatik kaydedileceğini seçiniz -STR_5847 :Ana ekrandaki arka planda görüntülünen başlık dizisi seçenekleri{NEWLINE}RCT1 veya RCT2 başlık dizilerini kullanmak isterseniz, ilk önce başlık dizisinde kullanılan senaryoları OpenRCT2’ye yüklemeniz gereklidir -STR_5849 :Yeni işciler otomatikman{NEWLINE}bir yere yerleştiriliyor -STR_5851 :Yeni inşa edilen aletlere{NEWLINE}otomatikman seçdiğiniz kontrol süreci ayarlanıyor +STR_5847 :Ana ekrandaki arka planda görüntülenen başlık dizisi seçenekleri{NEWLINE}RCT1 veya RCT2 başlık dizilerini kullanmak isterseniz, ilk önce başlık dizisinde kullanılan senaryoları OpenRCT2’ye yüklemeniz gereklidir +STR_5849 :Yeni işçiler otomatikman{NEWLINE}bir yere yerleştiriliyor +STR_5851 :Yeni inşa edilen aletlere{NEWLINE}otomatikman seçtiğiniz kontrol süreci ayarlanıyor STR_5853 :Ses efektlerini aç/kapat STR_5854 :Alet müziklerini aç/kapat STR_5855 :Ekran modunu seçiniz STR_5856 :Tam ekran modunda çözünürlüğü seçiniz STR_5857 :Oyun ayarları -STR_5858 :Use GPU for displaying instead of CPU. Improves compatibility with screen capture software. May slightly decrease performance. +STR_5858 :Görüntülemek için CPU yerine GPU kullanın. Ekran yakalama yazılımı ile uyumluluğu artırır. Performansı biraz düşürebilir. STR_5859 :FPS sınırlandırması bu ayar ile devre dışı bırakılıyor. Bu ayar kapalı ise FPS 40’dan fazlasına çıkmıyor -STR_5860 :Toggle original/decompiled track drawing +STR_5860 :Orijinal/derlenmiş parça çizimini değiştir STR_5861 :Kodlama doğrulama hatası. STR_5862 :Bilinmeyen oyuncuları engelle -STR_5863 :Sadece kodlaması bilinen oyuncuların servere girmesine izin veriniz -STR_5864 :Bu servere sadece belirli oyuncular bağlanabiliyor (Whitelisted players) +STR_5863 :Sadece kodlaması bilinen oyuncuların sunucuya girmesine izin veriniz +STR_5864 :Bu sunucuya sadece belirli oyuncular bağlanabiliyor (Whitelisted players) STR_5865 :Sohbeti kaydet -STR_5866 :Tüm sohbeti kullanıcı klasörünüze kayediniz +STR_5866 :Tüm sohbeti kullanıcı klasörünüze kaydediniz STR_5867 :{WINDOW_COLOUR_2}Sağlayıcı ismi: {BLACK}{STRING} -STR_5868 :{WINDOW_COLOUR_2}Sağlayıcı E-Posta’sı: {BLACK}{STRING} +STR_5868 :{WINDOW_COLOUR_2}Sağlayıcı E-Postası: {BLACK}{STRING} STR_5869 :{WINDOW_COLOUR_2}Sağlayıcı Internet sayfası: {BLACK}{STRING} STR_5870 :Server bilgisi STR_5871 :Çiçeklerin solmasını devre dışı bırak STR_5872 :Çiçekler bu hile ile solmadığı için sulanmasına gerek kalmıyor STR_5873 :Her türlü ray şekline tırmanma zinciri -STR_5874 :Bu hile ile her türlü ray şekline tırmanma zinciri inşa edebilirsinz +STR_5874 :Bu hile ile her türlü ray şekline tırmanma zinciri inşa edebilirsiniz STR_5875 :Grafiksel aygıt: -STR_5876 :Oyunda grafiğin hangi aygıt tarafından görüntüleceğini seçiniz +STR_5876 :Oyunda grafiğin hangi aygıt tarafından görüntüleneceğini seçiniz STR_5877 :Software STR_5878 :Software (Hardware desteği ile) STR_5879 :OpenGL (deneysel) STR_5880 :Seçili olanlar -STR_5881 :Seçililmemiş olanlar +STR_5881 :Seçilmemiş olanlar STR_5882 :Kendi para biriminiz STR_5883 :Kendi para biriminiz -STR_5884 :{WINDOW_COLOUR_2}Döviz kuru: -STR_5885 :{WINDOW_COLOUR_2}eşitdir {COMMA32} GBP (£) +STR_5884 :{WINDOW_COLOUR_2}Döviz kuru: +STR_5885 :{WINDOW_COLOUR_2}eşittir {COMMA32} GBP (£) STR_5886 :{WINDOW_COLOUR_2}Sembol: STR_5887 :Ön ek STR_5888 :Son ek -STR_5889 :Kendi para birimi semboliniz -STR_5890 :Kullanmak istediğiniz sembolu giriniz +STR_5889 :Kendi para birimi sembolünüz +STR_5890 :Kullanmak istediğiniz sembolü giriniz STR_5891 :Varsayılan STR_5892 :Varsayılan klasöre gidiniz STR_5893 :Döviz kuru STR_5894 :Döviz kurunu giriniz STR_5895 :Tasarımı kaydediniz STR_5896 :Tasarım kaydedilemedi! -STR_5898 :{BLACK}Tasarım yüklenemedi{newline}Dosya ya bozuk, ya hatalı yada eksik! +STR_5898 :{BLACK}Tasarım yüklenemedi{NEWLINE}Dosya ya bozuk, ya hatalı ya da eksik! STR_5899 :Grafiksel Debug penceresi STR_5900 :Orijinal çizim kodunu kullan STR_5901 :Cisim yüksekliklerini göster @@ -3019,9 +3018,9 @@ STR_5903 :Grafiksel Debug penceresi STR_5904 :Tarihi sıfırla STR_5905 :Otomatikman harita üretmek için kullanabileceğiniz bir araç STR_5906 :Mouse pozisyonuna doğru yakınlaştır -STR_5907 :Bu ayar ile ekranı yakınlaştırdığınızda ekran mouse’un bulunduğu yere yakınlaştırılacaktır. Ayar kapalı olduğu takdirde ekranı yakılanştırdığını vakit, ekran bulunduğunuz yere yakınlaştırılacakdır +STR_5907 :Bu ayar ile ekranı yakınlaştırdığınızda ekran mouse’un bulunduğu yere yakınlaştırılacaktır. Ayar kapalı olduğu takdirde ekranı yakınlaştırdığınız vakit, ekran bulunduğunuz yere yakınlaştırılacaktır STR_5908 :Tren türünü değiştir -STR_5909 :Bu hile ile alet penceresinden tren türünü değiştirebilirsinz. Dikkat oyun çökebilir +STR_5909 :Bu hile ile alet penceresinden tren türünü değiştirebilirsiniz. Dikkat oyun çökebilir STR_5910 :Uygula STR_5911 :Yolları gizle STR_5912 :Yolları gizleme @@ -3033,7 +3032,7 @@ STR_5917 :{COMMA16} oyuncu STR_5918 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_5919 :{COMMA16} STR_5920 :Hava durumunu göster -STR_5921 :Bu ayar kapalı ise yağmur ve şimşek gibi hava durumları gizlenecekdir +STR_5921 :Bu ayar kapalı ise yağmur ve şimşek gibi hava durumları gizlenecektir STR_5922 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}En fazla {STRINGID} STR_5923 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}Tren başı en fazla {COMMA16} {STRINGID} vagon STR_5924 :Madde bilgileri @@ -3060,7 +3059,7 @@ STR_5944 :Eklenti: {BLACK}Yok STR_5945 :Bağlantı noktaları: STR_5946 :Tür: {BLACK}{STRINGID} STR_5947 :ID: {BLACK}{COMMA16} -STR_5948 :Isim: {BLACK}{STRINGID} +STR_5948 :İsim: {BLACK}{STRINGID} STR_5949 :Tırmanma zinciri STR_5950 :Değişiklikleri tüm raylara uygula STR_5951 :Parça ID’si: {BLACK}{COMMA16} @@ -3074,7 +3073,7 @@ STR_5958 :Kuzeydoğu STR_5959 :Güneydoğu STR_5960 :Kare içindeki pozisyonu: STR_5961 :Kayıt endeksi: {BLACK}{COMMA16} -STR_5962 :Çarpışma tespidi: +STR_5962 :Çarpışma tespiti: STR_5963 :Kenar yükseltme: STR_5964 :Eğimli STR_5965 :Giriş türü: {BLACK}{STRINGID} @@ -3086,7 +3085,7 @@ STR_5970 :Giriş ID’si: {BLACK}{COMMA16} STR_5971 :Çıkış ID’si: {BLACK}{COMMA16} STR_5972 :Alet ID’si: {BLACK}{COMMA16} STR_5973 :Bir sonrakine yapıştır -STR_5974 :Arızalı maddenin taban ve açıklık yükseğini seçdiğiniz maddeden kopyalayıp arızalı maddeye ekleyiniz +STR_5974 :Arızalı maddenin taban ve açıklık yükseğini seçtiğiniz maddeden kopyalayıp arızalı maddeye ekleyiniz STR_5975 :Eğim: STR_5976 :Düz STR_5977 :Sağ taraf yukarı @@ -3096,7 +3095,7 @@ STR_5980 :Banner metni: {BLACK}{STRINGID} STR_5981 :Banner değil STR_5982 :Büyük dekorasyon türü: {BLACK}{COMMA16} STR_5983 :Büyük dekorasyon ID’si: {BLACK}{COMMA16} -STR_5984 :Blocked paths: +STR_5984 :Kapalı yollar: STR_5985 :Yeni klasör STR_5986 :Yeni klasör ismi giriniz STR_5987 :Yeni klasör oluşturulamadı @@ -3105,7 +3104,7 @@ STR_5989 :Satılık inşa izni yok STR_5990 :Satılık alan veya inşa izni yok STR_5991 :Madde yapıştırılamıyor… STR_5992 :Harita maddeleri sınırına ulaşıldı -STR_5993 :Seçdiğiniz maddeyi kopyalayınız +STR_5993 :Seçtiğiniz maddeyi kopyalayınız STR_5994 :Kopyaladığınız maddeyi yapıştırınız STR_5995 :Hızlandırıcı STR_5996 :Hız @@ -3114,21 +3113,21 @@ STR_5998 :Para ekle STR_5999 :Parayı belirle STR_6000 :Yeni değer giriniz STR_6001 :Işıklandırmayı etkinleştir (deneysel) -STR_6002 :Geceleri lambalar ve aletler ışıklandırılacakdır{NEWLINE}Grafiksel aygıt olarak Hardware desteği seçilmelidir +STR_6002 :Geceleri lambalar ve aletler ışıklandırılacaktır{NEWLINE}Grafiksel aygıt olarak Hardware desteği seçilmelidir STR_6003 :Kesik Görüntüleme STR_6004 :Kesik Görüntüleme STR_6005 :Etkinleştir -STR_6006 :Kesik Görüntüleme sadece seçdiğiniz zeminin üzerinde veya altında bulunanları göstermekde +STR_6006 :Kesik Görüntüleme sadece seçtiğiniz zeminin üzerinde veya altında bulunanları göstermekte STR_6007 :Yükseklik -STR_6008 :Burayı tıklayarak “Raw value” veya gerçek birim arası değiştiriniz{NEWLINE}“Raw value” yüksekliği bloklara benzer bir şekilde gösterir +STR_6008 :Ölçüm birimlerinde ham değer<->değer arasında geçiş yapmak için tıklayın STR_6009 :Kesmek istediğiniz yüksekliğini seçiniz STR_6010 :{COMMA2DP32}m STR_6011 :{COMMA1DP16}ft STR_6012 :{COMMA1DP16} -STR_6013 :Müşteriler sadece park girişine ve tesislere ücret ödiyecekdir{NEWLINE}Aletler ücretsiz -STR_6014 :Müşteriler sadece alet girişlerine ve tesislere ücret ödiyecekdir{NEWLINE}Park girişi ücretsiz +STR_6013 :Müşteriler sadece park girişine ve tesislere ücret ödeyecektir{NEWLINE}Aletler ücretsiz +STR_6014 :Müşteriler sadece alet girişlerine ve tesislere ücret ödeyecektir{NEWLINE}Park girişi ücretsiz STR_6015 :Yükselt -STR_6016 :Maddeyi modife et +STR_6016 :Maddeyi modifiye et STR_6017 :Yavaş lütfen STR_6018 :Alet tasarımı - Sol virajlar STR_6019 :Alet tasarımı - Sağ virajlar @@ -3140,9 +3139,9 @@ STR_6024 :Alet tasarımı - Eğimli viraj sol STR_6025 :Alet tasarımı - Eğimli viraj sağ STR_6026 :Alet tasarımı - Bir önceki ray STR_6027 :Alet tasarımı - Bir sonraki ray -STR_6028 :Alet tasarımı - Inşa et +STR_6028 :Alet tasarımı - inşa et STR_6029 :Alet tasarımı - Sil -STR_6030 :Dekorasyon seçici. Bu araç ile seçdiğiniz dekorasyonun aynısı kopyalansın +STR_6030 :Dekorasyon seçici. Bu araç ile seçtiğiniz dekorasyonun aynısı kopyalansın STR_6031 :Server açıklaması: STR_6032 :Server karşılaması: STR_6033 :RCT1 klasörü: @@ -3163,7 +3162,7 @@ STR_6047 :Kenarları düzleştir STR_6048 :Harita arızası STR_6049 :PNG dosyası okunamadı STR_6050 :Bitmap dosyası okunamadı -STR_6052 :Harita çok büyük olduğundan dolayı küçültülücekdir +STR_6052 :Harita çok büyük olduğundan dolayı küçültülüncedir STR_6053 :Harita normalleştirilemiyor STR_6054 :Sadece 24 bit Bitmap dosyaları destekleniyor STR_6055 :OpenRCT2 harita dosyası @@ -3171,16 +3170,16 @@ STR_6056 :Oyunun sesini kapatınız STR_6057 :Üst araç çubuğunda ‘Ses Kapatma’ simgesini göster/gizle STR_6058 :Ses kapatma STR_6059 :» -STR_6060 :Müşteriler birşey satın aldığında animasyon göster -STR_6061 :Müşteriler herhangi birşey satın aldığında{NEWLINE}fiyatlar animasyon olarak gösterilecekdir +STR_6060 :Müşteriler bir şey satın aldığında animasyon göster +STR_6061 :Müşteriler herhangi bir şey satın aldığında{NEWLINE}fiyatlar animasyon olarak gösterilecektir STR_6062 :{OUTLINE}{GREEN}+ {CURRENCY2DP} STR_6063 :{OUTLINE}{RED}- {CURRENCY2DP} STR_6064 :Tüm araziyi al -STR_6065 :Oyuncuların değisikliğini kaydet +STR_6065 :Oyuncuların değişikliğini kaydet STR_6066 :Oyuncuların yaptığı tüm değişiklikleri kaydediniz STR_6067 :Server başlatıldı. STR_6068 :Server kapandı. -STR_6069 :{STRING} serverden {STRING} tarafından atıldı +STR_6069 :{STRING} sunucudan {STRING} tarafından atıldı STR_6070 :{STRING} {STRING} tarafından ‘{STRING}’ grubuna alındı STR_6071 :{STRING} yeni grup oluşturdu: ‘{STRING}’ STR_6072 :{STRING} ‘{STRING}’ grubunu sildi @@ -3193,7 +3192,7 @@ STR_6078 :{STRING} tarafından ‘{STRING}’ aleti inşa edildi STR_6079 :{STRING} tarafından ‘{STRING}’ aleti silindi STR_6080 :{STRING} tarafından ‘{STRING}’ aletinin görünümü değiştirildi STR_6081 :{STRING} ‘{STRING}’ aletini kapattı -STR_6082 :{STRING} ‘{STRING}’ aletini açdı +STR_6082 :{STRING} ‘{STRING}’ aletini açtı STR_6083 :{STRING} ‘{STRING}’ aletini test ediyor STR_6084 :{STRING} tarafından ‘{STRING}’ aletinin araç ayarları değiştirildi STR_6085 :{STRING} tarafından ‘{STRING}’ aletinin ayarları değiştirildi @@ -3201,7 +3200,7 @@ STR_6086 :{STRING} tarafından ‘{STRING}’ aletine yeni isim verildi. Yeni STR_6087 :{STRING} tarafından ‘{STRING}’ alet/dükkan fiyatı değiştirildi. Yeni fiyat: {STRING} STR_6088 :{STRING} tarafından ‘{STRING}’ alet/dükkan ek fiyatı değiştirildi. Yeni fiyat: {STRING} STR_6089 :{STRING} tarafından ‘{STRING}’ park ismi değiştirildi. Yeni isim: ‘{STRING}’ -STR_6090 :{STRING} parkı açdı +STR_6090 :{STRING} parkı açtı STR_6091 :{STRING} parkı kapattı STR_6092 :{STRING} park giriş ücretini değiştirdi. Yeni ücret: {STRING} STR_6093 :{STRING} yeni bir dekorasyon inşa etti @@ -3210,38 +3209,38 @@ STR_6095 :{STRING} bir dekorasyonu değiştirdi STR_6096 :{STRING} banner ismini değiştirdi. Yeni isin: ‘{STRING}’. STR_6097 :{STRING} ‘{STRING}’ aletine yeni ray ekledi STR_6098 :{STRING} bir ray sildi -STR_6099 :Server’e bağlandınız. -STR_6100 :Server’den çıktınız. +STR_6099 :Sunucuya bağlandınız. +STR_6100 :Sunucudan çıktınız. STR_6101 :Aletler zamanla değer kayıp etmesin -STR_6102 :Aletlerin değeri düşmediği sürece müşterilerin gözünde giriş ücreti her zaman ucuz kalacakdır -STR_6103 :Bu ayar Multiplayer’de sıra dışı bırkalıdı. -STR_6105 :Hyper Tren +STR_6102 :Aletlerin değeri düşmediği sürece müşterilerin gözünde giriş ücreti her zaman ucuz kalacaktır +STR_6103 :Bu ayar Multiplayer’de sıra dışı bırakıldı. +STR_6105 :Hiper Tren STR_6107 :Monster Trucks STR_6109 :Hyper Twister -STR_6111 :Klassik Mini Tren -STR_6113 :Yüksek düşüşler ve hızlara ulaşan bir tren. Vagonları çok komforlu ve heyecanı artdırmak için güvenlik askısı kalça kısmındadır +STR_6111 :Klasik Mini Tren +STR_6113 :Yüksek düşüşler ve hızlara ulaşan bir tren. Vagonları çok konforlu ve heyecanı arttırmak için güvenlik askısı kalça kısmındadır STR_6115 :Müşteriler belirli bir yolda Monster Truck ile yavaşça seyahat eder STR_6116 :Bu çelik yapılı hız treni farklı kıvrılmalara, yuvarlamalara ve döngülere sahiptir STR_6119 :Fazla yüksekliğe ulaşmayan ölçülü bir tren STR_6120 :{BABYBLUE}{STRINGID} aleti için yeni vagon/araç araştırıldı:{NEWLINE}{STRINGID} STR_6121 :Parkın etrafında bulunan tüm boş araziyi bu hile ile parkınızın sınırlarına katınız -STR_6122 :Bu senerayo hedefi için yeterince hız treni bulunmuyor +STR_6122 :Bu senaryo hedefi için yeterince hız treni bulunmuyor STR_6123 :Cisimler park için yüklenemedi STR_6124 :Cisim ismi STR_6125 :Cisim türü STR_6126 :Bilinmeyen madde STR_6127 :Dosya: {STRING} -STR_6128 :Dosya bazı cisimlerin eksik veya arızalı olduğundan dolayı yükelenemdi. Bu cisimler aşağı kısımda sıralanacakdır +STR_6128 :Dosya bazı cisimlerin eksik veya arızalı olduğundan dolayı yüklenemedi. Bu cisimler aşağı kısımda sıralanacaktır STR_6129 :Seçilen cisimi kopyala STR_6130 :Tüm listeyi kopyala STR_6131 :Cisim kaynağı -STR_6132 :Herşeyi araştır +STR_6132 :Her şeyi araştır STR_6133 :Henüz araştırılmamış aletleri, cisimleri, dekorasyonları vs. inşa ediniz STR_6134 :Cisim silme STR_6135 :Client geçersiz istek gönderdi STR_6136 :Server geçersiz istek gönderdi STR_6137 :OpenRCT2, ücretsiz ve kaynağı açık olan Roller Coaster Tycoon 2 kopyasıdır -STR_6138 :OpenRCT2 bir çok kişinin yardımı ile oluşturulan bir proje. Tüm kişiler listesi “contributors.md” dosyasında bulunmakda. Daha fazla bilgi için http://github.com/OpenRCT2/OpenRCT2 sayfasına giriniz +STR_6138 :OpenRCT2 bir çok kişinin yardımı ile oluşturulan bir proje. Tüm kişiler listesi “contributors.md” dosyasında bulunmakta. Daha fazla bilgi için http://github.com/OpenRCT2/OpenRCT2 sayfasına giriniz STR_6139 :Tüm ürün ve şirket isimleri kendi sahiplerine aittir. Bunların kullanımı, onlar tarafından herhangi bir bağlılık veya onaylama anlamına gelmez. STR_6140 :Değişiklikler… STR_6141 :RCT1 tarzı alt araç cubuğu @@ -3250,7 +3249,7 @@ STR_6143 :{WINDOW_COLOUR_2}Alet türü: {BLACK}{STRINGID} STR_6144 :Kullanılan bölümleri göster STR_6145 :Hızlandırıcı hızını seçiniz STR_6146 :Uyumlu raylar -STR_6147 :Bu hile ile bir aletde bulunmayan fakat o alete uyum sağlayan tüm özel rayları inşa edebilirsiniz +STR_6147 :Bu hile ile bir alette bulunmayan fakat o alete uyum sağlayan tüm özel rayları inşa edebilirsiniz STR_6148 :Master servere bağlanıyor… STR_6149 :Master servere bağlanamadı STR_6150 :Master serverden geçersiz yanıt (no JSON number) @@ -3258,13 +3257,13 @@ STR_6151 :Master server geçerli serverler ile yanıt veremedi STR_6152 :Master serverden geçersiz yanıt (no JSON array) STR_6153 :Ücretli park girişi / Ücretli aletler STR_6154 :Güvenlik nedenleriyle, OpenRCT2’yi yükseltilmiş izinlerle çalıştırmak önerilmez. -STR_6155 :Ne KDialog nede Zenity kurulu. Ya ikisinden birisini kurunuz yada konsol üzeri komut ile ayarlayınız -STR_6156 :Isim kullanılıyor +STR_6155 :Ne KDialog nede Zenity kurulu. Ya ikisinden birisini kurunuz ya da konsol üzeri komut ile ayarlayınız +STR_6156 :İsim kullanılıyor STR_6157 :Konsol STR_6160 :{WINDOW_COLOUR_2}Mevcut araçlar/tasarımlar: {BLACK}{STRING} STR_6161 :Zemin çizgisi STR_6162 :Rotasyonlu Vahşi Fare -STR_6163 :Tekli vagonlar zig zag bir şeritde keskin virajlardan döner ve dik eğilimlerden iner. Ayrıyeten koltuklar heyecanı artdırmak için rotasyon yapar +STR_6163 :Tekli vagonlar zikzak bir şeritte keskin virajlardan döner ve dik eğilimlerden iner. Ayrıyeten koltuklar heyecanı arttırmak için rotasyon yapar STR_6164 :{WHITE}❌ STR_6165 :Vertical sync aç/kapat STR_6166 :Ekranın yırtılmasını önleyerek monitörün yenileme hızına göre her kareyi senkronize eder. @@ -3289,21 +3288,21 @@ STR_6199 :Tarihi değiştir STR_6200 :Tarihi sıfırla STR_6201 :{MONTH} STR_6202 :Sanal zemin türü: -STR_6203 :Birşey inşa etdiğinizde Crtl veya Shift tuşunu basılı tuttuğunuz zaman inşayı kolaylaştırmak için saydam veya yarı saydam bir sanal zemin görüntülenecekdir -STR_6215 :Inşa -STR_6216 :Işletme +STR_6203 :Bir şey inşa ettiğinizde Ctrl veya Shift tuşunu basılı tuttuğunuz zaman inşayı kolaylaştırmak için saydam veya yarı saydam bir sanal zemin görüntülenecektir +STR_6215 :İnşa +STR_6216 :İşletme STR_6217 :Alet/Ray STR_6218 :OpenRCT2 Resmi STR_6219 :Sadece yolları görüntüle STR_6220 :Kullanılır hale getir -STR_6221 :Bir aletin istasyon başı girşini veya çıkışını başka bir yere yapıştırdığınız takdirde bu ayar ile o giriş/cıkış kullanılabilir hale getirilecekdir +STR_6221 :Bir aletin istasyon başı girişini veya çıkışını başka bir yere yapıştırdığınız takdirde bu ayar ile o giriş/çıkış kullanılabilir hale getirilecektir STR_6222 :Burası müşteri pozisyonu olarak belirlenemiyor… STR_6223 :Park sınırlarının dışında bulunmalı -STR_6224 :{STRING} alet girişi inşa etdi +STR_6224 :{STRING} alet girişi inşa etti STR_6225 :OpenGL Renderer ile desteklenmiyor STR_6226 :Erken senaryo kazanması STR_6227 :Hedeflerinize ulaşır ulaşmaz belirlenmiş süreye kadar beklemeden senaryoyu kazanmanızı sağlıyor -STR_6228 :Scenario ayarları +STR_6228 :Senaryo ayarları STR_6229 :{WINDOW_COLOUR_2}{STRINGID}: {STRINGID} STR_6230 :{BLACK}{STRINGID}: STR_6231 :{WINDOW_COLOUR_2}{STRINGID}: {MOVE_X}{185}{STRINGID} @@ -3312,7 +3311,7 @@ STR_6233 :Kesik Görüntüleme STR_6234 :Sadece yolları görüntüle STR_6235 :Server Bilgisi STR_6236 :Oyuncular -STR_6237 :Grublar +STR_6237 :Gruplar STR_6238 :Multiplayer seçenekleri STR_6239 :Kesme yüksekliği STR_6240 :Seçenekler @@ -3323,9 +3322,9 @@ STR_6244 :Alet yenilenemiyor… STR_6245 :Aletin yenilenmesi gerekmiyor STR_6246 :Yenile STR_6247 :Alet yenileme -STR_6248 :{WINDOW_COLOUR_1}{STRINGID} aletini {CURRENCY} için yenilemek istediğinizden eminmisiniz? -STR_6249 :{WINDOW_COLOUR_1}{STRINGID} aletini yenilemek istiyormusunuz? -STR_6250 :{WINDOW_COLOUR_1}{STRINGID} aletini {CURRENCY} geri ödeme ile silmek istediğinizden eminmisiniz? +STR_6248 :{WINDOW_COLOUR_1}{STRINGID} aletini {CURRENCY} için yenilemek istediğinizden emin misiniz? +STR_6249 :{WINDOW_COLOUR_1}{STRINGID} aletini yenilemek istiyor musunuz? +STR_6250 :{WINDOW_COLOUR_1}{STRINGID} aletini {CURRENCY} geri ödeme ile silmek istediğinizden emin misiniz? STR_6251 :Alet henüz boş değil STR_6255 :Adres geçerli değil STR_6256 :Rendering seçenekleri @@ -3334,13 +3333,13 @@ STR_6258 :Saydam STR_6259 :Yok STR_6260 :Engelli maddeleri göster STR_6261 :Geniş yolları göster -STR_6262 :Ana Ses -STR_6263 :Tüm sesleri aç/kapat -STR_6264 :Herzaman sistem iletişim penceresinin kullan -STR_6265 :Bu ayar açık ise, OpenRCT2’nin oyun kayıt/yükleme penceresi yerine kullandığınız sistemin iletişim penceresi açılacakdır -STR_6266 :Özel içerik klasörünü aç -STR_6267 :Zemin deneticisini aç -STR_6268 :Bir sonraki tick’e atla +STR_6262 :Ana Ses +STR_6263 :Tüm sesleri aç/kapat +STR_6264 :Her zaman sistem iletişim penceresinin kullan +STR_6265 :Bu ayar açık ise, OpenRCT2’nin oyun kayıt/yükleme penceresi yerine kullandığınız sistemin iletişim penceresi açılacaktır +STR_6266 :Özel içerik klasörünü aç +STR_6267 :Zemin deneticisini aç +STR_6268 :Bir sonraki tick’e atla STR_6269 :Geçersiz hava ID’si STR_6360 :{BLACK}{COMMA32} STR_6502 :{COMMA16} ve {COMMA16} arasında değer giriniz. @@ -3375,7 +3374,7 @@ STR_DTLS :Ormanın içinde boş bir alanda güzel bir Lunapark inşa ediniz STR_SCNR :Dynamite Dunes STR_PARK :Dynamite Dunes -STR_DTLS :Çölün orta yerine bir Lunapark oluşturunuz. Bu parkda sadece bir hız treni bulunmakta fakat arazi genişletmek için imkanlar var +STR_DTLS :Çölün orta yerine bir Lunapark oluşturunuz. Bu parkta sadece bir hız treni bulunmakta fakat arazi genişletmek için imkanlar var STR_SCNR :Leafy Lake @@ -3400,7 +3399,7 @@ STR_DTLS :Bumbly Beach’in küçük lunaparkını güzel bir lunaparka dön STR_SCNR :Trinity Islands STR_PARK :Trinity Islands -STR_DTLS :Üç çesitli adanın üstünde lunapark oluşturunuz +STR_DTLS :Üç çeşitli adanın üstünde lunapark oluşturunuz STR_SCNR :Katie’s Dreamland @@ -3420,7 +3419,7 @@ STR_DTLS :Sulu lunaparkın büyümeye ihtiyacı var STR_SCNR :Millennium Mines STR_PARK :Millennium Mines -STR_DTLS :Bu terk edilmiş maden ocağı uzun süre turislik bir alandı fakat şimdi sizin genişletebileceğiniz küçük bir lunapark kuruldu +STR_DTLS :Bu terk edilmiş maden ocağı uzun süre turistlik bir alandı fakat şimdi sizin genişletebileceğiniz küçük bir lunapark kuruldu STR_SCNR :Karts & Coasters @@ -3430,7 +3429,7 @@ STR_DTLS :Ormanın içinde gizlenmiş ve sadece Kart Yarışı ve Ahşap Hız STR_SCNR :Mel’s World STR_PARK :Mel’s World -STR_DTLS :Bu lunaparkda modern tasarımlı hız trenleri bulunmakta +STR_DTLS :Bu lunaparkta modern tasarımlı hız trenleri bulunmakta STR_SCNR :Mystic Mountain @@ -3445,7 +3444,7 @@ STR_DTLS :Bu tarihi yeri bir lunaparka dönüştürünüz STR_SCNR :Crumbly Woods STR_PARK :Crumbly Woods -STR_DTLS :Bu lunapark güzel alet tasarımları bulunduruyor. Fakat aletler çok eski. Ya aletleri yenileyiniz yada yeni aletler inşa ediniz +STR_DTLS :Bu lunapark güzel alet tasarımları bulunduruyor. Fakat aletler çok eski. Ya aletleri yenileyiniz ya da yeni aletler inşa ediniz STR_SCNR :Paradise Pier @@ -3470,12 +3469,12 @@ STR_DTLS :Yerel makamlardan arazi değişiklikleri yasaklanmış bir alanda l STR_SCNR :Thunder Rock STR_PARK :Thunder Rock -STR_DTLS :‘Thunder Rock’ ile adlandırılan bu tepe turistlerin çok ziyaret ettiği bir yer +STR_DTLS :‘Thunder Rock’ ile adlandırılan bu tepe turistlerin çok ziyaret ettiği bir yer STR_SCNR :Mega Park STR_PARK :Mega Park -STR_DTLS :Iyi eğlenceler! +STR_DTLS :İyi eğlenceler! ## Added Attractions @@ -3531,7 +3530,7 @@ STR_DTLS :Cengelin ortasına bir lunapark oluşturunuz STR_SCNR :Hydro Hills STR_PARK :Hydro Hills -STR_DTLS :Lunaparkın arazisi dört büyük gölden oluşmakda +STR_DTLS :Lunaparkın arazisi dört büyük gölden oluşmakta STR_SCNR :Sprightly Park @@ -3551,7 +3550,7 @@ STR_DTLS :Meyve çiftliği bulunan bu arazide lunapark oluşturunuz STR_SCNR :Butterfly Dam STR_PARK :Butterfly Dam -STR_DTLS :Barajın etrafınaki boş alana lunapark inşa ediniz +STR_DTLS :Barajın etrafındaki boş alana lunapark inşa ediniz STR_SCNR :Coaster Canyon @@ -3561,12 +3560,12 @@ STR_DTLS :Bu kanyonda güzel bir lunapark oluşturunuz STR_SCNR :Thunderstorm Park STR_PARK :Thunderstorm Park -STR_DTLS :Iklimin çok yağmurlu olmasından dolayı aletleri yağmurdan korumak için piramid inşa edilmiş +STR_DTLS :İklimin çok yağmurlu olmasından dolayı aletleri yağmurdan korumak için piramit inşa edilmiş STR_SCNR :Harmonic Hills STR_PARK :Harmonic Hills -STR_DTLS :Yerel makamlar tarafından ağaçlardan daha yüksek alet inşası yasaklanmışdır +STR_DTLS :Yerel makamlar tarafından ağaçlardan daha yüksek alet inşası yasaklanmıştır STR_SCNR :Roman Village @@ -3621,7 +3620,7 @@ STR_DTLS :Bu dağlık bölgeyi geniş bir lunaparka dönüştürmek için sı STR_SCNR :Urban Park STR_PARK :Urban Park -STR_DTLS :Şehir içi bulunan bu mikro parkda satılı arazi kısıtlı +STR_DTLS :Şehir içi bulunan bu mikro parkta satılı arazi kısıtlı STR_SCNR :Geoffrey Gardens @@ -3643,7 +3642,7 @@ STR_DTLS :Uyuyan yanardağın içine lunapark inşa ediniz STR_SCNR :Arid Heights STR_PARK :Arid Heights -STR_DTLS :Bir çölün ortasını sınırsız bütç ile lunapark inşa ediniz +STR_DTLS :Bir çölün ortasını sınırsız bütçe ile lunapark inşa ediniz STR_SCNR :Razor Rocks @@ -3658,7 +3657,7 @@ STR_DTLS :Sönmüş yanardağın içinde zamanla göl oluşan bu alanda lunap STR_SCNR :Vertigo Views STR_PARK :Vertigo Views -STR_DTLS :Bu lunaparkda henüz kârlı bir hız treni bulunmakda. Sizin hedefiniz o hız treninin kârını sekize katlamakdır +STR_DTLS :Bu lunaparkta henüz kârlı bir hız treni bulunmakta. Sizin hedefiniz o hız treninin kârını sekize katlamaktır STR_SCNR :Paradise Pier 2 @@ -3678,7 +3677,7 @@ STR_DTLS :Bir adanın üstünde bulunan eski kaleyi lunaparka dönüştürün STR_SCNR :Wacky Warren STR_PARK :Wacky Warren -STR_DTLS :Yolları genelde yerin altında bulununan bir lunapark +STR_DTLS :Yolları genelde yerin altında bulunan bir lunapark STR_SCNR :Grand Glacier @@ -3698,7 +3697,7 @@ STR_DTLS :Çölün ortasında beş kısmen inşa edilmiş hız treni bulundur STR_SCNR :Woodworm Park STR_PARK :Woodworm Park -STR_DTLS :Bu tarihi lunaparkda sadece eski tarz aletlerin inşasına izin veriliyor +STR_DTLS :Bu tarihi lunaparkta sadece eski tarz aletlerin inşasına izin veriliyor STR_SCNR :Icarus Park @@ -3718,7 +3717,7 @@ STR_DTLS :Büyük bir hız treni bulunduran korkunç lunapark STR_SCNR :Thunder Rocks STR_PARK :Thunder Rocks -STR_DTLS :Iki büyük kayalık üstünde lunapark kurunuz. Bu iki kayalık hız treni ile birbirine bağlı +STR_DTLS :İki büyük kayalık üstünde lunapark kurunuz. Bu iki kayalık hız treni ile birbirine bağlı STR_SCNR :Octagon Park @@ -3733,7 +3732,7 @@ STR_DTLS :Uzun ince bir adanın üstüne lunapark inşa ediniz STR_SCNR :Icicle Worlds STR_PARK :Icicle Worlds -STR_DTLS :Buzlu bir alana lunaparak inşa ediniz +STR_DTLS :Buzlu bir alana lunapark inşa ediniz STR_SCNR :Southern Sands @@ -3743,7 +3742,7 @@ STR_DTLS :Çölde bulunan bu lunaparkı geliştiriniz STR_SCNR :Tiny Towers STR_PARK :Tiny Towers -STR_DTLS :Bu mikro lunaparkda beş kısmen inşa edilmiş hız trenlerini tamamlayınız +STR_DTLS :Bu mikro lunaparkta beş kısmen inşa edilmiş hız trenlerini tamamlayınız STR_SCNR :Nevermore Park @@ -3753,7 +3752,7 @@ STR_DTLS :Büyük bir alanda gölün etrafında bir lunapark. Müşteri taş STR_SCNR :Pacifica STR_PARK :Pacifica -STR_DTLS :Bu tropical adanın üstünde lunapark inşa ediniz +STR_DTLS :Bu tropikal adanın üstünde lunapark inşa ediniz STR_SCNR :Urban Jungle @@ -3785,17 +3784,17 @@ STR_DTLS :Mikro bir alanda park değerinin yüksek olmasını sağlamaya çal STR_SCNR :Alton Towers STR_PARK :Alton Towers -STR_DTLS :Gerçekde Ingilterede bulunan bir lunapark +STR_DTLS :Gerçekte İngiltere’de bulunan bir lunapark STR_SCNR :Heide-Park STR_PARK :Heide-Park -STR_DTLS :Gerçekde Almanyada bulunan bir lunapark +STR_DTLS :Gerçekte Almanya’da bulunan bir lunapark STR_SCNR :Blackpool Pleasure Beach STR_PARK :Blackpool Pleasure Beach -STR_DTLS :Gerçekde Ingilterede bulunan bir lunapark +STR_DTLS :Gerçekte İngiltere’de bulunan bir lunapark ## Misc parks from RCT1 # Had no details @@ -3904,7 +3903,7 @@ STR_DTLS :Bir büyük lunapark zinciri tarafından bu terk edilmiş maden kas STR_SCNR :Gravity Gardens STR_PARK :Gravity Gardens -STR_DTLS :Bu lunaparkda sadece hız treni inşa etmenize izin veriliyor +STR_DTLS :Bu lunaparkta sadece hız treni inşa etmenize izin veriliyor STR_SCNR :Infernal Views @@ -3924,113 +3923,113 @@ STR_DTLS :Bir dağın eteğine lunapark kurunuz. Fakat yüksek aletlerin inş STR_SCNR :Six Flags Belgium STR_PARK :Six Flags Belgium -STR_DTLS :Gerçekde Belçikada bulunan bir lunapark +STR_DTLS :Gerçekte Belçika’da bulunan bir lunapark STR_SCNR :Six Flags Great Adventure STR_PARK :Six Flags Great Adventure -STR_DTLS :Gerçekde ABD’nin New Jersey eyaletinde bulunan bir lunapark +STR_DTLS :Gerçekte ABD’nin New Jersey eyaletinde bulunan bir lunapark STR_SCNR :Six Flags Holland STR_PARK :Six Flags Holland -STR_DTLS :Gerçekde Hollanda’da bulunan bir lunapark +STR_DTLS :Gerçekte Hollanda’da bulunan bir lunapark STR_SCNR :Six Flags Magic Mountain STR_PARK :Six Flags Magic Mountain -STR_DTLS :Gerçekde ABD’nin Kaliforniya eyaletinde bulunan bir lunapark +STR_DTLS :Gerçekte ABD’nin Kaliforniya eyaletinde bulunan bir lunapark STR_SCNR :Six Flags over Texas STR_PARK :Six Flags over Texas -STR_DTLS :Gerçekde ABD’nin Texas eyaletinde bulunan bir lunapark +STR_DTLS :Gerçekte ABD’nin Texas eyaletinde bulunan bir lunapark ############################################################################### ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - African Diamond Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :Kullanılmayan bir elmas madeni satın aldınız. Bu madende değerli bir elmas buldunuz ve onun satışı ile popüler bir lunapark inşa etmeye karar verdiniz -STR_SCNR :Africa - Oasis +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness -STR_DTLS :Afrikada bir vaha buldunuz ve bu vahanın etrafına güzel bir lunapark inşa etmeye karar verdiniz +STR_DTLS :Afrika’da bir vaha buldunuz ve bu vahanın etrafına güzel bir lunapark inşa etmeye karar verdiniz -STR_SCNR :Africa - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge -STR_DTLS :Ucuza ve bol miktarda park için ceyeran üretmek amacıyla bir baraj inşa ettirdiniz. Baraj için çektiğiniz krediyi geri ödediniz bile. Şimdi park değerini yükseltmeye çalışınız +STR_DTLS :Ucuza ve bol miktarda park için cereyan üretmek amacıyla bir baraj inşa ettirdiniz. Baraj için çektiğiniz krediyi geri ödediniz bile. Şimdi park değerini yükseltmeye çalışınız -STR_SCNR :Antarctic - Ecological Salvage +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :Çevre koruma makamı size eski petrol rafinerisini görüntü kirliliği olduğundan dolayı yıkıp yerine güzel bir lunapark inşa etmenizi istedi. Arazi satın alma ucuz fakat kredi faizi çok yüksek -STR_SCNR :Asia - Great Wall of China Tourism Enhancement +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :Yetkililer, bitişik arazide bir lunapark inşa ederek Çin Seddi çevresindeki turizmi geliştirmeye karar verdiler. Paranız sınırsız -STR_SCNR :Asia - Japanese Coastal Reclaim +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast -STR_DTLS :Burada kurulu olan lunaparkın yeri bitmek üzere. Bundan dolayı suyun üstüne inşa etmeniz gerekli. Bu yüzden kredi çekmeniz gerklidi. Deprem riskinden dolayı yüksek inşa yasağı koyulmuştur +STR_DTLS :Burada kurulu olan lunaparkın yeri bitmek üzere. Bundan dolayı suyun üstüne inşa etmeniz gerekli. Bu yüzden kredi çekmeniz gereklidir. Deprem riskinden dolayı yüksek inşa yasağı koyulmuştur -STR_SCNR :Asia - Maharaja Palace +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :Maharaja ailesi sizden yerel halkın eğlenmesi için Maharaja Sarayının etrafına lunapark inşa etmenizi diledi -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure -STR_DTLS :Aborijin halkının kültürünü anma programı için bir lunapark kurmanız rica edildi. +STR_DTLS :Aborjin halkının kültürünü anma programı için bir lunapark kurmanız rica edildi. -STR_SCNR :Australasia - Fun at the Beach +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast -STR_DTLS :Yerel bir girişimcinin deniz yaşamı parkı kapandı. Siz henüz küçük bir lunaparka sahipsiniz ve kapalı olan diğer parkıda satın aldınız. Bu parkları birleştiriniz +STR_DTLS :Yerel bir girişimcinin deniz yaşamı parkı kapandı. Siz henüz küçük bir lunaparka sahipsiniz ve kapalı olan diğer parkında satın aldınız. Bu parkları birleştiriniz -STR_SCNR :Europe - European Cultural Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza -STR_DTLS :Avrupa kültürel festivalinin yöneticisi olarak seçildiniz. Sizden festivala daha fazla müşteri getirmeniz bekleniyor +STR_DTLS :Avrupa kültürel festivalinin yöneticisi olarak seçildiniz. Sizden festivale daha fazla müşteri getirmeniz bekleniyor -STR_SCNR :Europe - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes -STR_DTLS :Eski bir lunapark harabeye dönüşdü. Avrupa Birliği size bu parkı eski ihtişamına getirmek dileği ile verdi. Parkı yenilemeniz ve krediyi geri ödemeniz gerekiyor. +STR_DTLS :Eski bir lunapark harabeye dönüştü. Avrupa Birliği size bu parkı eski ihtişamına getirmek dileği ile verdi. Parkı yenilemeniz ve krediyi geri ödemeniz gerekiyor. -STR_SCNR :N. America - Extreme Hawaiian Island +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki -STR_DTLS :Hawaii’de yaşıyan insanlar bütün gün sörf yapmakdan sıkılmış ve daha heyecanlı birşey yapmak istiyorlar. Sizden turistlerin ziyaret edeceği ve yerel halkı memnun edecek bir park inşa etmeniz bekleniyor +STR_DTLS :Hawaii’de yaşayan insanlar bütün gün sörf yapmaktan sıkılmış ve daha heyecanlı bir şey yapmak istiyorlar. Sizden turistlerin ziyaret edeceği ve yerel halkı memnun edecek bir park inşa etmeniz bekleniyor -STR_SCNR :North America - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities -STR_DTLS :Bu doğal hazinenin her iki tarafında sınırlı bir alanda bir park inşa etmelisiniz. - Yerli Kızılderililerden toprak satın alma imkanınız var. Yerel kasabanın nüfusunu sürdürmek için hedefi tamamlamanız gerekiyor. +STR_DTLS :Bu doğal hazinenin her iki tarafında sınırlı bir alanda bir park inşa etmelisiniz. - Yerli Kızılderililerden toprak satın alma imkânınız var. Yerel kasabanın nüfusunu sürdürmek için hedefi tamamlamanız gerekiyor. -STR_SCNR :North America - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven -STR_DTLS :Çok başarılı bir iş adamısınız ve uzun bir müddet tatile çıktınız. Bu tatilde şehirin göbeğinde bulunan boş araziye başarılı bir lunapark inşa etmeye karar verdiniz. Paranız sınırsız +STR_DTLS :Çok başarılı bir iş adamısınız ve uzun bir müddet tatile çıktınız. Bu tatilde şehrin göbeğinde bulunan boş araziye başarılı bir lunapark inşa etmeye karar verdiniz. Paranız sınırsız -STR_SCNR :South America - Inca Lost City +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder -STR_DTLS :Yerel turizmi güçlendirmek için çevresiyle uyumlu bir park kurmanız gereklidir. Fakat inşa için yükseklik sınırı koyulmuşdur +STR_DTLS :Yerel turizmi güçlendirmek için çevresiyle uyumlu bir park kurmanız gereklidir. Fakat inşa için yükseklik sınırı koyulmuştur -STR_SCNR :South America - Rain Forest Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Bu yağmur ormanında boş alan kısıtlı - yerel kereste endüstrisine bir alternatif sunmak için bu kısıtlı alanda lunapark inşa ediniz -STR_SCNR :South America - Rio Carnival +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :Rio yakınlarında küçük bir park işletiyorsun fakat banka kredinizi aradı. Bu beklenmedik borcu geri ödemek için kârınızı hızla artırmanız gerekiyor. @@ -4038,71 +4037,71 @@ STR_DTLS :Rio yakınlarında küçük bir park işletiyorsun fakat banka kred ## Time Twister Scenarios ############################################################################### -STR_SCNR :Dark Age - Castle +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Savaşın yeniden canlandırılması toplumunun yerel üyeleri, hobileri hakkında oldukça ciddi. Cliffside Kalesi’nin arazisinde bir Karanlık Çağ temalı park inşa etmenizi dilediler -STR_SCNR :Dark Age - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :Zenginlerden para kırpıp ve muhtaçlara dağıtmak için, siz ve ‘Mutlu Adamlarınız’ Sherwood Ormanı’nda bir lunapark kurmaya karar verdiniz -STR_SCNR :Future - First Encounters +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Uzak bir gezegende hayat keşfedildi. Bu gezegende bir uzaylı lunaparkı inşa ediniz -STR_SCNR :Future - Future World +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Geleceğin yaratıcı, ütopik vizyonunu sergileyin - son teknoloji konumlarını içeren fütüristik bir park tasarımı ile parkınızı oluşturunuz -STR_SCNR :Mythological - Animatronic Film Set +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :Eski bir film setinde kurulmuş olan mevcut bir lunaparkını işletme ve geliştirme görevi size verilmiştir -STR_SCNR :Mythological - Cradle of Civilisation +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :Arkeolojik eserler bulunduran bir adaya sahipsiniz. Bu eserlerin korunmasını sağlamak için lunapark kurmaya karar verdiniz -STR_SCNR :Prehistoric - After the Asteroid +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :Eski bir meteor kraterine sahipsiniz. Gerçek girişimci ruhu içinde, bir asteroid lunaparkı kurmaya ve görünüşte değersiz arazinizi büyük bir servete dönüştürmeye karar verdiniz -STR_SCNR :Prehistoric - Jurassic Safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :Jura devri tarzı lunapark inşa etme görevini üstlendiniz. Müşterilerin egzotik bitki ve hayvan sergilerine erişimini optimize etmek için, vadiye giden ve gelen aletler inşa etmeniz gerekecektir -STR_SCNR :Prehistoric - Stone Age +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles -STR_DTLS :Karayol kurulmasını engellemek için bu araziyi satın aldınız ve Taş Devri temalı bir lunapark inşa etmeye karar verdiniz +STR_DTLS :Karayolu kurulmasını engellemek için bu araziyi satın aldınız ve Taş Devri temalı bir lunapark inşa etmeye karar verdiniz -STR_SCNR :Roaring Twenties - Prison Island +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :ABD’nin meşhur hapishanesini satın aldınız ve burayı güzel bir lunaparka çevirmeye karar verdiniz. Paranız sınırsızdır -STR_SCNR :Roaring Twenties - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :Dedeniz 75 yıl önce Schneider Kupasını kazanmış ve onun zaferini anmak için buraya bir lunapark inşa etmeye karar verdiniz -STR_SCNR :Roaring Twenties - Skyscrapers +STR_SCNR :Metropolis STR_PARK :Metropolis -STR_DTLS :Şehirin içinde boş bir araziye sahipsiniz ve bu boş araziye şehir ve yirmili yıllar teamlı bir lunapark inşa etmeye karar verdiniz +STR_DTLS :Şehrin içinde boş bir araziye sahipsiniz ve bu boş araziye şehir ve yirmili yıllar temalı bir lunapark inşa etmeye karar verdiniz -STR_SCNR :Rock ’n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock -STR_DTLS :Büyük bir müzik festivalının yanına bir lunapark inşa edinizki festival ziyaretcileri daha çok eğlensin +STR_DTLS :Büyük bir müzik festivalinin yanına bir lunapark inşa ediniz ki festival ziyaretçileri daha çok eğlensin -STR_SCNR :Rock ’n’ Roll - Rock ’n’ Roll +STR_SCNR :Rock ’n’ Roll Revival STR_PARK :Rock ’n’ Roll Revival -STR_DTLS :Bu lunapark zamanında çok başarılımış. Fakat şimdi git gide bu parkın başarısı ve parlaklığı geriliyor. Park sahibi sizden parkı geri canlandırmanızı ve eski parlaklığına getirmenizi diliyor +STR_DTLS :Bu lunapark zamanında çok başarılıymış. Fakat şimdi git gide bu parkın başarısı ve parlaklığı geriliyor. Park sahibi sizden parkı geri canlandırmanızı ve eski parlaklığına getirmenizi diliyor diff --git a/data/language/uk-UA.txt b/data/language/uk-UA.txt index b5f51ec232..487dbaabfc 100644 --- a/data/language/uk-UA.txt +++ b/data/language/uk-UA.txt @@ -269,8 +269,8 @@ STR_0875 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP STR_0876 :{BLACK}▼ STR_0877 :Занизько! STR_0878 :Зависоко! -STR_0879 :Не можна опустити ділянку тут... -STR_0880 :Не можна підняти ділянку тут... +STR_0879 :Не можна опустити ділянку тут… +STR_0880 :Не можна підняти ділянку тут… STR_0881 :Об’єкт на шляху STR_0882 :Завантажити гру STR_0883 :Зберегти гру @@ -314,8 +314,8 @@ STR_0922 :Крутий схил вгору STR_0923 :Вертикальний підйом STR_0924 :Спіраль вниз STR_0925 :Спіраль вгору -STR_0926 :Неможливо видалити це... -STR_0927 :Неможливо побудувати це тут... +STR_0926 :Неможливо видалити це… +STR_0927 :Неможливо побудувати це тут… STR_0928 :Ланцюговий підйомник, для витягування автомобілів на схили STR_0929 :'S' вигин (лівий) STR_0930 :'S' вигин (правий) @@ -375,7 +375,7 @@ STR_0984 :{WINDOW_COLOUR_2}▲{BLACK} {CURRENCY2DP} STR_0985 :{WINDOW_COLOUR_2}▼{BLACK} {CURRENCY2DP} STR_0986 :{BLACK}{CURRENCY2DP} STR_0987 :Занадто багато атракціонів -STR_0988 :Не вдається створити новий атракціон... +STR_0988 :Не вдається створити новий атракціон… STR_0989 :{STRINGID} STR_0990 :Будівництво STR_0991 :Платформа станції @@ -389,10 +389,10 @@ STR_0998 :На цьому маршруті більше немає станц STR_0999 :Потрібна станційна платформа STR_1000 :Колія не є повним маршрутом STR_1001 :Колія не підходить для типу потяга -STR_1002 :Не вдається відкрити {STRINGID}... -STR_1003 :Не вдається протестувати {STRINGID}... -STR_1004 :Не вдається закрити {STRINGID}... -STR_1005 :Не вдається розпочати будівництво на {STRINGID}... +STR_1002 :Не вдається відкрити {STRINGID}… +STR_1003 :Не вдається протестувати {STRINGID}… +STR_1004 :Не вдається закрити {STRINGID}… +STR_1005 :Не вдається розпочати будівництво на {STRINGID}… STR_1006 :Потрібно спочатку закрити STR_1007 :Не вдається створити достатньо транспорту STR_1008 :Відкрити, закрити або протестувати атракціон @@ -404,10 +404,10 @@ STR_1013 :Закрити парк STR_1014 :Відкрити парк STR_1015 :Неможливо працювати з більш ніж однією платформою станції у цьому режимі STR_1016 :Неможливо працювати з менш ніж двома станціями у цьому режимі -STR_1017 :Не вдається змінити режим роботи... -STR_1018 :Не вдається внести зміни... -STR_1019 :Не вдається внести зміни... -STR_1020 :Не вдається внести зміни... +STR_1017 :Не вдається змінити режим роботи… +STR_1018 :Не вдається внести зміни… +STR_1019 :Не вдається внести зміни… +STR_1020 :Не вдається внести зміни… STR_1021 :{POP16}{POP16}{POP16}{POP16}{STRINGID} STR_1022 :{POP16}{POP16}{POP16}{COMMA16} вагон на потяг STR_1023 :{POP16}{POP16}{POP16}{COMMA16} вагонів на потяг @@ -446,7 +446,7 @@ STR_1055 :Ім’я особи STR_1056 :Ім’я працівника STR_1057 :Назва гірки / атракціону STR_1058 :Уведіть назву для гірки / атракціону: -STR_1059 :Не вдається перейменувати гірку / атракціон... +STR_1059 :Не вдається перейменувати гірку / атракціон… STR_1060 :Недійсна назва гірки / атракціону STR_1061 :Звичайний режим STR_1062 :Режим безперервного циклу @@ -531,8 +531,8 @@ STR_1140 :Виберіть варіант кольорової схеми т STR_1141 :Виберіть, який автомобіль/потяг модифікувати STR_1142 :{MOVE_X}{10}{STRINGID} STR_1143 :»{MOVE_X}{10}{STRINGID} -STR_1144 :Неможливо побудувати/перемістити вхід для цього атракціону... -STR_1145 :Неможливо побудувати/перемістити вихід для цього атракціону/аттракціону... +STR_1144 :Неможливо побудувати/перемістити вхід для цього атракціону… +STR_1145 :Неможливо побудувати/перемістити вихід для цього атракціону/аттракціону… STR_1146 :Вхід ще не побудовано STR_1147 :Вихід ще не побудовано STR_1148 :Чверть завантаження @@ -545,16 +545,16 @@ STR_1154 :Висотні відмітки на ділянці STR_1155 :Висотні позначки на доріжках STR_1156 :{MOVE_X}{10}{STRINGID} STR_1157 :✓{MOVE_X}{10}{STRINGID} -STR_1158 :Не можна видалити це... +STR_1158 :Не можна видалити це… STR_1159 :Розміщення декорацій, садів та інших аксесуарів STR_1160 :Створити / налаштувати озера та воду -STR_1161 :Не можна розмістити це тут... +STR_1161 :Не можна розмістити це тут… STR_1162 :{OUTLINE}{TOPAZ}{STRINGID} STR_1163 :{STRINGID}{NEWLINE}(Right-Click to Modify) STR_1164 :{STRINGID}{NEWLINE}(Right-Click to Remove) STR_1165 :{STRINGID} - {STRINGID} {COMMA16} -STR_1166 :Не можна знизити рівень води тут... -STR_1167 :Не можна збільшити рівень води... +STR_1166 :Не можна знизити рівень води тут… +STR_1167 :Не можна збільшити рівень води… STR_1168 :Параметри STR_1169 :(Немає) STR_1170 :{STRING} @@ -563,8 +563,8 @@ STR_1172 :{YELLOW}{STRINGID} STR_1173 :Побудова пішохідних доріжок та ліній черги STR_1174 :Знак банеру на шляху STR_1175 :Неможливо побудувати це на похилій доріжці -STR_1176 :Неможливо побудувати пішохідну доріжку тут... -STR_1177 :Неможливо видалити пішохідну доріжку звідси... +STR_1176 :Неможливо побудувати пішохідну доріжку тут… +STR_1177 :Неможливо видалити пішохідну доріжку звідси… STR_1178 :Схил землі непридатний STR_1179 :Пішохідна доріжка на шляху STR_1180 :Не можна будувати це під водою! @@ -938,7 +938,7 @@ STR_1547 : STR_1548 : STR_1549 : STR_1550 :“Ого!” -STR_1551 :“У мене таке почуття, наче хтось за мною слідкує...” +STR_1551 :“У мене таке почуття, наче хтось за мною слідкує…” STR_1552 :“I’m not paying that much for a balloon from {STRINGID}” STR_1553 :“I’m not paying that much for a cuddly toy from {STRINGID}” STR_1554 :“I’m not paying that much for a park map from {STRINGID}” @@ -1038,7 +1038,7 @@ STR_1647 : STR_1648 :"Будь ласка! Опустіть мене!" STR_1649 :“У мене мало грошей!” STR_1650 :“Ого! Будують новий атракціон!” -STR_1653 :“...і ось ми на {STRINGID}! +STR_1653 :“…і ось ми на {STRINGID}! STR_1654 :{WINDOW_COLOUR_2}Недавні думки: STR_1655 :Construct footpath on land STR_1656 :Construct bridge or tunnel footpath @@ -1122,7 +1122,7 @@ STR_1733 :Режим STR_1734 :{WINDOW_COLOUR_2}Кількість кіл: STR_1735 :Кількість кіл доріжки STR_1736 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} -STR_1738 :Не вдається змінити кількість кіл... +STR_1738 :Не вдається змінити кількість кіл… STR_1739 :Перегони виграє гість {INT32} STR_1740 :Перегони виграє {STRINGID} STR_1741 :Ще не збудовано! @@ -1150,7 +1150,7 @@ STR_1764 :Опуклості колод STR_1765 :Рейка з фотокамерою STR_1766 :Reverser turntable STR_1767 :Обертові тунелі -STR_1768 :Не вдається змінити кількість гойдалок... +STR_1768 :Не вдається змінити кількість гойдалок… STR_1769 :{WINDOW_COLOUR_2}Кількість гойдалок: STR_1770 :Кількість повних гойдалок STR_1771 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} @@ -1189,7 +1189,7 @@ STR_1807 :Збій у керуванні STR_1808 :{WINDOW_COLOUR_2}Останній збій: {BLACK}{STRINGID} STR_1809 :{WINDOW_COLOUR_2}Поточний збій: {OUTLINE}{RED}{STRINGID} STR_1810 :{WINDOW_COLOUR_2}Несе: -STR_1811 :Не можна тут будувати... +STR_1811 :Не можна тут будувати… STR_1812 :{BLACK}{STRINGID} STR_1813 :Різні об’єкти STR_1814 :Дії @@ -1246,7 +1246,7 @@ STR_1864 :Механік STR_1865 :Охоронець STR_1866 :Розважальник STR_1867 :{BLACK}{COMMA32} {STRINGID} -STR_1868 :Не вдається змінити кількість обертів... +STR_1868 :Не вдається змінити кількість обертів… STR_1869 :{WINDOW_COLOUR_2}Кількість обертів: STR_1870 :Кількість повних обертів STR_1871 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} @@ -1299,7 +1299,7 @@ STR_1920 :Can’t pay back loan! STR_1921 :Почати нову гру STR_1922 :Продовжити грати в збережену гру STR_1924 :Вихід -STR_1925 :Не можна помістити сюди людину... +STR_1925 :Не можна помістити сюди людину… STR_1927 :{YELLOW}{STRINGID} вийшло з ладу STR_1928 :{RED}{STRINGID} розбилося! STR_1929 :{RED}{STRINGID} досі не полагоджено {NEWLINE}Перевірте, де знаходяться ваші механіки, і подумайте над тим, як їх краще організувати @@ -2916,7 +2916,7 @@ STR_5755 :Неправильна версія ПЗ (сервер викори STR_5756 :Поганий пароль STR_5757 :Сервер заповнений STR_5758 :{OUTLINE}{GREEN}{STRING} приєднується до гри -STR_5759 :Завантаження мапи… ({INT32} / {INT32}) Кб +STR_5759 :Завантаження мапи… STR_5760 :Гонконзький долар (HK$) STR_5761 :Новий тайванський долар (NT$) STR_5762 :Китайський юань (CN¥) @@ -3480,7 +3480,7 @@ STR_6374 :C STR_6375 :Невідомий атракціон STR_6376 :{WINDOW_COLOUR_2}Ride vehicle:{NEWLINE}{BLACK}{STRINGID} for {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Тип: {BLACK}{STRINGID} для {STRINGID} -STR_6378 :Отримання списку об’єктів {INT32} / {INT32} +STR_6378 :Отримання списку об’єктів STR_6379 :Отримано недійсні дані STR_6380 :Доступне нове оновлення! STR_6381 :Приєднатися до Discord OpenRCT2! @@ -3489,7 +3489,7 @@ STR_6383 :Відкрити сторінку завантаження STR_6384 :Снігопад STR_6385 :Сильний снігопад STR_6386 :Завірюха -STR_6387 :Не вдається опустити елемент тут... +STR_6387 :Не вдається опустити елемент тут… STR_6388 :Не вдається підняти елемент тут… STR_6389 :Invalid clearance STR_6390 :Для роботи OpenRCT2 потрібні файли з оригінальної гри RollerCoaster Tycoon 2 або RollerCoaster Tycoon Classic. Будь ласка, оберіть теку, до якої ви встановили RollerCoaster Tycoon 2 або RollerCoaster Tycoon Classic. @@ -3720,7 +3720,7 @@ STR_6614 :Не можна змінити ціну на вхід STR_6615 :Доріжка на цьому тайлі потребує води STR_6616 :Цьому типу персоналу дія недопустима STR_6617 :Неможливо замінити елемент тайлу тим же елементом -STR_6618 :Не вдається обмежити/зняти обмеження об'єкту... +STR_6618 :Не вдається обмежити/зняти обмеження об'єкту… STR_6619 :Тип об'єкту неможливо обмежити! STR_6620 :Об'єкт не знайдено! STR_6621 :Обмежити @@ -3730,6 +3730,9 @@ STR_6624 :Інспектор тайлів: Сортувати елемент STR_6625 :Невірний колір STR_6626 :Анімація йде задом наперед +STR_6642 :{STRING} ({COMMA32} / {COMMA32}) +STR_6643 :{STRING} ({COMMA32} / {COMMA32} Кб) + ############# # Scenarios # ################ @@ -4295,87 +4298,87 @@ STR_DTLS :Build the missing Six Flags rides, or create your own designs to im ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - African Diamond Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :You inherited a disused diamond mine, and find a valuable diamond. You decide to invest that money to build a world-famous theme park. -STR_SCNR :Africa - Oasis +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :A desert Oasis has been discovered and would provide a beautiful location for a park. Transport to the oasis has been provided. -STR_SCNR :Africa - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :A dam has been built offering abundant, cheap hydroelectric power with which to run a park. You need to reach a high park value to help repay the loan for the dam. -STR_SCNR :Antarctic - Ecological Salvage +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :The environment agency has turned to you to transform an old oil refinery ecological eyesore into a top tourist attraction. Land is cheap but loan interest is high. You can sell the old buildings for salvage. -STR_SCNR :Asia - Great Wall of China Tourism Enhancement +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :The authorities have decided to enhance tourism around the Great Wall by building a theme park on the adjacent land. Money is no object! -STR_SCNR :Asia - Japanese Coastal Reclaim +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :An existing park has run out of space. Your only option is to build out into the sea, and so you have taken out a loan. Height restrictions on your building are enforced due to foundations and earthquake risk. -STR_SCNR :Asia - Maharaja Palace +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :You have been commissioned by the Maharaja to bring entertainment to the large local population. Build a park inspired by the Maharaja’s palace. -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :You are helping Aboriginal people to build a park as part of a cultural awareness program. You need to get a large number of guests to educate them in the unique heritage of the Aboriginal people. -STR_SCNR :Australasia - Fun at the Beach +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :A local entrepreneur’s sealife park has gone bust. You already operate a small park and buy the other park from the construction company. Develop a big combined park. -STR_SCNR :Europe - European Cultural Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :You have been brought in to take over a European Cultural Visitor Attraction and must increase the number of guests in order to pay back the EU subsidy by the end of the current European parliament term. -STR_SCNR :Europe - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :An old park has fallen into disrepair. You gain a European Union grant to return this deprived area to its former glory! You need to renovate the park and repay the grant. -STR_SCNR :North America - Extreme Hawaiian Island +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :The people of Hawaii are bored of surfing and are looking for something more intense. You need to build a park with this in mind to keep the area’s tourist attraction rating high. -STR_SCNR :North America - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :You have to build a park on limited land either side of this natural treasure - you do have the opportunity to buy neighbouring land from the Native American Indians. You need to complete the objective to sustain the local town’s population. -STR_SCNR :North America - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :You are a successful business tycoon on long sabbatical who desires to use this time transforming the city park into Rollercoaster Heaven. Money is no object! -STR_SCNR :South America - Inca Lost City +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :To further boost local tourism you must construct a park that is in tune with its surroundings, and has height restrictions. -STR_SCNR :South America - Rain Forest Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Space is limited in the precious rainforest - you must cram as much as possible into the existing clearing, in order to provide a viable alternative to the local timber industry. -STR_SCNR :South America - Rio Carnival +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :You run a small park near Rio but the bank has called in your loan. You need to quickly increase your earning capacity to repay this unexpected debt. @@ -4383,72 +4386,72 @@ STR_DTLS :You run a small park near Rio but the bank has called in your loan. ## Time Twister Scenarios ############################################################################### -STR_SCNR :Dark Age - Castle +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Local members of the battle re-enactment society are rather serious about their hobby. They’ve entrusted you with the job of constructing a Dark Age theme park on the grounds of Cliffside Castle. -STR_SCNR :Dark Age - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :To liberate wealth from the rich and distribute it to the needy, you and your Merry Men have decided to build a theme park in Sherwood Forest. -STR_SCNR :Future - First Encounters +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Life has been discovered on a distant planet Build an alien theme park to cash in on the unprecedented wave of interest. -STR_SCNR :Future - Future World +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Show off your inventive, utopian vision of the future - come up with a futuristic park design that incorporates state-of-the-art attractions. -STR_SCNR :Mythological - Animatronic Film Set +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :You have been given the task of running and improving an existing theme park, which has been built on an old film set. Build a tribute to the pioneering stop-motion animators who first brought mythical creatures to life on the silver screen. -STR_SCNR :Mythological - Cradle of Civilisation +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :You own an island of particular archaeological value. You’ve decided to fund its preservation by constructing a theme park based on the area’s rich Mythological heritage. -STR_SCNR :Prehistoric - After the Asteroid +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :You own a dusty old meteor crater. In the true entrepreneurial spirit, you’ve decided to construct an asteroid theme park and convert your seemingly worthless land into a sizeable fortune. -STR_SCNR :Prehistoric - Jurassic Safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :You’ve been given the task of constructing a Jurassic era theme park. To optimize your visitors’ access to the exotic plant and animal exhibits, you will need to build rides going over and into the valley. -STR_SCNR :Prehistoric - Stone Age +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :To thwart the highway developers and preserve the mysterious ancient stone circles, you will need to construct a Stone Age theme park and turn a profit. However, attracting visitors may pose a challenge, as the terrain is a tad inhospitable. -STR_SCNR :Roaring Twenties - Prison Island +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :The infamous Prison Island - whose population once swelled with bootleggers and racketeers - is now up for sale. You’ve decided to convert it into a top tourist attraction, and money is no object -STR_SCNR :Roaring Twenties - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :The 75th anniversary of your grandfather’s Schneider Cup victory is coming up in a few years. You’re going to honour his achievement by building a theme park based on the famous seaplane race. -STR_SCNR :Roaring Twenties - Skyscrapers +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :You own an empty lot near the low-rise part of town. To squeeze the most out of your urban property, build a skyscraper theme park inspired by the soaring art deco architecture of the twenties. -STR_SCNR :Rock ‘n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :A large annual music festival takes place on your land. Build a hip theme park to keep the free-spirited audience entertained. -STR_SCNR :Rock ‘n’ Roll - Rock ‘n’ Roll +STR_SCNR :Rock ‘n’ Roll Revival STR_PARK :Rock ‘n’ Roll Revival STR_DTLS :This aging theme park has seen better days. Help the owner give it a retro rock ‘n’ roll makeover and turn the place into a successful venue. @@ -4517,7 +4520,7 @@ STR_DTLS :Ого! Подивіться, куди нас занесла маш STR_SCNR :Перетворення STR_PARK :Перетворення -STR_DTLS :Ми чекали на тебе...{NEWLINE}Автор: Fossil +STR_DTLS :Ми чекали на тебе…{NEWLINE}Автор: Fossil STR_SCNR :Невпізнаний Урбіс diff --git a/data/language/vi-VN.txt b/data/language/vi-VN.txt index bbbdac5a0f..a514eb0d2d 100644 --- a/data/language/vi-VN.txt +++ b/data/language/vi-VN.txt @@ -1085,7 +1085,7 @@ STR_1700 :Thuê thêm lao công STR_1701 :Thuê thêm kỹ sư STR_1702 :Thuê thêm bảo vệ STR_1703 :Thuê thêm hoạt náo -STR_1704 :Không thể thuê thêm nhân viên... +STR_1704 :Không thể thuê thêm nhân viên… STR_1705 :Sa thải nhân viên này STR_1706 :Di chuyển người này STR_1707 :Có quá nhiều nhân viên @@ -2881,7 +2881,7 @@ STR_5755 :Incorrect Software Version (Server is using {STRING}) STR_5756 :Bad Password STR_5757 :Server Full STR_5758 :{OUTLINE}{GREEN}{STRING} has joined the game -STR_5759 :Downloading map … ({INT32} / {INT32}) KiB +STR_5759 :Downloading map … STR_5760 :Hong Kong Dollars (HK$) STR_5761 :New Taiwan Dollar (NT$) STR_5762 :Chinese Yuan (CN¥) @@ -3445,7 +3445,7 @@ STR_6374 :C STR_6375 :Unknown Ride STR_6376 :{WINDOW_COLOUR_2}Ride vehicle:{NEWLINE}{BLACK}{STRINGID} for {STRINGID} STR_6377 :{WINDOW_COLOUR_2}Type: {BLACK}{STRINGID} for {STRINGID} -STR_6378 :Receiving objects list: {INT32} / {INT32} +STR_6378 :Receiving objects list: STR_6379 :Received invalid data STR_6380 :Update available! STR_6381 :Join OpenRCT2 Discord! @@ -4092,87 +4092,87 @@ STR_DTLS :Build the missing Six Flags rides, or create your own designs to im ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - African Diamond Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :You inherited a disused diamond mine, and find a valuable diamond. You decide to invest that money to build a world-famous theme park. -STR_SCNR :Africa - Oasis +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :A desert Oasis has been discovered and would provide a beautiful location for a park. Transport to the oasis has been provided. -STR_SCNR :Africa - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :A dam has been built offering abundant, cheap hydroelectric power with which to run a park. You need to reach a high park value to help repay the loan for the dam. -STR_SCNR :Antarctic - Ecological Salvage +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :The environment agency has turned to you to transform an old oil refinery ecological eyesore into a top tourist attraction. Land is cheap but loan interest is high. You can sell the old buildings for salvage. -STR_SCNR :Asia - Great Wall of China Tourism Enhancement +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :The authorities have decided to enhance tourism around the Great Wall by building a theme park on the adjacent land. Money is no object! -STR_SCNR :Asia - Japanese Coastal Reclaim +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :An existing park has run out of space. Your only option is to build out into the sea, and so you have taken out a loan. Height restrictions on your building are enforced due to foundations and earthquake risk. -STR_SCNR :Asia - Maharaja Palace +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :You have been commissioned by the Maharaja to bring entertainment to the large local population. Build a park inspired by the Maharaja’s palace. -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :You are helping Aboriginal people to build a park as part of a cultural awareness program. You need to get a large number of guests to educate them in the unique heritage of the Aboriginal people. -STR_SCNR :Australasia - Fun at the Beach +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :A local entrepreneur’s sealife park has gone bust. You already operate a small park and buy the other park from the construction company. Develop a big combined park. -STR_SCNR :Europe - European Cultural Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :You have been brought in to take over a European Cultural Visitor Attraction and must increase the number of guests in order to pay back the EU subsidy by the end of the current European parliament term. -STR_SCNR :Europe - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :An old park has fallen into disrepair. You gain a European Union grant to return this deprived area to its former glory! You need to renovate the park and repay the grant. -STR_SCNR :North America - Extreme Hawaiian Island +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :The people of Hawaii are bored of surfing and are looking for something more intense. You need to build a park with this in mind to keep the area’s tourist attraction rating high. -STR_SCNR :North America - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :You have to build a park on limited land either side of this natural treasure - you do have the opportunity to buy neighbouring land from the Native American Indians. You need to complete the objective to sustain the local town’s population. -STR_SCNR :North America - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :You are a successful business tycoon on long sabbatical who desires to use this time transforming the city park into Rollercoaster Heaven. Money is no object! -STR_SCNR :South America - Inca Lost City +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :To further boost local tourism you must construct a park that is in tune with its surroundings, and has height restrictions. -STR_SCNR :South America - Rain Forest Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Space is limited in the precious rainforest - you must cram as much as possible into the existing clearing, in order to provide a viable alternative to the local timber industry. -STR_SCNR :South America - Rio Carnival +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :You run a small park near Rio but the bank has called in your loan. You need to quickly increase your earning capacity to repay this unexpected debt. @@ -4180,72 +4180,72 @@ STR_DTLS :You run a small park near Rio but the bank has called in your loan. ## Time Twister Scenarios ############################################################################### -STR_SCNR :Dark Age - Castle +STR_SCNR :Cliffside Castle STR_PARK :Cliffside Castle STR_DTLS :Local members of the battle re-enactment society are rather serious about their hobby. They’ve entrusted you with the job of constructing a Dark Age theme park on the grounds of Cliffside Castle. -STR_SCNR :Dark Age - Robin Hood +STR_SCNR :Sherwood Forest STR_PARK :Sherwood Forest STR_DTLS :To liberate wealth from the rich and distribute it to the needy, you and your Merry Men have decided to build a theme park in Sherwood Forest. -STR_SCNR :Future - First Encounters +STR_SCNR :Extraterrestrial Extravaganza STR_PARK :Extraterrestrial Extravaganza STR_DTLS :Life has been discovered on a distant planet Build an alien theme park to cash in on the unprecedented wave of interest. -STR_SCNR :Future - Future World +STR_SCNR :Gemini City STR_PARK :Gemini City STR_DTLS :Show off your inventive, utopian vision of the future - come up with a futuristic park design that incorporates state-of-the-art attractions. -STR_SCNR :Mythological - Animatronic Film Set +STR_SCNR :Animatronic Antics STR_PARK :Animatronic Antics STR_DTLS :You have been given the task of running and improving an existing theme park, which has been built on an old film set. Build a tribute to the pioneering stop-motion animators who first brought mythical creatures to life on the silver screen. -STR_SCNR :Mythological - Cradle of Civilisation +STR_SCNR :Mythological Madness STR_PARK :Mythological Madness STR_DTLS :You own an island of particular archaeological value. You’ve decided to fund its preservation by constructing a theme park based on the area’s rich Mythological heritage. -STR_SCNR :Prehistoric - After the Asteroid +STR_SCNR :Crater Carnage STR_PARK :Crater Carnage STR_DTLS :You own a dusty old meteor crater. In the true entrepreneurial spirit, you’ve decided to construct an asteroid theme park and convert your seemingly worthless land into a sizeable fortune. -STR_SCNR :Prehistoric - Jurassic Safari +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :You’ve been given the task of constructing a Jurassic era theme park. To optimize your visitors’ access to the exotic plant and animal exhibits, you will need to build rides going over and into the valley. -STR_SCNR :Prehistoric - Stone Age +STR_SCNR :Rocky Rambles STR_PARK :Rocky Rambles STR_DTLS :To thwart the highway developers and preserve the mysterious ancient stone circles, you will need to construct a Stone Age theme park and turn a profit. However, attracting visitors may pose a challenge, as the terrain is a tad inhospitable. -STR_SCNR :Roaring Twenties - Prison Island +STR_SCNR :Alcatraz STR_PARK :Alcatraz STR_DTLS :The infamous Prison Island - whose population once swelled with bootleggers and racketeers - is now up for sale. You’ve decided to convert it into a top tourist attraction, and money is no object -STR_SCNR :Roaring Twenties - Schneider Cup +STR_SCNR :Schneider Shores STR_PARK :Schneider Shores STR_DTLS :The 75th anniversary of your grandfather’s Schneider Cup victory is coming up in a few years. You’re going to honour his achievement by building a theme park based on the famous seaplane race. -STR_SCNR :Roaring Twenties - Skyscrapers +STR_SCNR :Metropolis STR_PARK :Metropolis STR_DTLS :You own an empty lot near the low-rise part of town. To squeeze the most out of your urban property, build a skyscraper theme park inspired by the soaring art deco architecture of the twenties. -STR_SCNR :Rock ‘n’ Roll - Flower Power +STR_SCNR :Woodstock STR_PARK :Woodstock STR_DTLS :A large annual music festival takes place on your land. Build a hip theme park to keep the free-spirited audience entertained. -STR_SCNR :Rock ‘n’ Roll - Rock ‘n’ Roll +STR_SCNR :Rock ‘n’ Roll Revival STR_PARK :Rock ‘n’ Roll Revival STR_DTLS :This aging theme park has seen better days. Help the owner give it a retro rock ‘n’ roll makeover and turn the place into a successful venue. diff --git a/data/language/zh-CN.txt b/data/language/zh-CN.txt index d888f5e3fa..7e53e8eda2 100644 --- a/data/language/zh-CN.txt +++ b/data/language/zh-CN.txt @@ -62,7 +62,7 @@ STR_0057 :多维过山车 STR_0058 :未知游乐设施 (38) STR_0059 :飞翔过山车 STR_0060 :未知游乐设施 (3A) -STR_0061 :弗吉尼亚卷轴 +STR_0061 :弗吉尼亚卷轴过山车 STR_0062 :激流勇进 STR_0063 :迷你直升机 STR_0064 :躺卧式过山车 @@ -103,84 +103,84 @@ STR_0512 :一种紧凑的过山车,有着螺旋状的爬升和平滑盘旋 STR_0513 :乘客采用站立方式乘坐的过山车,全身都能感受到翻滚时血液在体内的涌动 STR_0514 :一种转弯的时候会自行产生离心运动,车厢可自由摆动的过山车 STR_0515 :一种车厢在轨道下方的铁制的过山车,同时附有复杂且扭曲的轨道元素 -STR_0516 :一种在各方面都比较缓和的过山车,适合不擅长乘着过山车的乘坐 -STR_0517 :乘客乘坐小型列车沿着一条窄轨道前进 -STR_0518 :乘客乘坐电车沿着一条单轨铁道 -STR_0519 :乘客乘坐悬挂在单轨轨道下方的车厢,在拐角处从一侧到另一侧自由摆动 -STR_0520 :一个码头,允许游客在水上驾驶/划船 -STR_0521 :快速且扭曲的过山车,紧凑地转弯,陡峭地下落造就了极高的刺激度。 +STR_0516 :一种在各方面都比较缓和的过山车,适合还没有勇气面对大型游乐设施的游客 +STR_0517 :乘客乘坐小型列车沿着一条窄轨道行驶 +STR_0518 :乘客乘坐电车沿着单轨铁道行驶 +STR_0519 :乘客乘坐悬挂在单轨轨道下的小车厢,在拐角处左右自由摆动 +STR_0520 :供游客在水体上驾驶/划行个人水上摩托艇的码头平台 +STR_0521 :快速曲折的过山车,其紧凑的转弯和陡峭的落差造就了极高的强度。 STR_0522 :一款较小型的过山车,乘客坐在轨道上而并没有其他车包围他们 STR_0523 :乘客会坐在有动力的车辆内,慢慢地依照轨道进行观光游览 STR_0524 :自由落体的车辆会被气体喷射到高塔顶,并随后自由落下 STR_0525 :乘客飞驰在扭曲的轨道上,只靠弯道及半月型的轨道引领他们 -STR_0526 :乘客会在不断旋转并上升到最顶的座舱内观看乐园景色 -STR_0527 :一款以顺滑轨道为特征的过山车,并附有垂直回环可供使用 +STR_0526 :乘客会在不断旋转并上升到最顶的座舱内观看游乐园景色 +STR_0527 :平稳的钢轨过山车,可进行垂直回环 STR_0528 :乘客坐在充气小艇中于半月型或完全封闭的轨道上滑翔 -STR_0529 :以采矿列车为主题的过山车沿着铁架轨道行驶,令它很像在古老的轨道行驶上 +STR_0529 :以矿山火车为主题的过山车列车,在设计为旧时铁路的钢制轨道上行驶 STR_0530 :列车悬挂在钢缆下并不断于车站与车站之间游走 STR_0531 :一款列车会穿过螺旋及回环的较小型过山车 STR_0532 :游客在动力车辆中沿着基于轨道的路线缓慢行驶 STR_0533 :自由落体汽车先被气动发射到高高的钢塔上再自由落体 STR_0534 :自驾式,并以气油驱动的小型赛车(卡丁车) -STR_0535 :以运木为形状的小船穿梭于有水的轨道,并会于下滑时溅湿游客 -STR_0536 :圆形的小船穿梭于比较广阔的水道,于水道中被瀑布溅湿,并有激流使乘客的紧张感大增 -STR_0537 :游客在电动躲避车中相互碰撞 -STR_0538 :大型的摇摆海盗船 -STR_0539 :船连接在另一端装有配重的柱子上,进行360度旋转 +STR_0535 :小船穿梭于有水的轨道,会在冲下陡坡时激起水花浸湿乘客 +STR_0536 :环形小船沿着宽阔的水道蜿蜒前行、穿过瀑布,激流汹涌,令游客惊心动魄 +STR_0537 :游客在电动碰碰车中相互碰撞 +STR_0538 :大型摇摆海盗船 +STR_0539 :船体连接在另一端装有配重的柱子上,进行360度旋转 STR_0540 :客人可以购买食物的摊位 STR_0542 :客人可以购买饮料的摊位 -STR_0544 :卖纪念品的摊位 +STR_0544 :售卖纪念品的摊位 STR_0545 :带有精雕细刻的木马的传统旋转木马 STR_0547 :客人可以获得公园地图和购买雨伞的摊位 STR_0548 :供客人排泄的建筑物 -STR_0549 :带开放式椅子的旋转大轮子 +STR_0549 :带开放式椅子的旋转大转盘 STR_0550 :游客在被液压臂扭曲和移动的运动模拟器吊舱内观看电影 STR_0551 :在球形建筑内放映3D电影的电影院 STR_0552 :乘客乘坐由大型旋转臂悬挂的吊舱中旋转 -STR_0553 :允许游客在左右和前后方向自由旋转 -STR_0554 :列车会被又长又直的轨道上的直线发动机加速,然后衝上垂直轨道,自由落体后回到车站 -STR_0555 :游客乘搭升降机上下穿梭于垂直的管道中,并借此访问另一层 +STR_0553 :同心枢轴环允许乘客向各个方向自由旋转 +STR_0554 :利用线性感应电机,汽车沿着长长的水平轨道加速驶出车站,然后直冲轨道上的垂直尖峰,再自由落体返回车站 +STR_0555 :游客乘搭升降机上下穿梭于垂直的管道中,并到达另一个楼层 STR_0556 :加阔的列车于垂直下坡上完全滑落,给予人终极的过山车自由落体体验 -STR_0557 :ATM自动柜员机,允许顾客从自己的银行账户中取出现金 +STR_0557 :一台自动取款机(ATM),供客人在资金不足时提现 STR_0558 :游客乘坐成对的座椅,围绕三个长旋转臂的末端旋转 -STR_0559 :大型主题建筑,包含可怕的走廊和诡异的房间 +STR_0559 :大型主题建筑,设有可怕的走廊和诡异的房间 STR_0560 :生病的客人可以更快康复的地方 STR_0561 :大帐篷内的马戏团动物表演 -STR_0562 :有动力的车辆将会穿梭于有著恐怖景物及特效的多层轨道中 -STR_0563 :乘客坐在舒适并只有简单安全装备的列车上享受巨大而顺滑的下滑,扭曲的轨道和充足的“空中”时间 -STR_0564 :一款在木製轨道运行的过山车,这个过山车会嘈吵地飞驰过高低不平的轨道,给乘客充足的“空中时间”之馀,同时会给人一种“失去控制”的乘坐体验 -STR_0565 :一款只能使用普通下坡及弯道的简单木製过山车,车辆只靠产生轨道阻力的车轮及重力滑翔于轨道上 -STR_0566 :每辆单独的过山车都会游走在附有急弯及急短下坡的Z型轨道上 -STR_0567 :乘客坐在悬挂在轨道的不同位置下,衝下陡下坡及各种倒转轨道时,会被翻腾得四脚朝天 -STR_0569 :乘客将会乘坐在轨道下的特别繫带,在空中盘旋时体验飞一般的感受 -STR_0571 :圆型的车辆于他们行走在Z型轨道上被不停的转动 -STR_0572 :载客量大的小船游走于宽敞的水道上,由输送带送他们上坡,并于下坡中加速,务求溅出巨型的水花令到乘客全身湿透 -STR_0573 :有动力的直升机型车辅于钢轨上游走,他们由乘客的脚踏所控制 -STR_0574 :乘客躺卧在特别繫带中,以他们面向的背或头游走于曲折的轨道及翻转 -STR_0575 :有动力的列车悬挂在单轨下运送乘客到乐园内的不同地方 -STR_0577 :拥有转向架的车辅于木製轨道上,被特别的倒转装置转向 -STR_0578 :车辆运行于O型的轨道中,并会穿过陡下坡及横滚轨道 +STR_0562 :有动力的车辆将会穿梭于有着恐怖景物及特效的多层轨道中 +STR_0563 :乘客坐在舒适并只有简单腿部束缚的列车上享受巨大而顺滑的下滑,扭曲的轨道和充足的失重感 +STR_0564 :一款在木制轨道运行的过山车,这个过山车会嘈吵地飞驰过高低不平的轨道,给乘客充足的失重感之余,同时会给人一种“失去控制”的乘坐体验 +STR_0565 :一款只能使用普通下坡及弯道的简单木制过山车,车厢只能依靠侧摩擦轮和重力保持在轨道上 +STR_0566 :单个过山车车厢在紧凑的“之”字形轨道上滑行,轨道上有急转弯和短距离急降 +STR_0567 :乘客坐在悬挂在轨道两侧的座椅上,冲下陡坡及各种倒转轨道时,会被翻腾得四脚朝天 +STR_0569 :乘客将会乘坐在轨道下的特制安全绳索,在空中盘旋时体验飞一般的感受 +STR_0571 :环形车厢在“之”字形木质轨道上旋转行驶 +STR_0572 :载客量大的小船游走于宽敞的水道上,由履带送他们上坡,并于下坡中加速,溅出巨大的水花让乘客全身湿透 +STR_0573 :在钢制轨道上行驶的动力直升机形汽车,由乘客踩踏控制 +STR_0574 :乘客躺卧在特制的安全绳索中,或躺或趴游走于曲折的轨道及翻转 +STR_0575 :有动力的列车悬挂在单轨下运送乘客到游乐园内的不同地方 +STR_0577 :拥有转向架的车辅于木制轨道上,被特别的倒转装置转向 +STR_0578 :车辆运行于环型的轨道中,并会穿过陡下坡及横滚轨道 STR_0579 :一场轻松的迷你高尔夫比赛 -STR_0580 :一款可建造顺滑下坡及高达300英尺坡道的巨型铁製过山车 -STR_0581 :围绕著塔的座位会在不断慢慢旋转中被拉至塔顶,然后便自由落体,再被有磁力的煞车装置慢慢煞停于站台 -STR_0582 :客人乘坐他们控制的气垫船 -STR_0583 :包含扭曲的房间和倾斜的走廊的建筑物,以使人们迷失方向,貌似某只黑白色的老鼠很喜欢邀请别人去玩 -STR_0584 :运行在铁製单轨上的特别单车,像一般单车一样,会被乘客踏行 -STR_0585 :乘客坐在轨道悬挂下的一对对的座位经历被紧密的轨道上旋转及迴转 -STR_0586 :船型的车辆行驶于过山车的轨道上,允许他们能够拥有扭曲式的弯道陡下坡等轨道配置,更会被普通的水道所溅湿 -STR_0587 :过山车列车被令人胆跳心惊的气动发车加速衝上垂直轨道后,穿过最顶,然后垂直下落到另一边回到车站 -STR_0588 :每辆单独的过山车游走在附有髮夹弯及急下坡的Z型轨道上 +STR_0580 :一款可建造顺滑下坡及高达300英尺坡道的巨型钢制过山车 +STR_0581 :围绕着塔的座位会在不断慢慢旋转中被拉至塔顶,然后便自由落体,再被有磁力的刹车装置慢慢刹停于站台 +STR_0582 :客人乘坐他们自由控制的气垫船 +STR_0583 :设有扭曲房间和倾斜走廊的建筑物,使穿过的人迷失方向(貌似某只黑白色的老鼠很喜欢邀请别人去玩) +STR_0584 :运行在钢制单轨上的特制自行车,由骑行者踩踏推动 +STR_0585 :乘客坐在轨道悬挂下的一对对的座位,经历紧密的轨道上循环和扭转 +STR_0586 :船型的车辆行驶于过山车的轨道上,可实现曲折的弯道和陡峭的下坡,并俯冲滑过水道进入平缓的河段 +STR_0587 :在令人兴奋的空气动力发射后,列车在垂直轨道上加速,越过顶部,从另一侧垂直向下,返回车站 +STR_0588 :单个过山车车厢游走在附有髮夹弯和急下坡的“之”字形轨道上 STR_0589 :大型的飞毯主题载具在4个手臂末端循环上下移动 STR_0590 :乘客在潜艇中观赏水底的景观 -STR_0591 :木筏造型船于河道上慢慢地游览著 +STR_0591 :筏形小船在河道上缓缓蜿蜒 STR_0593 :带有悬挂乘客吊舱的旋转轮,首先开始旋转,然后由支撑臂向上倾斜 -STR_0598 :反转式过山车加速离开车站,穿过到垂直轨道的尖端,然后倒转返回到车站,再穿越到另一边垂直轨道的尖端 -STR_0599 :一款拥有独立车辆及顺滑又弯曲的下坡的紧凑式过山车 -STR_0600 :有动车的採矿列车游走在顺滑但又曲折的轨道配置中 -STR_0602 :过山车列车由直线发动机加速离开车站,穿过盘绕的倒转轨道后回到车站 -STR_0603 :带有钢轨的木制过山车,允许陡峭的下降和倒置 -STR_0604 :游客在狭窄的单轨轨道上单排骑行,就像他们在激烈的倒转和方向变化中进行比赛 -STR_0605 :游客在蜿蜒的钢制赛道上滑行,以控制他们的速度 +STR_0598 :反转式过山车加速驶出车站,沿着垂直的轨道直冲云霄,然后倒车返回车站,再沿着另一条垂直的轨道冲向顶端 +STR_0599 :一款紧凑型过山车,配备独立车厢和平滑曲折的下坡 +STR_0600 :动力矿车在平滑曲折的轨道上行驶 +STR_0602 :过山车列车在线性感应电机的加速下驶出车站,并飞速通过曲折的倒转装置 +STR_0603 :带有钢轨的木制过山车,允许陡峭的下坡和倒转 +STR_0604 :乘客在狭窄的单轨列车轨道上单列行驶,在紧张的倒立和方向变化中竞速 +STR_0605 :乘客乘坐雪橇在蜿蜒的钢轨上滑行,通过刹车控制速度 STR_0606 :一个拥有老式风格的木质过山车,它拥有快速且粗糙质感的车厢、大量的失重感以及侧向加速度,这些设计使得乘客感到“失去控制”般的刺激。 STR_0607 :一款紧张刺激的老式钢制环形过山车,乘客以站立姿势乘坐 STR_0767 :游客{INT32} @@ -233,14 +233,14 @@ STR_0818 :9月 STR_0819 :10月 STR_0820 :11月 STR_0821 :12月 -STR_0822 :无法访问图形数据 +STR_0822 :无法访问图形数据文件 STR_0823 :数据文件丢失或不可访问 STR_0824 :{BLACK}❌ STR_0825 :该名称已被使用 STR_0826 :过多名称被定义 STR_0827 :现金不足——需要{CURRENCY2DP} STR_0828 :关闭窗口 -STR_0829 :窗口标题——拖拽来移动窗口 +STR_0829 :窗口标题——拖拽以移动窗口 STR_0830 :放大 STR_0831 :缩小 STR_0832 :顺时针旋转90° @@ -248,7 +248,7 @@ STR_0833 :暂停游戏 STR_0834 :磁盘和游戏选项 STR_0839 :{UINT16} × {UINT16} STR_0840 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{UINT16} × {UINT16} -STR_0847 :关于“OpenRCT2” +STR_0847 :关于“开源过山车大亨2(OpenRCT2)” STR_0850 :{WINDOW_COLOUR_2}Copyright © 2002 Chris Sawyer,版权所有 STR_0851 :{WINDOW_COLOUR_2}设计及程序:Chris Sawyer STR_0852 :{WINDOW_COLOUR_2}美术:Simon Foster @@ -271,8 +271,8 @@ STR_0875 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP STR_0876 :{BLACK}▼ STR_0877 :太低了! STR_0878 :太高了! -STR_0879 :不能在这里降低土地… -STR_0880 :不能在这里抬升土地… +STR_0879 :不能在这里降低土地…… +STR_0880 :不能在这里抬升土地…… STR_0881 :被物体挡住了 STR_0882 :加载游戏 STR_0883 :保存游戏 @@ -285,7 +285,7 @@ STR_0891 :截图 STR_0892 :截图 “{STRINGID}” 已保存 STR_0893 :截图失败! STR_0894 :地形数据已满! -STR_0895 :无法在一半地上一半地下的地形中建造 +STR_0895 :不能部分建在地面上,部分建在地下 STR_0896 :{POP16}{POP16}{STRINGID}建造 STR_0897 :方向 STR_0898 :左转 @@ -316,9 +316,9 @@ STR_0922 :陡峭上坡 STR_0923 :垂直上坡 STR_0924 :向下螺旋 STR_0925 :向上螺旋 -STR_0926 :不能移除此物… -STR_0927 :不能在此建造… -STR_0928 :提升坡将会把车厢拉上坡 +STR_0926 :不能移除此物…… +STR_0927 :不能在此建造…… +STR_0928 :牵引链,会把车厢拉上坡 STR_0929 :“S”型弯道(向左) STR_0930 :“S”型弯道(向右) STR_0931 :垂直回环(向左) @@ -366,7 +366,7 @@ STR_0973 :确定 STR_0974 :游乐设施 STR_0975 :商店及摊贩 STR_0976 :洗手间及信息亭 -STR_0977 :新的运输类游乐设施 +STR_0977 :新的交通类游乐设施 STR_0978 :新的温和类游乐设施 STR_0979 :新的过山车类游乐设施 STR_0980 :新的刺激类游乐设施 @@ -376,8 +376,8 @@ STR_0983 :研究及开发 STR_0984 :{WINDOW_COLOUR_2}▲{BLACK} {CURRENCY2DP} STR_0985 :{WINDOW_COLOUR_2}▼{BLACK} {CURRENCY2DP} STR_0986 :{BLACK}{CURRENCY2DP} -STR_0987 :太多游乐设施/店铺 -STR_0988 :不能新建游乐设施/店铺… +STR_0987 :过多游乐设施/店铺 +STR_0988 :不能新建游乐设施/店铺…… STR_0989 :{STRINGID} STR_0990 :建造 STR_0991 :车站站台 @@ -387,43 +387,43 @@ STR_0994 :拆除 STR_0995 :{WINDOW_COLOUR_1}确定要完全拆除{STRINGID}? STR_0996 :整体外观 STR_0997 :视角选择 -STR_0998 :此游乐设施的车站数量已达到上限 +STR_0998 :此游乐设施的站台数量已达到上限 STR_0999 :需要一个车站站台 -STR_1000 :轨道没有连接完整 -STR_1001 :轨道不适合此类型的列车 -STR_1002 :不能开启{STRINGID}… -STR_1003 :不能测试{STRINGID}… -STR_1004 :不能关闭{STRINGID}… -STR_1005 :不能开始建造{STRINGID}… -STR_1006 :必须先关闭 -STR_1007 :不能创建足够的车辆 +STR_1000 :轨道没有形成闭环 +STR_1001 :轨道与列车类型不符 +STR_1002 :无法开启{STRINGID}…… +STR_1003 :无法测试{STRINGID}…… +STR_1004 :无法关闭{STRINGID}…… +STR_1005 :无法开始建造{STRINGID}…… +STR_1006 :关闭后才能操作 +STR_1007 :无法创建足够的车厢 STR_1008 :开放、关闭或测试游乐设施/店铺 STR_1009 :开放或关闭所有游乐设施/店铺 STR_1010 :开放或关闭游乐园 STR_1011 :关闭所有游乐设施 -STR_1012 :开启所有游乐设施 +STR_1012 :开放所有游乐设施 STR_1013 :关闭游乐园 STR_1014 :开放游乐园 -STR_1015 :在此模式下,多于一个车站的游乐设施将无法运行 -STR_1016 :在此模式下,少于两个车站的游乐设施将无法运行 -STR_1017 :不能改变运行模式… -STR_1018 :不能做出改变… -STR_1019 :不能做出改变… -STR_1020 :不能做出改变… +STR_1015 :在此模式下,只能存在一个站台才能运行 +STR_1016 :在此模式下,需要至少两个站台才能运行 +STR_1017 :无法改变运行模式…… +STR_1018 :无法做出改变…… +STR_1019 :无法做出改变…… +STR_1020 :无法做出改变…… STR_1021 :{POP16}{POP16}{POP16}{POP16}{STRINGID} STR_1022 :{POP16}{POP16}{POP16}{COMMA16}车/列车 STR_1023 :{POP16}{POP16}{POP16}{COMMA16}车/列车 STR_1024 :{COMMA16}车/列车 STR_1025 :{COMMA16}车/列车 STR_1026 :车站站台太长! -STR_1027 :将主视定位到此 -STR_1028 :离开地图边缘! -STR_1029 :不能在半水上半水下地形上建造! +STR_1027 :在主视图上定位此位置 +STR_1028 :在地图边缘外! +STR_1029 :不能将建筑部分建在水面上,部分建在水面下! STR_1030 :只能建造在水下! STR_1031 :不能建造在水下! STR_1032 :只能建造在水上! STR_1033 :只能建造在地面以上! -STR_1034 :只能建造在地面! +STR_1034 :只能建造在地上! STR_1035 :当地政府不允许建筑物高度超过树的高度 STR_1036 :加载游戏 STR_1037 :加载地形 @@ -436,30 +436,30 @@ STR_1043 :OpenRCT2 游戏存档 STR_1044 :OpenRCT2 关卡文件 STR_1045 :OpenRCT2 地形文件 STR_1046 :OpenRCT2 轨道设计文件 -STR_1047 :存储游戏失败! -STR_1048 :存储关卡失败! -STR_1049 :存储地形失败! -STR_1050 :加载失败…{NEWLINE}文件中含有不可读取的数据! -STR_1051 :隐藏支撑 +STR_1047 :游戏保存失败! +STR_1048 :关卡保存失败! +STR_1049 :地形保存失败! +STR_1050 :加载失败……{NEWLINE}文件包含无效数据! +STR_1051 :隐藏支撑结构 STR_1052 :隐藏游客 STR_1053 :游乐园内的游乐设施/店铺 STR_1054 :命名游乐设施/店铺 STR_1055 :命名游客 -STR_1056 :命名职员 +STR_1056 :命名工作人员 STR_1057 :游乐设施/店铺名称 STR_1058 :请输入这个游乐设施/店铺的新名字: -STR_1059 :重命名设施/店铺失败… -STR_1060 :无效的设施/店铺名字 +STR_1059 :重命名设施/店铺失败…… +STR_1060 :无效的设施/店铺名 STR_1061 :正常模式 STR_1062 :连续循环模式 STR_1063 :反向倾斜循环发车模式 STR_1064 :动力发车(通过车站) -STR_1065 :循环模式 +STR_1065 :班车模式 STR_1066 :出租小船模式 STR_1067 :向上发车 STR_1068 :旋转上升模式 STR_1069 :站对站模式 -STR_1070 :每次入场单程 +STR_1070 :每次入场可乘坐一次 STR_1071 :每次入场无限次乘坐 STR_1072 :迷宫模式 STR_1073 :赛车模式 @@ -484,19 +484,19 @@ STR_1091 :马戏团表演模式 STR_1092 :向下发车 STR_1093 :古怪小屋模式 STR_1094 :自由落体模式 -STR_1095 :区域刹车连续循环模式 +STR_1095 :区块制动器连续循环模式 STR_1096 :动力发车(不通过车站) -STR_1097 :动力发车区域刹车模式 +STR_1097 :动力发车区块制动器模式 STR_1098 :移动到{POP16}{STRINGID}尾端 -STR_1099 :等待乘客{POP16}{STRINGID} +STR_1099 :正在{POP16}{STRINGID}等待乘客 STR_1100 :等待离开{POP16}{STRINGID} -STR_1101 :离站{POP16}{STRINGID} +STR_1101 :正在离开{POP16}{STRINGID} STR_1102 :以{VELOCITY}行驶 STR_1103 :到达{POP16}{STRINGID} -STR_1104 :卸客{POP16}{STRINGID} +STR_1104 :正在{POP16}{STRINGID}卸客 STR_1105 :以{VELOCITY}行驶 -STR_1106 :毁坏中! -STR_1107 :已毁坏! +STR_1106 :即将撞毁! +STR_1107 :已撞毁! STR_1108 :以{VELOCITY}行驶 STR_1109 :摇摆中 STR_1110 :旋转中 @@ -517,7 +517,7 @@ STR_1124 :开始中 STR_1125 :运行中 STR_1126 :停止中 STR_1127 :卸客中 -STR_1128 :被区域刹车刹停 +STR_1128 :被区块制动器刹停 STR_1129 :全部车辆使用相同颜色 STR_1130 :不同{STRINGID}使用不同颜色 STR_1131 :不同车辆使用不同颜色 @@ -533,30 +533,30 @@ STR_1140 :选择车辆配色主题 STR_1141 :选择需要魔改的车辆/列车 STR_1142 :{MOVE_X}{10}{STRINGID} STR_1143 :»{MOVE_X}{10}{STRINGID} -STR_1144 :不能建造/移动这个游乐设施的入口… -STR_1145 :不能建造/移动这个游乐设施的出口… +STR_1144 :不能建造/移动这个游乐设施的入口…… +STR_1145 :不能建造/移动这个游乐设施的出口…… STR_1146 :尚未建造入口 STR_1147 :尚未建造出口 STR_1148 :四分之一载客量 STR_1149 :二分之一载客量 STR_1150 :四分之三载客量 STR_1151 :满载 -STR_1152 :随意载客 +STR_1152 :随意载客量 STR_1153 :轨道高度标记 STR_1154 :土地高度标记 STR_1155 :道路高度标记 STR_1156 :{MOVE_X}{10}{STRINGID} STR_1157 :✓{MOVE_X}{10}{STRINGID} -STR_1158 :不能移除此物… +STR_1158 :不能移除此物…… STR_1159 :放置景观,花园和其他美化物 STR_1160 :创建/调整湖泊和水体 -STR_1161 :不能放置于此… +STR_1161 :不能放置于此…… STR_1162 :{OUTLINE}{TOPAZ}{STRINGID} STR_1163 :{STRINGID}{NEWLINE}(按右键修改) STR_1164 :{STRINGID}{NEWLINE}(按右键移除) STR_1165 :{STRINGID}——{STRINGID} {COMMA16} -STR_1166 :无法降低此处水位… -STR_1167 :无法升高此处水位… +STR_1166 :无法降低此处水位…… +STR_1167 :无法升高此处水位…… STR_1168 :选项 STR_1169 :(无) STR_1170 :{STRING} @@ -565,8 +565,8 @@ STR_1172 :{YELLOW}{STRINGID} STR_1173 :建造道路和队列线 STR_1174 :被横幅挡住了 STR_1175 :不能在倾斜的小径上建造这个 -STR_1176 :不能在此建造道路… -STR_1177 :不能移除此处道路… +STR_1176 :不能在此建造道路…… +STR_1177 :不能移除此处道路…… STR_1178 :坡道坡度不合适 STR_1179 :被道路挡住了 STR_1180 :不能建造在水下! @@ -586,11 +586,11 @@ STR_1193 :{WINDOW_COLOUR_2}{STRINGID} STR_1194 :已关闭 STR_1195 :测试运行 STR_1196 :开启 -STR_1197 :故障了 -STR_1198 :已毁坏! +STR_1197 :故障 +STR_1198 :已撞毁! STR_1199 :{COMMA16}名游客在游乐设施上 STR_1200 :{COMMA16}名游客在游乐设施上 -STR_1201 :无人在排队 +STR_1201 :没人在排队 STR_1202 :1人在排队 STR_1203 :{COMMA16}人在排队 STR_1204 :{COMMA16}分钟等候时间 @@ -605,14 +605,14 @@ STR_1212 :{WINDOW_COLOUR_2}最长等待时间: STR_1213 :选择发车前最短等待时长 STR_1214 :选择发车前最长等待时长 STR_1215 :{WINDOW_COLOUR_2}与相邻站同步 -STR_1216 :选择是否与所有相邻车站同步发车(为了“赛车”) +STR_1216 :选择是否与所有相邻车站同步发车(用于“赛车”模式) STR_1217 :{COMMA16}秒 STR_1218 :{BLACK}➕ STR_1219 :{BLACK}➖ STR_1220 :出口 STR_1221 :没有入口 STR_1222 :没有出口 -STR_1223 :运输类游乐设施 +STR_1223 :交通类游乐设施 STR_1224 :温和类游乐设施 STR_1225 :过山车 STR_1226 :惊险游乐设施 @@ -728,7 +728,7 @@ STR_1335 :{STRINGID}——入口{POP16}{POP16} STR_1336 :{STRINGID}——车站{POP16}{COMMA16}入口 STR_1337 :{STRINGID}——出口{POP16}{POP16} STR_1338 :{STRINGID}——车站{POP16}{COMMA16}出口 -STR_1339 :{BLACK}暂无测试结果… +STR_1339 :{BLACK}暂无测试结果…… STR_1340 :{WINDOW_COLOUR_2}最高速度:{BLACK}{VELOCITY} STR_1341 :{WINDOW_COLOUR_2}乘坐时间:{BLACK}{STRINGID}{STRINGID}{STRINGID}{STRINGID} STR_1342 :{DURATION} @@ -743,46 +743,46 @@ STR_1350 :{WINDOW_COLOUR_2}最大负垂直加速度:{BLACK}{COMMA2DP32}g STR_1351 :{WINDOW_COLOUR_2}最大负垂直加速度:{OUTLINE}{RED}{COMMA2DP32}g STR_1352 :{WINDOW_COLOUR_2}最大横向加速度:{BLACK}{COMMA2DP32}g STR_1353 :{WINDOW_COLOUR_2}最大横向加速度:{OUTLINE}{RED}{COMMA2DP32}g -STR_1354 :{WINDOW_COLOUR_2}最高下落高度:{BLACK}{LENGTH} +STR_1354 :{WINDOW_COLOUR_2}最大下落高度:{BLACK}{LENGTH} STR_1355 :{WINDOW_COLOUR_2}下落次数:{BLACK}{COMMA16} STR_1356 :{WINDOW_COLOUR_2}倒转次数:{BLACK}{COMMA16} STR_1357 :{WINDOW_COLOUR_2}杆洞次数:{BLACK}{COMMA16} -STR_1358 :{WINDOW_COLOUR_2}总“悬空”时间:{BLACK}{COMMA2DP32}秒 -STR_1359 :{WINDOW_COLOUR_2}等待时间:{BLACK}{COMMA16}分钟 -STR_1360 :{WINDOW_COLOUR_2}等待时间:{BLACK}{COMMA16}分钟 -STR_1361 :不能改变速度… -STR_1362 :不能改变发车速度… +STR_1358 :{WINDOW_COLOUR_2}总失重时长:{BLACK}{COMMA2DP32}秒 +STR_1359 :{WINDOW_COLOUR_2}等待时长:{BLACK}{COMMA16}分钟 +STR_1360 :{WINDOW_COLOUR_2}等待时长:{BLACK}{COMMA16}分钟 +STR_1361 :不能改变速度…… +STR_1362 :不能改变发车速度…… STR_1363 :太高了!无法支撑! STR_1364 :无法再扩展轨道支撑! -STR_1365 :直线翻滚(向左转) -STR_1366 :直线翻滚(向右转) +STR_1365 :直线翻滚(向左) +STR_1366 :直线翻滚(向右) STR_1367 :小型半回环 -STR_1368 :半螺旋(向左转) -STR_1369 :半螺旋(向右转) -STR_1370 :油桶滚(向左转) -STR_1371 :油桶滚(向右转) +STR_1368 :半螺旋(向左) +STR_1369 :半螺旋(向右) +STR_1370 :油桶滚(向左) +STR_1371 :油桶滚(向右) STR_1372 :加速提升坡 -STR_1373 :巨型半环(向左转) -STR_1374 :巨型半环(向右转) +STR_1373 :巨型半环(向左) +STR_1374 :巨型半环(向右) STR_1375 :向上传输 STR_1376 :向下传输 -STR_1377 :心形线滚(向左转) -STR_1378 :心形线滚(向右转) -STR_1379 :逆向(向左转) -STR_1380 :逆向(向右转) -STR_1381 :曲面提升坡(向左转) -STR_1382 :曲面提升坡(向右转) +STR_1377 :心形线滚(向左) +STR_1378 :心形线滚(向右) +STR_1379 :逆向(向左) +STR_1380 :逆向(向右) +STR_1381 :曲面提升坡(向左) +STR_1382 :曲面提升坡(向右) STR_1383 :四分之一回环 STR_1384 :{YELLOW}{STRINGID} STR_1385 :其他轨道选项 -STR_1386 :特殊… -STR_1387 :无法改变土地类型… +STR_1386 :特殊…… +STR_1387 :无法改变土地类型…… STR_1388 :{OUTLINE}{GREEN}+{CURRENCY} STR_1389 :{OUTLINE}{RED}-{CURRENCY} STR_1390 :{CURRENCY2DP} STR_1391 :{RED}{CURRENCY2DP} -STR_1392 :观看游乐设施/ 店铺 -STR_1393 :车辆详细与选项 +STR_1392 :观看游乐设施/店铺 +STR_1393 :车辆详情与选项 STR_1394 :运行选项 STR_1395 :维修选项 STR_1396 :配色选项 @@ -796,12 +796,12 @@ STR_1403 :建造或移动游乐设施出口 STR_1404 :旋转 90° STR_1405 :镜像 STR_1406 :启用/弃用 景物(如果设计附带景物) -STR_1407 :{WINDOW_COLOUR_2}建造此… +STR_1407 :{WINDOW_COLOUR_2}建造这个…… STR_1408 :{WINDOW_COLOUR_2}费用:{BLACK}{CURRENCY} STR_1409 :出口/入口 STR_1410 :垂直高塔 STR_1411 :{STRINGID}挡住了 -STR_1412 :{WINDOW_COLOUR_3}无该类型游乐设施数据记录 +STR_1412 :{WINDOW_COLOUR_3}该类型游乐设施不支持数据记录 STR_1413 :{WINDOW_COLOUR_3}数据将于下一个{STRINGID}离开{STRINGID}后记录 STR_1414 :{BLACK}{DURATION} STR_1415 :{WINDOW_COLOUR_2}速度 @@ -843,7 +843,7 @@ STR_1450 :{INLINE_SPRITE}{09}{20}{00}{00}{SPRITE} {STRINGID}{NEWLINE}({STRI STR_1451 :{STRINGID}{NEWLINE}({STRINGID}) STR_1452 :游客命名 STR_1453 :请输入这名游客的姓名: -STR_1454 :不能命名该游客… +STR_1454 :不能命名该游客…… STR_1455 :无效的游客名字 STR_1456 :{WINDOW_COLOUR_2}花费金额:{BLACK}{CURRENCY2DP} STR_1457 :{WINDOW_COLOUR_2}钱包中金额:{BLACK}{CURRENCY2DP} @@ -857,8 +857,8 @@ STR_1464 :螺旋向上(小) STR_1465 :螺旋向上(大) STR_1466 :螺旋向下(小) STR_1467 :螺旋向下(大) -STR_1468 :职员 -STR_1469 :设施必须要开始和结束于车站 +STR_1468 :工作人员 +STR_1469 :设施必须要开始并结束于车站 STR_1470 :车站长度过短 STR_1471 :{WINDOW_COLOUR_2}速度: STR_1472 :此车速度 @@ -872,7 +872,7 @@ STR_1479 :{WINDOW_COLOUR_2}恶心度:{BLACK}暂无 STR_1480 :“我负担不起{STRINGID}” STR_1481 :“我把钱花光了” STR_1482 :“我感到不舒服” -STR_1483 :“我好难受” +STR_1483 :“我非常难受” STR_1484 :“我想试试比{STRINGID}更刺激的” STR_1485 :“对我来说{STRINGID}看起来太过刺激了” STR_1486 :“我还没玩过{STRINGID}呢” @@ -887,29 +887,29 @@ STR_1494 :“我还不渴” STR_1495 :“救命! 我溺水了!” STR_1496 :“我迷路了!” STR_1497 :“{STRINGID}很棒!” -STR_1498 :“我等候在这{STRINGID}太久了,什么时候才轮到我啊 ” +STR_1498 :“我等候在这{STRINGID}太久了,什么时候才轮到我啊?” STR_1499 :“我累了” STR_1500 :“我饿了” STR_1501 :“我渴了” STR_1502 :“我需要去厕所” STR_1503 :“我找不到{STRINGID}” STR_1504 :“我才没有那么多钱去{STRINGID}” -STR_1505 :“我不想去{STRINGID}因为那里在下雨” +STR_1505 :“我不想去{STRINGID},因为那里在下雨” STR_1506 :“这里是垃圾场吗?” -STR_1507 :“哎?这个乐园的出口在哪?” +STR_1507 :“哎?游乐园的出口在哪?” STR_1508 :“我想现在就从{STRINGID}下去” STR_1509 :“我想离开{STRINGID}” STR_1510 :“我不想去{STRINGID},感觉它随时都会出问题” STR_1511 :“这路好恶心!” STR_1512 :“这里怎么这么多人!” -STR_1513 :“这里有好多配破坏的东西” +STR_1513 :“这里有好多被破坏的东西” STR_1514 :“壮丽的景色!” STR_1515 :“这个公园真的很干净” STR_1516 :“跳跃喷泉太好了” STR_1517 :“这里的音乐很好” STR_1518 :“这个{STRINGID}的气球好便宜” STR_1519 :“这个{STRINGID}的毛绒公仔好便宜” -STR_1520 :“这个{STRINGID}的乐园地图好便宜” +STR_1520 :“这个{STRINGID}的游乐园地图好便宜” STR_1521 :“这个{STRINGID}的即时照片好便宜” STR_1522 :“这个{STRINGID}的伞好便宜” STR_1523 :“这个{STRINGID}的饮料好便宜” @@ -1037,10 +1037,10 @@ STR_1644 : STR_1645 : STR_1646 : STR_1647 : -STR_1648 :“救命! 放我下来!” +STR_1648 :“救命!放我下来!” STR_1649 :“我没有现金了!” STR_1650 :“喔!一个新的设施正在建造中!” -STR_1653 :“…现在我们已经在{STRINGID}上!” +STR_1653 :“……现在我们在{STRINGID}上!” STR_1654 :{WINDOW_COLOUR_2}最近的想法: STR_1655 :在地上建造道路 STR_1656 :建造桥梁或隧道道路 @@ -1064,8 +1064,8 @@ STR_1673 :控制旋转开/关轨道 STR_1674 :刹车速度 STR_1675 :{POP16}{VELOCITY} STR_1676 :设置刹车速度限制 -STR_1677 :{WINDOW_COLOUR_2}受欢迎度:{BLACK}未知 -STR_1678 :{WINDOW_COLOUR_2}受欢迎度:{BLACK}{COMMA16}% +STR_1677 :{WINDOW_COLOUR_2}人气:{BLACK}未知 +STR_1678 :{WINDOW_COLOUR_2}人气{BLACK}{COMMA16}% STR_1679 :向上盘旋(向左) STR_1680 :向上盘旋(向右) STR_1681 :向下盘旋(向左) @@ -1081,20 +1081,20 @@ STR_1690 :{WINDOW_COLOUR_2}{STRINGID}{NEWLINE}{BLACK}{STRINGID} STR_1691 :{WINDOW_COLOUR_2} 费用:{BLACK}{CURRENCY} STR_1692 :{WINDOW_COLOUR_2} 费用:{BLACK}从{CURRENCY} STR_1693 :游客 -STR_1694 :职员 +STR_1694 :工作人员 STR_1695 :收入和支出 STR_1696 :顾客信息 STR_1697 :不能在等候区放置此物品 STR_1698 :只能在等候区放置此物品 -STR_1699 :游戏中已有太多人 -STR_1700 :雇佣新的清洁工 -STR_1701 :雇佣新的机械师 +STR_1699 :游戏中人数过多 +STR_1700 :雇佣新的清洁工人 +STR_1701 :雇佣新的维修人员 STR_1702 :雇佣新的安保人员 STR_1703 :雇佣新的表演人员 -STR_1704 :不能雇佣新职员… +STR_1704 :不能雇佣新工作人员…… STR_1705 :解雇该员工 STR_1706 :移动该人物到新的位置 -STR_1707 :游戏里员工太多了 +STR_1707 :游戏里的员工过多 STR_1708 :为该员工设置巡逻区域 STR_1709 :解雇员工 STR_1710 :确认 @@ -1104,19 +1104,19 @@ STR_1713 :{INLINE_SPRITE}{248}{19}{00}{00}{WINDOW_COLOUR_2}灌溉花园 STR_1714 :{INLINE_SPRITE}{249}{19}{00}{00}{WINDOW_COLOUR_2}清空垃圾桶 STR_1715 :{INLINE_SPRITE}{250}{19}{00}{00}{WINDOW_COLOUR_2}修剪草地 STR_1716 :无效的游乐园名称 -STR_1717 :不能重命名乐园… -STR_1718 :乐园命名 -STR_1719 :请输入乐园的名称: -STR_1720 :命名乐园 +STR_1717 :不能重命名游乐园…… +STR_1718 :游乐园名称 +STR_1719 :请输入游乐园的名称: +STR_1720 :命名游乐园 STR_1721 :游乐园已关闭 STR_1722 :游乐园开放中 -STR_1723 :不能开放乐园… -STR_1724 :不能关闭乐园… -STR_1725 :不能购买地块… +STR_1723 :不能开放游乐园…… +STR_1724 :不能关闭游乐园…… +STR_1725 :不能购买地块…… STR_1726 :地块不供购买! STR_1727 :建筑权不供购买! -STR_1728 :不能在此购买建权… -STR_1729 :非乐园所属地块! +STR_1728 :不能在此购买建权…… +STR_1729 :非游乐园所属地块! STR_1730 :{RED}已关闭 STR_1731 :{WHITE}{STRINGID}——- STR_1732 :建造 @@ -1124,20 +1124,20 @@ STR_1733 :模式 STR_1734 :{WINDOW_COLOUR_2}圈数: STR_1735 :每次循环的圈数 STR_1736 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} -STR_1738 :不能更改圈数… +STR_1738 :不能更改圈数…… STR_1739 :游客{INT32}赢得本比赛 STR_1740 :{STRINGID}赢得本比赛 STR_1741 :尚未建造! STR_1742 :{WINDOW_COLOUR_2}设施最大载客量: -STR_1743 :该游乐设施同时最多可以乘坐的乘客数量、 +STR_1743 :该游乐设施同时最多可以乘坐的乘客数量 STR_1744 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} -STR_1746 :不能更改… +STR_1746 :不能更改…… STR_1747 :{WINDOW_COLOUR_2}时间限制: STR_1748 :此游乐设施的游玩时间限制 STR_1749 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{DURATION} -STR_1751 :不能更改此游乐设施的游玩时间限制… -STR_1752 :显示公园内个人游客名单 -STR_1753 :显示公园游客的汇总名单 +STR_1751 :不能更改此游乐设施的游玩时间限制…… +STR_1752 :显示园区内游客名单 +STR_1753 :显示园区内游客汇总名单 STR_1754 :{BLACK}{COMMA32}名游客 STR_1755 :{BLACK}{COMMA32}名游客 STR_1756 :{WINDOW_COLOUR_2}门票价格: @@ -1152,9 +1152,9 @@ STR_1764 :漩涡 STR_1765 :即时拍照区域 STR_1766 :反向转盘 STR_1767 :旋转隧道 -STR_1768 :不能改变摇摆次数… +STR_1768 :不能改变摇摆次数…… STR_1769 :{WINDOW_COLOUR_2}摇摆次数: -STR_1770 :完全摇摆次数 +STR_1770 :完整摇摆次数 STR_1771 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_1773 :每个游乐设施只能建造一个照相区域 STR_1774 :每个游乐设施只能建造一个牵引轨道 @@ -1173,25 +1173,25 @@ STR_1788 :{INLINE_SPRITE}{07}{20}{00}{00}警长服装 STR_1789 :{INLINE_SPRITE}{08}{20}{00}{00}海盗服装 STR_1790 :选择这种员工的制服颜色 STR_1791 :{WINDOW_COLOUR_2}制服的颜色: -STR_1792 :回应{STRINGID}的故障呼叫中 -STR_1793 :前往{STRINGID}检查中 -STR_1794 :修理{STRINGID}中 -STR_1795 :回应电台呼叫中 +STR_1792 :正在回应{STRINGID}的故障呼叫 +STR_1793 :正在前往{STRINGID}检查 +STR_1794 :正在修理{STRINGID} +STR_1795 :正在回应电台呼叫 STR_1796 :已经故障并需要修复 STR_1798 :漩涡 STR_1799 :{POP16}{POP16}{POP16}{POP16}{POP16}{CURRENCY2DP} STR_1800 :保险设备跳闸 -STR_1801 :保护设备卡住不能开启 -STR_1802 :保护设备卡住不能关闭 -STR_1803 :车门卡住不能开启 -STR_1804 :车门卡住不能关闭 -STR_1805 :车辆失灵 +STR_1801 :保护设备卡死不能开启 +STR_1802 :保护设备卡死不能关闭 +STR_1803 :车门卡死不能开启 +STR_1804 :车门卡死不能关闭 +STR_1805 :车辆故障 STR_1806 :刹车设备故障 STR_1807 :控制设备故障 STR_1808 :{WINDOW_COLOUR_2}上次故障原因:{BLACK}{STRINGID} STR_1809 :{WINDOW_COLOUR_2}本次故障原因:{OUTLINE}{RED}{STRINGID} -STR_1810 :{WINDOW_COLOUR_2}搬运中: -STR_1811 :不能建在这里… +STR_1810 :{WINDOW_COLOUR_2}正在搬运: +STR_1811 :不能建在这里…… STR_1812 :{BLACK}{STRINGID} STR_1813 :其他物体 STR_1814 :动作 @@ -1248,7 +1248,7 @@ STR_1864 :位维修人员 STR_1865 :位安保警卫 STR_1866 :位表演人员 STR_1867 :{BLACK}{COMMA32} {STRINGID} -STR_1868 :不能改变旋转次数… +STR_1868 :不能改变旋转次数…… STR_1869 :{WINDOW_COLOUR_2}旋转次数: STR_1870 :完整旋转次数 STR_1871 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} @@ -1270,7 +1270,7 @@ STR_1887 :{WINDOW_COLOUR_2}上次检查时间:{BLACK}{COMMA16}分钟前 STR_1888 :{WINDOW_COLOUR_2}上次检查时间:{BLACK}大于4小时 STR_1889 :{WINDOW_COLOUR_2}故障度:{MOVE_X}{255}{BLACK}{COMMA16}% STR_1890 :选择维修人员检查此游乐设施的时间间隔 -STR_1891 :在乐园里暂未有{STRINGID}! +STR_1891 :游乐园里暂未有{STRINGID}! STR_1894 :{WINDOW_COLOUR_2}售出{STRINGID}:{BLACK}{COMMA32} STR_1895 :建造新的游乐设施/店铺 STR_1896 :{WINDOW_COLOUR_2}支出/收入 @@ -1278,7 +1278,7 @@ STR_1897 :{WINDOW_COLOUR_2}建造游乐设施 STR_1898 :{WINDOW_COLOUR_2}运行游乐设施费用 STR_1899 :{WINDOW_COLOUR_2}购买土地 STR_1900 :{WINDOW_COLOUR_2}调整地形 -STR_1901 :{WINDOW_COLOUR_2}乐园入场门票 +STR_1901 :{WINDOW_COLOUR_2}游乐园入场门票 STR_1902 :{WINDOW_COLOUR_2}游乐设施门票 STR_1903 :{WINDOW_COLOUR_2}其他商品销售额 STR_1904 :{WINDOW_COLOUR_2}其他商品进货 @@ -1299,34 +1299,34 @@ STR_1918 :不能再借更多贷款! STR_1919 :没有足够的现金! STR_1920 :不能偿还贷款! STR_1921 :开始新游戏 -STR_1922 :从存档继续玩 +STR_1922 :继续已保存的游戏 STR_1924 :退出游戏 -STR_1925 :不能放置人物于此… +STR_1925 :不能放置人物于此…… STR_1927 :{YELLOW}{STRINGID}发生故障了 -STR_1928 :{RED}{STRINGID}毁坏了! -STR_1929 :{RED}{STRINGID}依然未修复好{NEWLINE}请检查机械师位置所在,或考虑以更好的方法管理他们 +STR_1928 :{RED}{STRINGID}撞毁了! +STR_1929 :{RED}{STRINGID}依然未修复好{NEWLINE}请检查维修人员位置所在,或考虑以更好的方法管理他们 STR_1930 :开启/关闭这位游客的追踪信息——(假若开启追踪,这位游客的行动将会报告于最近消息里) STR_1931 :{STRINGID}已在等候{STRINGID}的队列中 STR_1932 :{STRINGID}已在{STRINGID}上 STR_1933 :{STRINGID}已在{STRINGID}中 STR_1934 :{STRINGID}已离开{STRINGID} -STR_1935 :{STRINGID}已离开乐园 +STR_1935 :{STRINGID}已离开游乐园 STR_1936 :{STRINGID}已购买{STRINGID} STR_1937 :显示关于这个消息标题的信息 -STR_1938 :显示游客所视 -STR_1939 :显示员工所视 +STR_1938 :显示游客视角 +STR_1939 :显示员工视角 STR_1940 :显示这位游客的快乐度,体力值,饥饿度等指标 -STR_1941 :显示这位游客乘坐了甚么游乐设施 -STR_1942 :显示这位游客的财政状况 +STR_1941 :显示这位游客坐过的游乐设施 +STR_1942 :显示这位游客的开销状况 STR_1943 :显示这位游客的最近想法 -STR_1944 :显示这位游客携带中的对象 +STR_1944 :显示这位游客携带的物品 STR_1945 :显示有关这位员工的排序及选项 STR_1946 :选择这位表演人员的服装 STR_1947 :显示已分配被巡逻的区域,以及将最近的员工定位 STR_1948 :雇用这个类别的新员工 STR_1949 :财政概要 STR_1950 :财政图表 -STR_1951 :乐园价值图表 +STR_1951 :游乐园价值图表 STR_1952 :营利图表 STR_1953 :营销计划 STR_1954 :研发资金 @@ -1334,7 +1334,7 @@ STR_1955 :{WINDOW_COLOUR_2}圈数: STR_1956 :每次运转游乐设施的圈数 STR_1957 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_1958 :{COMMA16} -STR_1959 :不能改变圈数… +STR_1959 :不能改变圈数…… STR_1960 :{WINDOW_COLOUR_2}气球价格: STR_1961 :{WINDOW_COLOUR_2}毛绒公仔价格: STR_1962 :{WINDOW_COLOUR_2}游乐园地图价格: @@ -1570,23 +1570,23 @@ STR_2206 :空饮料包装 STR_2207 :空果汁杯 STR_2208 :烤香肠 STR_2209 :空碗 -STR_2210 :列出乐园内的清洁工人 -STR_2211 :列出乐园内的维修人员 -STR_2212 :列出乐园内的安全警卫 -STR_2213 :列出乐园内的表演人员 +STR_2210 :列出游乐园内的清洁工人 +STR_2211 :列出游乐园内的维修人员 +STR_2212 :列出游乐园内的安全警卫 +STR_2213 :列出游乐园内的表演人员 STR_2214 :你不能在游戏暂停时建造! STR_2215 :{STRINGID}{NEWLINE}({STRINGID}) STR_2216 :{WINDOW_COLOUR_2}{COMMA16}°C STR_2217 :{WINDOW_COLOUR_2}{COMMA16}°F STR_2218 :{RED}{STRINGID} ,{STRINGID}的一部份,尚未返回到{STRINGID}!{NEWLINE}检查是否被卡住或被停止了 STR_2219 :{RED}{COMMA16}人已丧生于{STRINGID}的意外中 -STR_2220 :{WINDOW_COLOUR_2}乐园评价:{BLACK}{COMMA16} -STR_2221 :乐园评价:{COMMA16} +STR_2220 :{WINDOW_COLOUR_2}游乐园评价:{BLACK}{COMMA16} +STR_2221 :游乐园评价:{COMMA16} STR_2222 :{BLACK}{STRINGID} STR_2223 :{WINDOW_COLOUR_2}园内游客:{BLACK}{COMMA32} STR_2224 :{WINDOW_COLOUR_2}现金:{BLACK}{CURRENCY2DP} STR_2225 :{WINDOW_COLOUR_2}现金:{RED}{CURRENCY2DP} -STR_2226 :{WINDOW_COLOUR_2}乐园价值:{BLACK}{CURRENCY} +STR_2226 :{WINDOW_COLOUR_2}游乐园价值:{BLACK}{CURRENCY} STR_2227 :{WINDOW_COLOUR_2}公司价值:{BLACK}{CURRENCY} STR_2228 :{WINDOW_COLOUR_2}上个月来自食物/饮料以及{NEWLINE}其他商品的销售额:{BLACK}{CURRENCY} STR_2229 :上坡到垂直的过渡轨道 @@ -1608,16 +1608,16 @@ STR_2244 :9月 STR_2245 :10月 STR_2246 :11月 STR_2247 :12月 -STR_2248 :不能移除游乐设施/店铺… +STR_2248 :不能移除游乐设施/店铺…… STR_2249 :{BABYBLUE}全新游乐设施/店铺可供使用:{NEWLINE}{STRINGID} STR_2250 :{BABYBLUE}全新景物/主题景物可供使用:{NEWLINE}{STRINGID} STR_2251 :只可以在道路上建造! STR_2252 :只可以横过道路建造! -STR_2253 :运输类游乐设施 +STR_2253 :交通类游乐设施 STR_2254 :温和类游乐设施 STR_2255 :过山车类游乐设施 STR_2256 :剌激类游乐设施 -STR_2257 :水上乐园设施 +STR_2257 :水上游乐设施 STR_2258 :商店及摊贩 STR_2259 :景物及主题景物 STR_2260 :无投资 @@ -1638,7 +1638,7 @@ STR_2274 :显示此研发项目的详细数据 STR_2275 :显示研发的资金分配及选项 STR_2276 :显示研发项目进度 STR_2277 :未知 -STR_2278 :运输类游乐设施 +STR_2278 :交通类游乐设施 STR_2279 :温和类游乐设施 STR_2280 :过山车类游乐设施 STR_2281 :剌激类游乐设施 @@ -1655,33 +1655,33 @@ STR_2292 :{WINDOW_COLOUR_2}乘坐过的游乐设施: STR_2293 :{BLACK}无 STR_2294 :更改基础土地样式 STR_2295 :更改土地的垂直边界 -STR_2296 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}进入乐园 +STR_2296 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}进入游乐园 STR_2297 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}乘坐{BLACK}{COMMA16}个游乐设施 STR_2298 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}乘坐{BLACK}{COMMA16}个游乐设施 STR_2299 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}享用{BLACK}{COMMA16}款食物 STR_2300 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}享用{BLACK}{COMMA16}款食物 STR_2301 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}享用{BLACK}{COMMA16}款饮料 STR_2302 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}享用{BLACK}{COMMA16}款饮料 -STR_2303 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}购买{BLACK}{COMMA16}个记念品 -STR_2304 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}购买{BLACK}{COMMA16}个记念品 +STR_2303 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}购买{BLACK}{COMMA16}个纪念品 +STR_2304 :{WINDOW_COLOUR_2}付了{BLACK}{CURRENCY2DP}{WINDOW_COLOUR_2}购买{BLACK}{COMMA16}个纪念品 STR_2305 :轨道设计文件 -STR_2306 :存储轨道设计 +STR_2306 :保存道设计 STR_2307 :选择{STRINGID}的设计 STR_2308 :{STRINGID}的设计文件 STR_2309 :安装新的轨道设计 STR_2310 :建造自订设计 -STR_2311 :{WINDOW_COLOUR_2}兴奋度:{BLACK}{COMMA2DP32}(大约) -STR_2312 :{WINDOW_COLOUR_2}刺激度:{BLACK}{COMMA2DP32}(大约) -STR_2313 :{WINDOW_COLOUR_2}恶心度:{BLACK}{COMMA2DP32}(大约) +STR_2311 :{WINDOW_COLOUR_2}兴奋度:{BLACK}{COMMA2DP32}(估值) +STR_2312 :{WINDOW_COLOUR_2}刺激度:{BLACK}{COMMA2DP32}(估值) +STR_2313 :{WINDOW_COLOUR_2}恶心度:{BLACK}{COMMA2DP32}(估值) STR_2314 :{WINDOW_COLOUR_2}轨道长度:{BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}建造费用:{BLACK}约{CURRENCY} STR_2316 :{WINDOW_COLOUR_2}需要空间:{BLACK}{COMMA16} × {COMMA16}格 STR_2321 :{WINDOW_COLOUR_2}游乐设施/店铺数目:{BLACK}{COMMA16} STR_2322 :{WINDOW_COLOUR_2}员工数目:{BLACK}{COMMA32} -STR_2323 :{WINDOW_COLOUR_2}乐园面积:{BLACK}{COMMA32}平方米 -STR_2324 :{WINDOW_COLOUR_2}乐园面积:{BLACK}{COMMA32}平方英尺 -STR_2325 :购买土地来扩展乐园 -STR_2326 :购买建造权来准许在乐园范围外的空中或地底建造对象 +STR_2323 :{WINDOW_COLOUR_2}游乐园面积:{BLACK}{COMMA32}平方米 +STR_2324 :{WINDOW_COLOUR_2}游乐园面积:{BLACK}{COMMA32}平方英尺 +STR_2325 :购买土地来扩展游乐园 +STR_2326 :购买建造权来准许在游乐园范围外的空中或地底建造对象 STR_2327 :选项 STR_2328 :{WINDOW_COLOUR_2}货币单位: STR_2329 :{WINDOW_COLOUR_2}距离和速度单位: @@ -1739,28 +1739,28 @@ STR_2382 :土地 STR_2383 :水面 STR_2384 :{WINDOW_COLOUR_2}你的目标: STR_2385 :{BLACK}无 -STR_2386 :{BLACK}在{POP16}{MONTHYEAR}末乐园内至少有{NEWLINE}{PUSH16}{PUSH16}{COMMA32}游客,并且乐园评分不低于600 -STR_2387 :{BLACK}在{POP16}{MONTHYEAR}末乐园价值不低于{CURRENCY} -STR_2388 :{BLACK}尽情玩吧! +STR_2386 :{BLACK}截止{POP16}{POP16}{MONTHYEAR}底,园区内至少有{PUSH16}{PUSH16}{PUSH16}{COMMA32}游客,并且游乐园评分不低于600 +STR_2387 :{BLACK}截止{POP16}{MONTHYEAR}底,游乐园价值不低于{CURRENCY} +STR_2388 :{BLACK}尽情地玩! STR_2389 :{BLACK}建造你的最佳{STRINGID}吧! -STR_2390 :{BLACK}在你的乐园中运营10种类型的过山车,并且每一个的兴奋度不低于6.00 -STR_2391 :{BLACK}乐园内至少有{COMMA32}游客,并且在任何时候你都不能让公园评分低于700! +STR_2390 :{BLACK}在你的游乐园中运营10种类型的过山车,并且每一个的兴奋度不低于6.00 +STR_2391 :{BLACK}园区内至少有{COMMA32}游客,并且在任何时候你都不能让游乐园评分低于700! STR_2392 :{BLACK}每个月的门票收入至少{NEWLINE}{POP16}{POP16}{CURRENCY} -STR_2393 :{BLACK}在你的乐园中运营10种类型的过山车,每一个的长度至少{LENGTH},并且每一个的兴奋度不低于7.00 -STR_2394 :{BLACK}建造好五座未完成的过山车,将他们每座设计成兴奋度至少达到{POP16}{POP16}{COMMA2DP32} -STR_2395 :{BLACK}还清乐园的贷款,并令其价值至少达到{POP16}{POP16}{CURRENCY} +STR_2393 :{BLACK}在你的游乐园中运营10种类型的过山车,每一个的长度至少{LENGTH},并且每一个的兴奋度不低于7.00 +STR_2394 :{BLACK}建造好五座部分建成的过山车,每座过山车的兴奋度至少达到{POP16}{POP16}{COMMA2DP32} +STR_2395 :{BLACK}还清所有贷款,并让游乐园价值至少达到{POP16}{POP16}{CURRENCY} STR_2396 :{BLACK}食物,饮料及纪念品的销售收入至少要达到每月{POP16}{POP16}{CURRENCY} STR_2397 :无 STR_2398 :指定日期要达到的游客数量 -STR_2399 :指定日期要达到的乐园评价 -STR_2400 :尽情玩吧 +STR_2399 :指定日期要达到的游乐园评价 +STR_2400 :尽情地玩 STR_2401 :建造你的最佳游乐设施 STR_2402 :建造十座过山车 -STR_2403 :乐园内游客数量 +STR_2403 :游乐园内游客数量 STR_2404 :游乐设施门票的每月收入 STR_2405 :建造十座指定长度的过山车 STR_2406 :完成建造五座过山车 -STR_2407 :付清贷款及达到指定乐园评价 +STR_2407 :付清贷款并达到指定游乐园评分 STR_2408 :食物/饮料或其他商品的每月收入 STR_2409 :{WINDOW_COLOUR_2}实行中的营销计划 STR_2410 :{BLACK}无 @@ -1775,49 +1775,49 @@ STR_2418 :免费进入{STRINGID} STR_2419 :免费乘坐{STRINGID} STR_2420 :半价进入{STRINGID} STR_2421 :免费{STRINGID} -STR_2424 :{WINDOW_COLOUR_2}发放免费进入乐园卷 -STR_2425 :{WINDOW_COLOUR_2}发放免费乘坐个别游乐设施卷 -STR_2426 :{WINDOW_COLOUR_2}发放半价进入乐园卷 -STR_2427 :{WINDOW_COLOUR_2}发放免费进入食物或饮料乐园卷 -STR_2428 :{WINDOW_COLOUR_2}开始针对乐园的推广计划 +STR_2424 :{WINDOW_COLOUR_2}发放免费入园券 +STR_2425 :{WINDOW_COLOUR_2}发放免费乘坐个别游乐设施券 +STR_2426 :{WINDOW_COLOUR_2}发放半价入园券 +STR_2427 :{WINDOW_COLOUR_2}发放免费食物或饮料券 +STR_2428 :{WINDOW_COLOUR_2}开始针对游乐园的推广计划 STR_2429 :{WINDOW_COLOUR_2}开始针对个别游乐设施的推广计划 -STR_2430 :{BLACK}免费进入{STRINGID}的优惠卷 -STR_2431 :{BLACK}免费乘坐{STRINGID}的优惠卷 -STR_2432 :{BLACK}半价进入{STRINGID}的优惠卷 -STR_2433 :{BLACK}免费{STRINGID}的优惠卷 +STR_2430 :{BLACK}免费进入{STRINGID}的优惠券 +STR_2431 :{BLACK}免费乘坐{STRINGID}的优惠券 +STR_2432 :{BLACK}半价进入{STRINGID}的优惠券 +STR_2433 :{BLACK}免费{STRINGID}的优惠券 STR_2434 :{BLACK}{STRINGID}的推广计划 STR_2435 :{BLACK}{STRINGID}的推广计划 STR_2436 :1周 STR_2443 :{WINDOW_COLOUR_2}每周费用:{BLACK} {CURRENCY2DP} STR_2444 :{WINDOW_COLOUR_2}总费用:{BLACK} {CURRENCY2DP} STR_2445 :开始实行此营销计划 -STR_2446 :{YELLOW}你举行的行销计划——免费进入乐园营销计划现已结束 +STR_2446 :{YELLOW}你举行的行销计划——免费入园现已结束 STR_2447 :{YELLOW}你举行的行销计划——免费乘坐游乐设施{STRINGID}现已结束 -STR_2448 :{YELLOW}你举行的行销计划——半价进入乐园现已结束 +STR_2448 :{YELLOW}你举行的行销计划——半价入园现已结束 STR_2449 :{YELLOW}你举行的行销计划——免费{STRINGID}现已结束 -STR_2450 :{YELLOW}你针对乐园的推广计划现已结束 +STR_2450 :{YELLOW}你针对游乐园的推广计划现已结束 STR_2451 :{YELLOW}你针对{STRINGID}的推广计划现已结束 -STR_2452 :{WINDOW_COLOUR_2}现金(减去贷款):{BLACK} {CURRENCY2DP} -STR_2453 :{WINDOW_COLOUR_2}现金(减去贷款):{RED} {CURRENCY2DP} +STR_2452 :{WINDOW_COLOUR_2}现金(不计贷款):{BLACK} {CURRENCY2DP} +STR_2453 :{WINDOW_COLOUR_2}现金(不计贷款):{RED} {CURRENCY2DP} STR_2454 :{BLACK} {BLACK} {CURRENCY2DP}—— STR_2457 :{BLACK}显示财政报表 STR_2458 :{BLACK}以图表显示过往到现在的净现金 -STR_2459 :{BLACK}以图表显示过往到现在的乐园价格 +STR_2459 :{BLACK}以图表显示过往到现在的游乐园价值 STR_2460 :{BLACK}以图表显示过往到现在的每周营利 STR_2461 :{BLACK}显示营销计划详情 -STR_2462 :{BLACK}显示乐园入口的视点 -STR_2463 :{BLACK}以图表显示过往到现在的乐园评价 +STR_2462 :{BLACK}显示游乐园入口视角 +STR_2463 :{BLACK}以图表显示过往到现在的游乐园评分 STR_2464 :{BLACK}以图表显示过往到现在的游客人员 -STR_2465 :{BLACK}显示乐园门票价格以及其资讯 -STR_2466 :{BLACK}显示乐园的统计资料 -STR_2467 :{BLACK}显示是次游戏的目标 -STR_2468 :{BLACK}显示这个乐园最近获得的奖项 +STR_2465 :{BLACK}显示游乐园门票价格以及其资讯 +STR_2466 :{BLACK}显示游乐园的统计资料 +STR_2467 :{BLACK}显示游戏目标 +STR_2468 :{BLACK}显示游乐园最近获得的奖项 STR_2469 :{BLACK}选择投放多少资金到研发当中 -STR_2470 :{BLACK}研发新的运输类游游设施 +STR_2470 :{BLACK}研发新的交通类游游设施 STR_2471 :{BLACK}研发新的温和类游乐设施 STR_2472 :{BLACK}研发新的过山车类游乐设施 STR_2473 :{BLACK}研发新的刺激类游乐设施 -STR_2474 :{BLACK}研发新的水文类游乐设施 +STR_2474 :{BLACK}研发新的水上游乐设施 STR_2475 :{BLACK}研发新的商店及摊贩 STR_2476 :{BLACK}研发新的景物及主题景物 STR_2477 :{BLACK}选择这个游乐设施的运作模式 @@ -1825,15 +1825,15 @@ STR_2478 :{BLACK}以图表显示速度与运作时间的关系 STR_2479 :{BLACK}以图表显示高度与运作时间的关系 STR_2480 :{BLACK}以图表显示垂直加速与运作时间的关系 STR_2481 :以图表显示横向加速与运作时间的关系 -STR_2482 :营利:每周{CURRENCY},乐园价值:{POP16}{POP16}{CURRENCY} +STR_2482 :营利:每周{CURRENCY},游乐园价值:{POP16}{POP16}{CURRENCY} STR_2483 :{WINDOW_COLOUR_2}每周营利:{BLACK}+{CURRENCY2DP} STR_2484 :{WINDOW_COLOUR_2}每周营利:{RED}{CURRENCY2DP} STR_2487 :显示游客的“真实”姓名 STR_2488 :在游客“真实”姓名和游客编号之间切换 -STR_2489 :快捷键… +STR_2489 :快捷键…… STR_2490 :键盘快捷键 STR_2491 :重置快捷键 -STR_2492 :初始化所有快捷键设置 +STR_2492 :重置所有快捷键设置 STR_2493 :关闭最顶层的窗口 STR_2494 :关闭所有窗口 STR_2495 :退出建造模式 @@ -1862,7 +1862,7 @@ STR_2517 :显示研发信息 STR_2518 :显示设施列表 STR_2519 :显示游乐园信息 STR_2520 :显示游客列表 -STR_2521 :显示职员列表 +STR_2521 :显示工作人员列表 STR_2522 :显示最近信息 STR_2523 :显示地图 STR_2524 :截图 @@ -1962,13 +1962,13 @@ STR_2749 :我的新剧情 STR_2750 :移动全部物品到顶部 STR_2751 :移动全部物品到底部 STR_2752 :清理草地 -STR_2753 :已修剪的草地 +STR_2753 :修剪草地 STR_2754 :浇灌植物 -STR_2755 :修复路面设施破损 +STR_2755 :修复所有路面设施破损 STR_2756 :去除路面垃圾 STR_2763 :??? STR_2765 :添加超多游客到访 -STR_2766 :完成剧情目标 +STR_2766 :完成目标 STR_2767 :冻结天气 STR_2769 :开放游乐园 STR_2770 :关闭游乐园 @@ -1987,7 +1987,7 @@ STR_2783 :CTRL + STR_2784 :变更快捷键 STR_2785 :{WINDOW_COLOUR_2}按下{NEWLINE}的新快捷键:“{STRINGID}” STR_2786 :点击快捷键描述来设置新的快捷键 -STR_2787 :{WINDOW_COLOUR_2}乐园价值:{BLACK}{CURRENCY} +STR_2787 :{WINDOW_COLOUR_2}游乐园价值:{BLACK}{CURRENCY} STR_2788 :{WINDOW_COLOUR_2}恭喜您!{NEWLINE}{BLACK}你已经达到你的目标,并令公司价值增至{CURRENCY}! STR_2789 :{WINDOW_COLOUR_2}你未达成目标! STR_2790 :请输入你要在剧情列表显示的名字 @@ -2006,57 +2006,57 @@ STR_2802 :地图 STR_2803 :高亮显示游客 STR_2804 :高亮显示员工 STR_2805 :显示游乐园地图 -STR_2806 :{RED}大量游客投诉乐园里的道路非常肮脏及恶心{NEWLINE}请检查你的清洁工人位置,并考虑调整的管理方法。 -STR_2807 :{RED}大量游客投诉乐园里随处可见的垃圾{NEWLINE}请检查你的清洁工人位置,并考虑调整管理方法。 -STR_2808 :{RED}大量游客投诉乐园里的公物被毁坏{NEWLINE}请检查你的安保人员位置,并考虑调整管理方法。 +STR_2806 :{RED}大量游客投诉游乐园里的道路非常肮脏及恶心{NEWLINE}请检查你的清洁工人位置,并考虑调整的管理方法。 +STR_2807 :{RED}大量游客投诉游乐园里随处可见的垃圾{NEWLINE}请检查你的清洁工人位置,并考虑调整管理方法。 +STR_2808 :{RED}大量游客投诉游乐园里的公物被毁坏{NEWLINE}请检查你的安保人员位置,并考虑调整管理方法。 STR_2809 :{RED}游客都饿了,因为他们找不到卖食物的店铺。 STR_2810 :{RED}游客都渴了,因为他们找不到卖饮料的店铺。 -STR_2811 :{RED}游客都在抱怨乐园里找不到厕所。 -STR_2812 :{RED}乐园内有游客被卡住或迷路{NEWLINE}请检查乐园的道路设计是否需要改善,以便游客找到出路。 -STR_2813 :{RED}你的游乐园门票太贵了!{NEWLINE}减低门费或增加乐园价值来吸引更多游客来访。 -STR_2814 :{WINDOW_COLOUR_2}最肮脏乐园奖 -STR_2815 :{WINDOW_COLOUR_2}最整洁乐园奖 -STR_2816 :{WINDOW_COLOUR_2}拥有最棒过山车奖 -STR_2817 :{WINDOW_COLOUR_2}最有价值乐园奖 -STR_2818 :{WINDOW_COLOUR_2}最美乐园奖 -STR_2819 :{WINDOW_COLOUR_2}最差价值乐园奖 -STR_2820 :{WINDOW_COLOUR_2}最安全乐园奖 -STR_2821 :{WINDOW_COLOUR_2}拥有最佳员工奖 -STR_2822 :{WINDOW_COLOUR_2}拥有最佳食物奖 -STR_2823 :{WINDOW_COLOUR_2}拥有最差食物奖 -STR_2824 :{WINDOW_COLOUR_2}拥有最佳厕所奖 -STR_2825 :{WINDOW_COLOUR_2}最让人失望乐园奖 -STR_2826 :{WINDOW_COLOUR_2}拥有最佳水上游乐设施奖 -STR_2827 :{WINDOW_COLOUR_2}拥有最佳自行设计的游乐设施奖 -STR_2828 :{WINDOW_COLOUR_2}拥有最大胆色彩搭配奖 -STR_2829 :{WINDOW_COLOUR_2}拥有最令人迷失布局奖 -STR_2830 :{WINDOW_COLOUR_2}拥有最温和游乐设施奖 -STR_2831 :{TOPAZ}你的游乐园获得了“全国最肮脏乐园奖”! -STR_2832 :{TOPAZ}你的游乐园获得了“全国最整洁乐园奖”! -STR_2833 :{TOPAZ}你的游乐园获得了“拥有最棒过山车奖”! -STR_2834 :{TOPAZ}你的游乐园获得了“全国最有价值乐园奖”! -STR_2835 :{TOPAZ}你的游乐园获得了“全国最美乐园奖”! -STR_2836 :{TOPAZ}你的游乐园获得了“全国最差价值乐园奖”! -STR_2837 :{TOPAZ}你的游乐园获得了“全国最安全乐园奖”! -STR_2838 :{TOPAZ}你的游乐园获得了“拥有最佳员工奖”! -STR_2839 :{TOPAZ}你的游乐园获得了“拥有最佳食物奖”! -STR_2840 :{TOPAZ}你的游乐园获得了“拥有最差食物奖”! -STR_2841 :{TOPAZ}你的游乐园获得了“拥有最佳厕所奖”! -STR_2842 :{TOPAZ}你的游乐园获得了“全国最让人失望乐园奖”! -STR_2843 :{TOPAZ}你的游乐园获得了“拥有最佳水上游乐设施奖”! -STR_2844 :{TOPAZ}你的游乐园获得了“拥有最佳自行设计的游乐设施奖”! -STR_2845 :{TOPAZ}你的游乐园获得了“拥有最大胆色彩搭配奖”! -STR_2846 :{TOPAZ}你的游乐园获得了“拥有最令人迷失布局奖”! -STR_2847 :{TOPAZ}你的游乐园获得了“拥有最温和游乐设施奖”! -STR_2848 :{WINDOW_COLOUR_2}暂无获得任何奖项 +STR_2811 :{RED}游客都在抱怨游乐园里找不到厕所。 +STR_2812 :{RED}游乐园内有游客被困住或迷路{NEWLINE}请检查游乐园的道路设计是否需要改善,以便游客找到出路。 +STR_2813 :{RED}你的游乐园门票太贵了!{NEWLINE}减低门费或增加游乐园价值来吸引更多游客来访。 +STR_2814 :{WINDOW_COLOUR_2}最肮脏游乐园奖 +STR_2815 :{WINDOW_COLOUR_2}最整洁游乐园奖 +STR_2816 :{WINDOW_COLOUR_2}最佳过山车奖 +STR_2817 :{WINDOW_COLOUR_2}最有价值游乐园奖 +STR_2818 :{WINDOW_COLOUR_2}最美游乐园奖 +STR_2819 :{WINDOW_COLOUR_2}最差价值游乐园奖 +STR_2820 :{WINDOW_COLOUR_2}最安全游乐园奖 +STR_2821 :{WINDOW_COLOUR_2}最佳员工奖 +STR_2822 :{WINDOW_COLOUR_2}最佳食物奖 +STR_2823 :{WINDOW_COLOUR_2}最差食物奖 +STR_2824 :{WINDOW_COLOUR_2}最佳厕所奖 +STR_2825 :{WINDOW_COLOUR_2}最让人失望游乐园奖 +STR_2826 :{WINDOW_COLOUR_2}最佳水上游乐设施奖 +STR_2827 :{WINDOW_COLOUR_2}最佳自行设计的游乐设施奖 +STR_2828 :{WINDOW_COLOUR_2}最大胆色彩搭配奖 +STR_2829 :{WINDOW_COLOUR_2}最混乱公园布局奖 +STR_2830 :{WINDOW_COLOUR_2}最温和游乐设施奖 +STR_2831 :{TOPAZ}你的游乐园获得了“全国最肮脏游乐园奖”! +STR_2832 :{TOPAZ}你的游乐园获得了“全国最整洁游乐园奖”! +STR_2833 :{TOPAZ}你的游乐园获得了“最佳过山车奖”! +STR_2834 :{TOPAZ}你的游乐园获得了“全国最有价值游乐园奖”! +STR_2835 :{TOPAZ}你的游乐园获得了“全国最美游乐园奖”! +STR_2836 :{TOPAZ}你的游乐园获得了“全国最差价值游乐园奖”! +STR_2837 :{TOPAZ}你的游乐园获得了“全国最安全游乐园奖”! +STR_2838 :{TOPAZ}你的游乐园获得了“最佳员工奖”! +STR_2839 :{TOPAZ}你的游乐园获得了“最佳食物奖”! +STR_2840 :{TOPAZ}你的游乐园获得了“最差食物奖”! +STR_2841 :{TOPAZ}你的游乐园获得了“最佳厕所奖”! +STR_2842 :{TOPAZ}你的游乐园获得了“全国最让人失望游乐园奖”! +STR_2843 :{TOPAZ}你的游乐园获得了“最佳水上游乐设施奖”! +STR_2844 :{TOPAZ}你的游乐园获得了“最佳自行设计的游乐设施奖”! +STR_2845 :{TOPAZ}你的游乐园获得了“最大胆色彩搭配奖”! +STR_2846 :{TOPAZ}你的游乐园获得了“最混乱公园布局奖”! +STR_2847 :{TOPAZ}你的游乐园获得了“最温和游乐设施奖”! +STR_2848 :{WINDOW_COLOUR_2}暂未获得任何奖项 STR_2849 :新的剧情副本安装完毕 STR_2850 :新的轨道设计安装完毕 STR_2851 :剧情副本已经安装过了 STR_2852 :轨道设计已经安装过了 STR_2853 :被当地政府禁止! -STR_2854 :{RED}游客都不能走到去{STRINGID}的入口!{NEWLINE}请建造道路连接入口 -STR_2855 :{RED}{STRINGID}的出口并没有道路连接!{NEWLINE}请建造道路连接出口 -STR_2858 :不能开始实行营销计划… +STR_2854 :{RED}游客无法到达{STRINGID}的入口!{NEWLINE}请建造道路连接入口 +STR_2855 :{RED}{STRINGID}的出口没有道路连接!{NEWLINE}请建造道路连接出口 +STR_2858 :不能开始实行营销计划…… STR_2861 :{WINDOW_COLOUR_2}授权至 Infogrames Interactive Inc. STR_2971 :主要配色主题 STR_2972 :额外配色主题1 @@ -2066,12 +2066,12 @@ STR_2975 :选取游乐设施的配色选项来修改 STR_2976 :将指定区域使用目前选择的配色主题 STR_2977 :员工命名 STR_2978 :请输入该员工的新名字: -STR_2979 :不能更改该员工姓名… +STR_2979 :不能更改该员工姓名…… STR_2980 :游戏中有过多的横幅 STR_2981 :{RED}-游客止步— STR_2982 :横幅内容 STR_2983 :请输入新的内容: -STR_2984 :不能设置新的横幅内容… +STR_2984 :不能设置新的横幅内容…… STR_2985 :横幅 STR_2986 :修改横幅内容 STR_2987 :设置当前横幅为“游客止步” @@ -2097,8 +2097,8 @@ STR_3006 :{PALEGOLD}ABC STR_3007 :{LIGHTPINK}ABC STR_3008 :{PEARLAQUA}ABC STR_3009 :{PALESILVER}ABC -STR_3010 :无法加载文件… -STR_3011 :文件中含有非法数据 +STR_3010 :无法加载文件…… +STR_3011 :文件包含无效数据 STR_3045 :选择要播放的音乐风格: STR_3047 :当地政府禁止拆除或修改此游乐设施 STR_3048 :当地政府禁止进行所有广告推广计划 @@ -2107,7 +2107,7 @@ STR_3050 :高尔夫球洞B STR_3051 :高尔夫球洞C STR_3052 :高尔夫球洞D STR_3053 :高尔夫球洞E -STR_3054 :加载中… +STR_3054 :加载中…… STR_3058 :砖墙 STR_3059 :树篱 STR_3060 :冰砖墙 @@ -2118,16 +2118,16 @@ STR_3064 :新手级乐园 STR_3065 :挑战级乐园 STR_3066 :专家级乐园 STR_3067 :“真实”乐园 -STR_3068 :其他乐园 -STR_3069 :最上的区域 +STR_3068 :其他游乐园 +STR_3069 :顶部 STR_3070 :斜坡至平面 -STR_3071 :{WINDOW_COLOUR_2}划一乐园内的价格 -STR_3072 :选择是否以此价格为划一价格 -STR_3073 :{RED}警告:你的乐园评价已跌至低于700!{NEWLINE}如果你在4周内尚未改善乐园评价,你的乐园将会被强制关闭 -STR_3074 :{RED}警告:你的乐园评价仍然低于700!{NEWLINE}你还有3周去改善评价 -STR_3075 :{RED}警告:你的乐园评价仍然低于700!{NEWLINE}你还有2周去改善评价,否则你的乐园将会被强制关闭 -STR_3076 :{RED}最后通谍:你的乐园评价仍然低于700!{NEWLINE}7日之内你的乐园将会被强制关闭,除非你能改善乐园评价 -STR_3077 :{RED}关闭告示:你的乐园已被强制关闭! +STR_3071 :{WINDOW_COLOUR_2}统一园区内的价格 +STR_3072 :选择是否以此价格为统一价格 +STR_3073 :{RED}警告:你的游乐园评分已降至700以下!{NEWLINE}如果你在4周内没有提高游乐园评分,你的游乐园会被强制关闭 +STR_3074 :{RED}警告:你的游乐园评分仍然低于700!{NEWLINE}你还有3周时间改善评分 +STR_3075 :{RED}警告:你的游乐园评分仍然低于700!{NEWLINE}你还有2周时间改善评分,否则你的游乐园会被强制关闭 +STR_3076 :{RED}最后通谍:你的游乐园评分仍然低于700!{NEWLINE}除非你能在7天之内提高游乐园评分,你的游乐园会被强制关闭 +STR_3077 :{RED}关闭告示:你的游乐园已被强制关闭! STR_3090 :选择入口,出口以及车站的风格 STR_3091 :你无法删除此轨道! STR_3092 :你无法移动或修改这个游乐设施的车站! @@ -2140,7 +2140,7 @@ STR_3099 :选择颜色 STR_3100 :选择第二颜色 STR_3101 :选择第三颜色 STR_3102 :将地形的景物重新上色 -STR_3103 :不能重新上色这个对象… +STR_3103 :不能重新上色这个对象…… STR_3104 :列出游乐设施 STR_3105 :列出商店及摊贩 STR_3106 :列出访客信息中心或其他游客设施 @@ -2152,12 +2152,12 @@ STR_3111 :点击建造设计 STR_3112 :点击删除或重命名设计 STR_3113 :选择另一个设计 STR_3114 :返回选择设计窗口 -STR_3115 :存储轨道设计 -STR_3116 :存储轨道设计(在测试完结及测试数据生成完毕前不可用) -STR_3117 :{BLACK}调用维修人员中… -STR_3118 :{BLACK}{STRINGID}正在前往到这个游乐设施 -STR_3119 :{BLACK}{STRINGID}正在修复这个游乐设施 -STR_3120 :将最邻近,或在维修此游乐设施的维修人员定位 +STR_3115 :保存轨道设计 +STR_3116 :保存轨道设计(在测试完结及测试数据生成完毕前不可用) +STR_3117 :{BLACK}调用维修人员中…… +STR_3118 :{BLACK}{STRINGID}正在前往这个游乐设施 +STR_3119 :{BLACK}{STRINGID}正在维修这个游乐设施 +STR_3120 :定位最近的空闲或正在维修的维修人员 STR_3121 :无法定位维修人员,或者附近的维修人员都在工作中 STR_3122 :{WINDOW_COLOUR_2}游客的最爱:{BLACK}{COMMA32}位游客 STR_3123 :{WINDOW_COLOUR_2}游客的最爱:{BLACK}{COMMA32}位游客 @@ -2165,11 +2165,11 @@ STR_3124 :故障的{STRINGID} STR_3125 :{WINDOW_COLOUR_2}兴奋度加成:{BLACK}+{COMMA16}% STR_3126 :{WINDOW_COLOUR_2}刺激度加成:{BLACK}+{COMMA16}% STR_3127 :{WINDOW_COLOUR_2}恶心度加成:{BLACK}+{COMMA16}% -STR_3128 :存储轨道设计 -STR_3129 :存储轨道设计及周边景物 -STR_3130 :存储 +STR_3128 :保存轨道设计 +STR_3129 :保存轨道设计及周边景物 +STR_3130 :保存 STR_3131 :取消 -STR_3132 :{BLACK}点击选择景物,以便存储于轨道设计内… +STR_3132 :{BLACK}点击选择景物,以便保存于轨道设计内…… STR_3133 :无法于斜坡上建造此对象 STR_3134 :{RED}(设计中含有不可用的景物) STR_3135 :{RED}(车辆款式不可用——游乐设施的性能可能会有影响) @@ -2178,7 +2178,7 @@ STR_3137 :选择邻近景物 STR_3138 :重新选择 STR_3139 :缆道坡道不能在这个运作模式运作 STR_3140 :缆道坡道需要连接至车站 -STR_3141 :缆道坡道并不适合於单次多圈数的游乐设施 +STR_3141 :缆道坡道并不适用于单次多圈数的游乐设施 STR_3142 :{WINDOW_COLOUR_2}载客量:{BLACK}{STRINGID} STR_3143 :在地图上显示所有人物 STR_3144 :在地图上显示所有游乐设施及店铺 @@ -2191,17 +2191,17 @@ STR_3169 :找不到以下对象的数据: STR_3170 :没有空间绘制图像 STR_3171 :选择了太多此类型的对象 STR_3172 :必需要先选择以下的对象:{STRING} -STR_3173 :这个对象目前被使用中 -STR_3174 :其他对象需要这个对象 -STR_3175 :这个对象是必需的 +STR_3173 :这个对象正在被使用中 +STR_3174 :其他对象依赖于这个对象 +STR_3175 :始终需要这个对象 STR_3176 :无法选择这个对象 STR_3177 :无法取消选择这个对象 STR_3179 :至少需要选择一项游乐设施/店铺 -STR_3180 :不合适的对象选择 +STR_3180 :选择对象无效 STR_3181 :对象选择——{STRINGID} -STR_3182 :必须选择乐园入口类别 -STR_3183 :必须选择水塘类别 -STR_3184 :游乐设施/其车辆 +STR_3182 :必须选择游乐园入口类别 +STR_3183 :必须选择水体类别 +STR_3184 :游乐设施/车辆 STR_3185 :小型景物 STR_3186 :大型景物 STR_3187 :墙壁/栅栏 @@ -2209,7 +2209,7 @@ STR_3188 :道路指示牌 STR_3189 :道路 STR_3190 :额外的道路对象 STR_3191 :景物组别 -STR_3192 :乐园入口 +STR_3192 :游乐园入口 STR_3193 :水塘 STR_3195 :研发列表 STR_3196 :{WINDOW_COLOUR_2}研发组别:{BLACK}{STRINGID} @@ -2218,11 +2218,11 @@ STR_3198 :{WINDOW_COLOUR_2}需要在游戏中研发的项目: STR_3199 :随机分配 STR_3200 :将需要在游戏中研发的项目随机分配 STR_3201 :选取对象 -STR_3202 :编辑地势 +STR_3202 :地形编辑器 STR_3203 :设置研发清单 STR_3204 :选取选项 STR_3205 :选取目标 -STR_3206 :存储剧情 +STR_3206 :保存剧情 STR_3207 :轨道设计工具 STR_3208 :轨道设计管理工具 STR_3209 :上一步: @@ -2232,30 +2232,30 @@ STR_3212 :{POP16}{COMMA16} STR_3213 :不能再缩小地图 STR_3214 :不能再扩大地图 STR_3215 :太接近地图的边缘 -STR_3216 :选择乐园拥有的土地及其他选项 +STR_3216 :选择游乐园拥有的土地及其他选项 STR_3217 :已拥有的土地 STR_3218 :已拥有建造权的土地 STR_3219 :可供购买的土地 STR_3220 :可供购买建造权的土地 -STR_3221 :令乐园成为土地的拥有者 -STR_3222 :令乐园拥有土地的建造权 -STR_3223 :将土地设置成为可供乐园购买 -STR_3224 :将土地的建造权设置成为可供乐园购买 +STR_3221 :使游乐园拥有这块土地 +STR_3222 :使游乐园仅拥有这块土地的建造权 +STR_3223 :使游乐园能够购买这块土地 +STR_3224 :使游乐园能够购买这块土地的建造权 STR_3225 :设置是否在选中的位置中随机建造一些对象 -STR_3226 :建造乐园入口 -STR_3227 :太多乐园入口! -STR_3228 :设置游客的开始步行位置 -STR_3229 :区域煞车不能建造在车站之后 -STR_3230 :区域煞车不能建造在另一个区域煞车之后 -STR_3231 :区域煞车不能建造在这个提升坡的顶部之后 +STR_3226 :建造游乐园入口 +STR_3227 :游乐园入口过多! +STR_3228 :设置游客的初始位置 +STR_3229 :区块制动器不能紧接在车站之后 +STR_3230 :区块制动器不能紧接在另一个区块制动器之后 +STR_3231 :区块制动器不能紧接在这个提升坡的顶部之后 STR_3232 :选项——财政 STR_3233 :选项——游客 -STR_3234 :选项——乐园 +STR_3234 :选项——游乐园 STR_3235 :显示财政选项 STR_3236 :显示游客选项 -STR_3237 :显示乐园选项 +STR_3237 :显示游乐园选项 STR_3238 :无金钱限制 -STR_3239 :将这个乐园设置为无金钱限制的乐园 +STR_3239 :将这个游乐园设置为无金钱限制的游乐园 STR_3240 :{WINDOW_COLOUR_2}初始现金: STR_3241 :{WINDOW_COLOUR_2}初始贷款额: STR_3242 :{WINDOW_COLOUR_2}最高贷款额: @@ -2282,25 +2282,25 @@ STR_3262 :{WINDOW_COLOUR_2}游客初始饥饿度: STR_3263 :{WINDOW_COLOUR_2}游客初始口渴度: STR_3264 :不能再增加这个选项! STR_3265 :不能再减少这个选项! -STR_3266 :选择这个乐园的收费策略 +STR_3266 :选择这个游乐园的收费策略 STR_3267 :禁止移除树木 STR_3268 :禁止移除高壮的树木 STR_3269 :禁止调整地形 STR_3270 :禁止对地形作任何调整 STR_3271 :禁止高空建造 STR_3272 :禁止任何高空发展 -STR_3273 :较高难度的乐园评价公式 -STR_3274 :使增加乐园评价更具挑战性 -STR_3275 :较难生成游客 +STR_3273 :游乐园评分更难提高和保持 +STR_3274 :使提升游乐园评分更具挑战性 +STR_3275 :更难吸引游客 STR_3276 :使吸引游客更具挑战性 STR_3277 :{WINDOW_COLOUR_2}购买土地的费用: STR_3278 :{WINDOW_COLOUR_2}购买建造权利的费用: -STR_3279 :免费进入乐园 / 需费乘搭游乐设施 -STR_3280 :需费进入乐园 / 免费乘搭游乐设施 -STR_3281 :{WINDOW_COLOUR_2}乐园门票价格: -STR_3282 :选择目标及乐园名称 +STR_3279 :免费进入 / 游乐设施单独付费 +STR_3280 :付费进入 / 免费乘搭游乐设施 +STR_3281 :{WINDOW_COLOUR_2}游乐园门票价格: +STR_3282 :选择游戏目标及游乐园名称 STR_3283 :选择要保留的游乐设施/店铺 -STR_3284 :选取目标 +STR_3284 :选取游戏目标 STR_3285 :保留游乐设施/店铺 STR_3286 :选择此剧情的目标 STR_3287 :{WINDOW_COLOUR_2}目标: @@ -2310,44 +2310,44 @@ STR_3290 :又冷又潮湿 STR_3291 :温暖 STR_3292 :又热又干燥 STR_3293 :寒冷 -STR_3294 :更改… -STR_3295 :更改乐园名称 +STR_3294 :更改…… +STR_3295 :更改游乐园名称 STR_3296 :更改剧情名称 -STR_3297 :更改乐园/剧情的简介 -STR_3298 :{WINDOW_COLOUR_2}乐园名称:{BLACK}{STRINGID} -STR_3299 :{WINDOW_COLOUR_2}乐园/剧情的简介: +STR_3297 :更改游乐园/剧情简介 +STR_3298 :{WINDOW_COLOUR_2}游乐园名称:{BLACK}{STRINGID} +STR_3299 :{WINDOW_COLOUR_2}游乐园/剧情的简介: STR_3300 :{WINDOW_COLOUR_2}剧情名称:{BLACK}{STRINGID} STR_3301 :{WINDOW_COLOUR_2}达成目标的日期: STR_3302 :{WINDOW_COLOUR_2}{MONTHYEAR} STR_3303 :{WINDOW_COLOUR_2}游客数量: -STR_3304 :{WINDOW_COLOUR_2}乐园评价: +STR_3304 :{WINDOW_COLOUR_2}游乐园评分: STR_3305 :{WINDOW_COLOUR_2}每月收入: STR_3306 :{WINDOW_COLOUR_2}每月利润: -STR_3307 :{WINDOW_COLOUR_2}最少长度: +STR_3307 :{WINDOW_COLOUR_2}最短长度: STR_3308 :{WINDOW_COLOUR_2}兴奋度: STR_3309 :{WINDOW_COLOUR_2}{COMMA32} STR_3310 :{WINDOW_COLOUR_2}{LENGTH} STR_3311 :{WINDOW_COLOUR_2}{COMMA2DP32} STR_3312 :{WINDOW_COLOUR_2}请选取要保留的游乐设施/店铺: STR_3313 :剧情命名 -STR_3314 :请输入这个剧情的名称: -STR_3315 :乐园/剧情的简介 -STR_3316 :请输入这个乐园/剧情的简介: +STR_3314 :请输入剧情名称: +STR_3315 :游乐园信息游乐园/剧情简介 +STR_3316 :请输入游乐园/剧情简介: STR_3317 :暂无简介 STR_3318 :选择这个剧情要在哪个组别中显示 STR_3319 :{WINDOW_COLOUR_2}剧情组别: -STR_3320 :无法存储剧情文件… +STR_3320 :无法保存剧情文件…… STR_3321 :成功安装新对象 STR_3322 :{WINDOW_COLOUR_2}目标:{BLACK}{STRINGID} STR_3326 :{WINDOW_COLOUR_2}(暂无图片) STR_3327 :尚未设置游客的开始步行位置 -STR_3328 :不能进行下一步编辑… -STR_3329 :尚未建造乐园入口 -STR_3330 :乐园必需有一些己拥有的土地 -STR_3331 :由地图边缘到乐园入口的道路尚未连接好,或者太复杂——这些道路必需是一格宽度,并以越少交界及弯位越好 -STR_3332 :乐园入口倒转了,或没有道路连接至地图边缘 +STR_3328 :不能进行下一步编辑…… +STR_3329 :尚未建造游乐园入口 +STR_3330 :游乐园必需有一些己拥有的土地 +STR_3331 :由地图边缘到游乐园入口的道路尚未连接好,或者太复杂——这些道路必需一格宽,并尽量减少交汇或绕弯 +STR_3332 :游乐园入口方向错误,或没有道路连接至地图边缘 STR_3333 :在存档中导出附加物 -STR_3334 :选择是否存储插件的储存文件,以便那些没有插件的玩家载入存档 +STR_3334 :选择是否保存插件的储存文件,以便那些没有插件的玩家载入存档 STR_3335 :轨道设计工具——选择游乐设施的类型及车辆种类 STR_3336 :轨道设计管理工具——选择游乐设施的类型 STR_3338 :{BLACK}自定义设计 @@ -2355,22 +2355,22 @@ STR_3339 :{BLACK}{COMMA16}个预设设计,也可自定义设计 STR_3340 :{BLACK}{COMMA16}个预设设计,也可自定义设计 STR_3341 :游戏工具 STR_3342 :剧情编辑器 -STR_3343 :将游戏存档转换成剧情关 +STR_3343 :将游戏存档转换成剧情关卡 STR_3344 :轨道设计工具 STR_3345 :轨道设计管理工具 -STR_3346 :不能保存轨道设计… +STR_3346 :不能保存轨道设计…… STR_3347 :游乐设施过于庞大,包含太多要素或者景物过于分散 STR_3348 :重命名 STR_3349 :删除 STR_3350 :轨道设计命名 STR_3351 :请输入此轨道设计的新名称: -STR_3352 :不能重命名此轨道设计… +STR_3352 :不能重命名此轨道设计…… STR_3353 :新名称包含不可用的字符 STR_3354 :已有相同名称的文件,或文件有写入保护 STR_3355 :文件有写入保护或被锁定 STR_3356 :删除文件 -STR_3357 :{WINDOW_COLOUR_2}你确定要永久删除{STRING}? -STR_3358 :无法删除轨道设计… +STR_3357 :{WINDOW_COLOUR_2}你确定要永久删除{STRING}吗? +STR_3358 :无法删除轨道设计…… STR_3359 :{BLACK}该设施没有已设计好的轨道设计 STR_3360 :警告! STR_3361 :该设施有太多设计——列表不会完全列出 @@ -2386,19 +2386,19 @@ STR_3372 :{BLACK}= 取款机 STR_3373 :{BLACK}= 厕所 STR_3374 :警告:选取了太多对象! STR_3375 :不是在此景观组别中的所有对象都能够选取 -STR_3376 :安装新的… +STR_3376 :安装新的…… STR_3377 :安装新的轨道设计文件 STR_3378 :安装 STR_3379 :取消 STR_3380 :无法安装这个轨道设计 -STR_3381 :不兼容的文件或含有非法数据 +STR_3381 :不兼容的文件或含有无效数据 STR_3382 :复制文件失败 STR_3383 :输入这个轨道设计的新名称 STR_3384 :已有相同名称的轨道设计——请输入这个轨道设计的新名称: -STR_3389 :无法选择额外的景观对象… +STR_3389 :无法选择额外的景观对象…… STR_3390 :选取了太多对象 STR_3437 :在地形中清理大范围内的景物 -STR_3438 :无法移除这里的所有景物… +STR_3438 :无法移除这里的所有景物…… STR_3439 :移除景物 STR_3445 :设置巡逻范围 STR_3446 :取消巡逻范围 @@ -2410,7 +2410,7 @@ STR_5122 :根据轨道类型选择游乐设施(像RCT1一样) STR_5123 :翻新游乐设施 STR_5125 :全可拆除 STR_5126 :随机主题音乐 -STR_5127 :拖曳调整地形,而不调整地势 +STR_5127 :拖曳调整地形,而不调整高度 STR_5128 :选择大小 STR_5129 :请输入介于{COMMA16}-{COMMA16}之间的数字 STR_5130 :地图大小 @@ -2436,10 +2436,10 @@ STR_5149 :显示作弊选项 STR_5150 :开启调试工具 STR_5151 :, STR_5152 :. -STR_5153 :编辑配色主题… +STR_5153 :编辑配色主题…… STR_5154 :使用硬件渲染 STR_5155 :允许测试未完成的轨道设计 -STR_5156 :允许测试大多数轨道设计,即使那些轨道未完成的设计。但这不适用于区域刹车模式。 +STR_5156 :允许测试大多数轨道设计,即使那些轨道未完成的设计。但这不适用于区块制动模式。 STR_5158 :回到主菜单 STR_5159 :退出OpenRCT2 STR_5160 :{POP16}{MONTH} {PUSH16}{PUSH16}{STRINGID},{POP16}第{COMMA16}年 @@ -2447,15 +2447,15 @@ STR_5161 :日期格式: STR_5162 :日/月/年 STR_5163 :月/日/年 STR_5177 :显示模式: -STR_5178 :显示财务秘籍 -STR_5179 :显示游客秘籍 -STR_5180 :显示乐园秘籍 -STR_5181 :显示设备秘籍 +STR_5178 :显示财务作弊工具 +STR_5179 :显示游客作弊工具 +STR_5180 :显示乐园作弊工具 +STR_5181 :显示设施作弊工具 STR_5182 :{INT32} STR_5183 :地面高度 -STR_5184 :请输入介乎{COMMA16}及{COMMA16}的地面高度 +STR_5184 :请输入{COMMA16}及{COMMA16}之间的地面高度 STR_5185 :水面高度 -STR_5186 :请输入介乎{COMMA16}及{COMMA16}的水面高度 +STR_5186 :请输入{COMMA16}及{COMMA16}之间的水面高度 STR_5187 :财务 STR_5188 :新的营销计划 STR_5189 :研发 @@ -2486,13 +2486,13 @@ STR_5213 :目标选项 STR_5214 :生成地图 STR_5215 :轨道设计管理工具 STR_5216 :轨道设计管理工具列表 -STR_5217 :密技 +STR_5217 :作弊 STR_5218 :主题 STR_5219 :选项 STR_5220 :键盘快捷键 STR_5221 :更改键盘快捷键 -STR_5222 :加载/存储 -STR_5223 :存储对话框 +STR_5222 :加载/保存 +STR_5223 :保存对话框 STR_5224 :拆除游乐设施对话框 STR_5225 :解雇员工对话框 STR_5226 :删除轨道设计对话框 @@ -2522,7 +2522,7 @@ STR_5249 :主界面菜单按钮 STR_5250 :主界面退出按钮 STR_5251 :主界面选项按钮 STR_5252 :主界面剧情选择按钮 -STR_5253 :乐园信息 +STR_5253 :游乐园信息 STR_5256 :创建新的主题用于 STR_5257 :基于当前主题创建新主题 STR_5258 :删除当前主题 @@ -2532,7 +2532,7 @@ STR_5261 :过滤 STR_5262 :怪诞世界 STR_5263 :扭曲时间 STR_5264 :自定义 -STR_5265 :选择哪些内容为可视 +STR_5265 :选择可见内容 STR_5266 :显示 STR_5267 :语言及单位 STR_5268 :音效 @@ -2548,20 +2548,20 @@ STR_5278 :沙盒模式 STR_5279 :关闭沙盒模式 STR_5280 :允许从地图视窗中修改土地拥有权,以及其他平常只适用于剧情编辑工具的选项 STR_5281 :功能 -STR_5282 :过山车大亨1式游乐设施开关灯 -STR_5283 :过山车大亨1式乐园开关开关灯 +STR_5282 :过山车大亨1式游乐设施开关指示灯 +STR_5283 :过山车大亨1式游乐园开关指示灯 STR_5284 :过山车大亨1式选择剧情字体 STR_5287 :游乐设施已经故障 STR_5288 :游乐设施已关闭 -STR_5289 :没有故障适用于该设施 +STR_5289 :没有适用于该设施的故障 STR_5290 :维修游乐设施 STR_5291 :不能强制设施故障 STR_5292 :强制故障 STR_5293 :关闭游乐设施/店铺 STR_5294 :测试游乐设施/店铺 STR_5295 :开启游乐设施/店铺 -STR_5296 :关闭乐园 -STR_5297 :开启乐园 +STR_5296 :关闭游乐园 +STR_5297 :开启游乐园 STR_5298 :{RED}{STRINGID} STR_5299 :{LIGHTPINK}{STRINGID} STR_5300 :快速解雇员工 @@ -2577,20 +2577,20 @@ STR_5309 :开源过山车大亨2 (OpenRCT2) STR_5310 :随机 STR_5311 :调试工具 STR_5312 :显示控制台 -STR_5313 :显示地图网格检查工具 -STR_5314 :地图网格检查工具 +STR_5313 :显示地块检查工具 +STR_5314 :地块检查工具 STR_5335 :设施入口 STR_5336 :设施出口 -STR_5337 :乐园入口 +STR_5337 :游乐园入口 STR_5338 :元素类型 STR_5339 :基础高度 STR_5340 :清理高度 STR_5343 :自动放置员工 STR_5344 :更新日志 -STR_5345 :财政秘籍 -STR_5346 :游客秘籍 -STR_5347 :乐园秘籍 -STR_5348 :设施秘籍 +STR_5345 :财政作弊 +STR_5346 :游客作弊 +STR_5347 :乐园作弊 +STR_5348 :设施作弊 STR_5349 :全部游乐设施 STR_5350 :最大 STR_5351 :最小 @@ -2619,7 +2619,7 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :名称已被使用 STR_5440 :当焦点失去时最小化全屏幕的游戏 -STR_5442 :强制乐园评价: +STR_5442 :强制游乐园评价: STR_5447 :类型{STRINGID} STR_5448 :游乐设施/车辆{STRINGID} STR_5449 :减慢游戏速度 @@ -2647,7 +2647,7 @@ STR_5470 :向左滚动地图 STR_5471 :向下滚动地图 STR_5472 :向右滚动地图 STR_5473 :日夜循环 -STR_5474 :横幅上显示全大写英文 +STR_5474 :横幅上显示全大写字母 STR_5475 :{COMMA16}周 STR_5476 :硬件 STR_5477 :地图显示 @@ -2668,10 +2668,10 @@ STR_5492 :剧情选项 STR_5493 :发送信息 STR_5495 :玩家列表 STR_5496 :玩家 -STR_5497 :延迟值(Ping) +STR_5497 :延迟(Ping) STR_5498 :服务器列表 STR_5499 :玩家名称: -STR_5500 :新增服务器 +STR_5500 :添加服务器 STR_5501 :开设服务器 STR_5502 :多人联机模式 STR_5503 :请输入主机名称或IP地址: @@ -2683,7 +2683,7 @@ STR_5511 :(UNKNOWN) STR_5512 :游戏另存为 STR_5513 :(快速)保存游戏 STR_5514 :禁止蓄意毁坏 -STR_5515 :游客愤怒时阻止其可以毁坏公物 +STR_5515 :阻止愤怒的游客毁坏公物 STR_5516 :黑色 STR_5517 :灰色 STR_5518 :白色 @@ -2731,15 +2731,15 @@ STR_5559 :检查间隔为10分钟 STR_5560 :将所有游乐设施的检查时间间隔设定为“每10分钟” STR_5561 :加载语言失败 STR_5562 :警告! -STR_5563 :此功能暂未稳定地使用,请多加留意。 +STR_5563 :此功能暂不稳定,请谨慎使用。 STR_5566 :密码: -STR_5567 :对外广播 +STR_5567 :对外宣传 STR_5568 :需要密码 STR_5569 :此服务器需要密码 STR_5570 :获取服务器 STR_5571 :加入游戏 STR_5572 :添加至收藏 -STR_5573 :从收藏中去除 +STR_5573 :取消收藏 STR_5574 :服务器名称: STR_5575 :最大人数: STR_5576 :端口: @@ -2756,16 +2756,16 @@ STR_5586 :自动开放商店和摊位 STR_5587 :商店和摊位将在建造好后自动开放 STR_5588 :与其他玩家一起玩 STR_5589 :消息选项 -STR_5590 :乐园奖项 +STR_5590 :游乐园奖项 STR_5591 :推广计划已完结 -STR_5592 :有关乐园的警告 -STR_5593 :有关乐园评价的警告 +STR_5592 :有关游乐园的警告 +STR_5593 :有关游乐园评价的警告 STR_5594 :游乐设施发生故障 STR_5595 :游乐设施毁坏了 STR_5596 :有关游乐设施的警告 STR_5597 :研发好的游乐设施,商店或景物 STR_5598 :有关游客的警告 -STR_5600 :游客已离开乐园 +STR_5600 :游客已离开游乐园 STR_5601 :游客正在排队游玩某个游乐设施 STR_5602 :游客已乘上游乐设施 STR_5603 :游客已离开游乐设施 @@ -2781,7 +2781,7 @@ STR_5612 :鬼旗 STR_5613 :B STR_5614 :损坏标记 STR_5615 :L -STR_5616 :网格标记的最后一个元素 +STR_5616 :地块标记的最后一个元素 STR_5617 :将选中的元素移至上方。 STR_5618 :将选中的元素移至下方。 STR_5619 :过山车大亨 @@ -2797,19 +2797,19 @@ STR_5628 :游戏出处 STR_5629 :困难度 STR_5630 :允许逐步解锁 STR_5631 :原版DLC游乐园 -STR_5632 :修建你自己的… +STR_5632 :修建你自己的…… STR_5633 :CMD + STR_5634 :OPTION + STR_5635 :{WINDOW_COLOUR_2}花费:{BLACK}{CURRENCY2DP} STR_5636 :{WINDOW_COLOUR_2}命令运行:{BLACK}{COMMA16} -STR_5637 :不能做此行为… +STR_5637 :不能做此行为…… STR_5638 :权限不够 STR_5639 :显示玩家列表 -STR_5640 :组管理 -STR_5641 :默认组: -STR_5642 :组 -STR_5643 :添加组 -STR_5644 :删除组 +STR_5640 :权限组管理 +STR_5641 :默认权限组: +STR_5642 :权限组 +STR_5643 :添加权限组 +STR_5644 :删除权限组 STR_5645 :聊天 STR_5646 :修改地势 STR_5647 :切换暂停 @@ -2821,12 +2821,12 @@ STR_5652 :游乐设施属性 STR_5653 :景观 STR_5654 :道路 STR_5655 :游客 -STR_5656 :职员 +STR_5656 :工作人员 STR_5657 :游乐园属性 STR_5658 :游乐园资金 STR_5659 :踢出玩家 -STR_5660 :修改组 -STR_5661 :设置玩家组 +STR_5660 :修改权限组 +STR_5661 :设置玩家权限组 STR_5662 :不适用 STR_5663 :清除景物 STR_5664 :作弊 @@ -2836,13 +2836,13 @@ STR_5701 :{WINDOW_COLOUR_2}最近的行为:{BLACK}{STRINGID} STR_5702 :定位玩家最近的动作 STR_5703 :不能踢出创建者 STR_5704 :最近的行为 -STR_5705 :不能将此玩家分配到该组 -STR_5706 :不能删除有玩家在内的组 -STR_5707 :不能修改此组 -STR_5708 :不能改变创建者所在的组 -STR_5709 :重命名组 -STR_5710 :组名 -STR_5711 :请输入该组的新名称: +STR_5705 :不能将此玩家分配到该权限组 +STR_5706 :不能删除有玩家在内的权限组 +STR_5707 :不能修改此权限组 +STR_5708 :不能改变创建者所在的权限组 +STR_5709 :重命名权限组 +STR_5710 :权限组名 +STR_5711 :请输入该权限组的新名称: STR_5712 :不能修改你没有的权限 STR_5713 :踢出玩家 STR_5714 :显示设置窗口 @@ -2856,7 +2856,7 @@ STR_5720 :多云间晴 STR_5721 :多云 STR_5722 :下雨 STR_5723 :大雨 -STR_5724 :大雷雨 +STR_5724 :雷暴 STR_5725 :{BLACK}强制设定天气为: STR_5726 :设定游乐园当前的天气 # tooltip for tab in options window @@ -2868,9 +2868,9 @@ STR_5738 :已关闭,{COMMA16}个游客仍在此游乐设施上 STR_5739 :{WINDOW_COLOUR_2}此游乐设施上的游客:{BLACK}{COMMA16} STR_5740 :永不结束的市场推广计划 STR_5741 :推广计划将不断进行下去 -STR_5742 :认证中… -STR_5743 :连接中… -STR_5744 :解析中… +STR_5742 :认证中…… +STR_5743 :连接中…… +STR_5744 :解析中…… STR_5745 :检测到网络不同步 STR_5746 :已断线 STR_5747 :已断线:{STRING} @@ -2885,14 +2885,14 @@ STR_5755 :不正确的游戏版本(服务器版本为{STRING}) STR_5756 :密码错误 STR_5757 :服务器人数已满 STR_5758 :{OUTLINE}{GREEN}{STRING}已加入游戏 -STR_5759 :下载地图中 …({INT32} / {INT32})KB +STR_5759 :下载地图中 …… STR_5760 :港币(HK$) STR_5761 :新台币(NT$) STR_5762 :人民币(CN¥) STR_5763 :所有文件 STR_5764 :不正确的游乐设施类型 STR_5765 :无法修改类型不正确的游乐设施 -STR_5766 : +STR_5766 :匈牙利福林(Ft) STR_5767 :收入 STR_5768 :总游客数 STR_5769 :总利润 @@ -2911,18 +2911,18 @@ STR_5781 :运营成本:未知 STR_5782 :你已经连接到服务器,请按“{STRING}”开始聊天。 STR_5783 :{WINDOW_COLOUR_2}剧情未解锁 STR_5784 :{BLACK}完成稍早的剧情来解锁此剧情。 -STR_5785 :不能重命名组… +STR_5785 :不能重命名权限组…… STR_5786 :不正确的组名称 STR_5787 :{COMMA32}玩家在线 STR_5788 :默认检查的时间间隔: STR_5789 :禁用光影效果 STR_5790 :切换RCT1式的收费{NEWLINE}(例如同时收取游乐设施及入园门票费用) STR_5791 :设定所有游乐设施的可靠度为100%{NEWLINE}并重设他们的落成年份为“今年” -STR_5792 :修理所有已有故障的游乐设施 -STR_5793 :重设指定游乐设施的故障记录,{NEWLINE}令游客不觉得该设施不安全 -STR_5794 :此密技移除某些剧情禁止修改{NEWLINE}某些已预先建设好的游乐设施的限制 -STR_5795 :游客会乘坐所有乐园内的游乐设施{NEWLINE}即使它们的刺激度极端地高 -STR_5796 :强制开发或关闭游乐园 +STR_5792 :修理所有故障的游乐设施 +STR_5793 :重设指定游乐设施的故障记录,{NEWLINE}让游客不觉得该设施不安全 +STR_5794 :此作弊选项移除某些剧情禁止修改{NEWLINE}某些已预先建设好的游乐设施的限制 +STR_5795 :游客会乘坐所有园区内的游乐设施{NEWLINE}即使它们的刺激度极端地高 +STR_5796 :强制开放或关闭游乐园 STR_5797 :禁止天气变化并{NEWLINE}固定于选择的天气 STR_5798 :暂停时允许建造 STR_5799 :禁止因刹车故障产生的损坏及撞毁 @@ -2937,7 +2937,7 @@ STR_5807 :{WINDOW_COLOUR_2}游乐设施数量:{BLACK}{COMMA16} STR_5808 :{WINDOW_COLOUR_2}商店及摊贩数量:{BLACK}{COMMA16} STR_5809 :{WINDOW_COLOUR_2}信息亭及其他设施数量:{BLACK}{COMMA16} STR_5810 :禁用车辆限制 -STR_5811 :若选中此选项,每列车将最多{NEWLINE}有255辆车厢以及每个游乐设施最多有31辆列车 +STR_5811 :若选中此选项,每列车将最多{NEWLINE}有255辆车厢以且每个游乐设施最多有31辆列车 STR_5812 :显示多人模式窗口 STR_5813 :“{STRING}” STR_5814 :{WINDOW_COLOUR_1}“{STRING}” @@ -2954,7 +2954,7 @@ STR_5825 :在窗口内保持鼠标指针 STR_5826 :拖拽视野时时反转鼠标右键 STR_5827 :设置游戏界面使用的配色主题 STR_5828 :修改距离,速度等度量单位。 -STR_5829 :修改游戏使用的货币。只是纯视觉效果并没有根据汇率换算 +STR_5829 :修改游戏使用的货币。仅为视觉效果,没有汇率换算。 STR_5830 :修改游戏使用的语言 STR_5831 :修改温度显示的单位 STR_5832 :高度用通用单位替换“距离和速度单位”中设置的单位 @@ -3020,11 +3020,11 @@ STR_5894 :请输入汇率 STR_5895 :保存轨道设计 STR_5896 :保存轨道设计失败! STR_5898 :{BLACK}无法加载轨道,文件可能{NEWLINE}损坏或丢失! -STR_5899 :开启/关闭debug窗口 +STR_5899 :开启/关闭调试窗口 STR_5900 :使用原始的渲染代码 STR_5901 :显示分段高度 STR_5902 :显示包围盒 -STR_5903 :显示debug窗口 +STR_5903 :显示调试窗口 STR_5904 :重置日期 STR_5905 :一个能自动创建自定义地形的地图生成工具 STR_5906 :放大到鼠标所在位置 @@ -3074,7 +3074,7 @@ STR_5949 :提升坡 STR_5950 :将改变应用于整个轨道组件中 STR_5951 :轨道组件ID:{BLACK}{COMMA16} STR_5952 :编号:{BLACK}{COMMA16} -STR_5953 :以底部高度排序目前网格上的地图元素 +STR_5953 :以底部高度排序目前地块上的地图元素 STR_5954 :景物年龄:{BLACK}{COMMA16} STR_5955 :四角放置:{BLACK}{STRINGID} STR_5956 :西南 @@ -3095,7 +3095,7 @@ STR_5970 :入口编号:{BLACK}{COMMA16} STR_5971 :出口编号:{BLACK}{COMMA16} STR_5972 :游乐设施编号:{BLACK}{COMMA16} STR_5973 :与下一地图元素并列 -STR_5974 :将此元素的基准和净高度与下一元素调整一致,这可以让在网格上建造变得更加容易。 +STR_5974 :将此元素的基准和净高度与下一元素调整一致,这可以让在地块上建造变得更加容易。 STR_5975 :坡道: STR_5976 :平坦 STR_5977 :右边向上 @@ -3112,7 +3112,7 @@ STR_5987 :无法建立新文件夹 STR_5988 :已经没有可出售的土地使用权 STR_5989 :已经没有可出售的土地建造权 STR_5990 :已经没有可出售的土地使用权或建造权 -STR_5991 :无法粘贴元素… +STR_5991 :无法粘贴元素…… STR_5992 :地图元素已达上限 STR_5993 :复制所选元素 STR_5994 :粘贴所选元素 @@ -3137,7 +3137,7 @@ STR_6012 :{COMMA1DP16} STR_6013 :游客仅需付费购买游乐园门票和服务。{NEWLINE}搭乘游乐设施免费。 STR_6014 :游客仅需付费购买游乐设施门票和服务。{NEWLINE}进入游乐园免费。 STR_6015 :坡道 -STR_6016 :修改网格 +STR_6016 :修改地块 STR_6017 :请调低速度 STR_6018 :游乐设施建造——向左转 STR_6019 :游乐设施建造——向右转 @@ -3162,13 +3162,13 @@ STR_6037 :请选择一个有效的过山车大亨1的目录 STR_6038 :如果你安装了过山车大亨1,设置此选项到其路径以便读取剧情,音乐等。 STR_6039 :快速拆除游乐设施 STR_6040 :编辑剧情选项 -STR_6041 :{BLACK}没有雇佣机械师! +STR_6041 :{BLACK}没有雇佣维修人员! STR_6042 :加载高度图 STR_6043 :选择高度图 STR_6044 :平滑高度图 STR_6045 :强度 STR_6046 :归一化高度图 -STR_6047 :平滑网格 +STR_6047 :平滑地块 STR_6048 :高度图错误 STR_6049 :PNG读取错误 STR_6050 :位图读取错误 @@ -3190,12 +3190,12 @@ STR_6066 :在你的用户文件夹下用文件记录所有用户的操作。 STR_6067 :服务器开启。 STR_6068 :服务器关闭。 STR_6069 :{STRING}被{STRING}从服务器踢出。 -STR_6070 :{STRING}被设置到组“{STRING}”,通过{STRING}设置。 -STR_6071 :{STRING}创建新的玩家组“{STRING}”。 -STR_6072 :{STRING}删除玩家组“{STRING}”。 -STR_6073 :{STRING}编辑玩家组“{STRING}”的权限。 -STR_6074 :{STRING}将玩家组名称从“{STRING}”改名为“{STRING}”。 -STR_6075 :{STRING}设置默认玩家组为“{STRING}”。 +STR_6070 :{STRING}被设置到权限组“{STRING}”,通过{STRING}设置。 +STR_6071 :{STRING}创建新的权限组“{STRING}”。 +STR_6072 :{STRING}删除权限组“{STRING}”。 +STR_6073 :{STRING}编辑权限组“{STRING}”的权限。 +STR_6074 :{STRING}将权限组名称从“{STRING}”改名为“{STRING}”。 +STR_6075 :{STRING}设置默认权限组为“{STRING}”。 STR_6076 :{STRING}使用/开启作弊“{STRING}”。 STR_6077 :增加金钱 STR_6078 :{STRING}建造游乐设施“{STRING}”。 @@ -3228,7 +3228,7 @@ STR_6105 :超级过山车 STR_6107 :怪兽卡车 STR_6109 :超旋转式 STR_6111 :经典迷你过山车 -STR_6113 :一种高大的非翻转的过山车,拥有巨大降落,高速和只有围栏限制的舒适的车厢 +STR_6113 :一种高大的非翻转的过山车,拥有巨大下坡,高速和只有围栏限制的舒适的车厢 STR_6115 :动力十足的4x4四驱卡车,可以攀爬陡峭的斜坡 STR_6116 :宽阔的过山车车厢沿着光滑的钢轨滑行,穿过各种倒置轨道 STR_6119 :一种廉价且方便建造的过山车,但是有高度限制 @@ -3249,22 +3249,22 @@ STR_6133 :使用还未被研究出的游乐设施和景观 STR_6134 :清除景物 STR_6135 :客户端发送了无效的请求 STR_6136 :服务器发送了无效的请求 -STR_6137 :OpenRCT2,一款免费且开源的对于过山车大亨2再创作的重置扩展游戏。 -STR_6138 :OpenRCT2是一款由许多作者共同开发的作品,完整的列表可在上方“贡献者”按钮找到。请访问 http://github.com/OpenRCT2/OpenRCT2 获取更多信息 +STR_6137 :开源过山车大亨2(OpenRCT2),一款免费且开源的对于过山车大亨2再创作的重置扩展游戏。 +STR_6138 :开源过山车大亨2(OpenRCT2)是一款由许多作者共同开发的作品,完整的列表可在上方“贡献者”按钮找到。请访问 http://github.com/OpenRCT2/OpenRCT2 获取更多信息 STR_6139 :所有的产品及公司名称均属其拥有者所有。使用那些名称并不代表本项目与其有任何联系或认可。 -STR_6140 :更新日志… +STR_6140 :更新日志…… STR_6141 :过山车大亨1样式的底部工具栏 STR_6142 :{WINDOW_COLOUR_2}轨道名称:{BLACK}{STRING} STR_6143 :{WINDOW_COLOUR_2}游乐设施类型:{BLACK}{STRINGID} STR_6144 :显示无效块 STR_6145 :设置加速器的速度限制 -STR_6146 :启用所有可喷涂的轨道部件 -STR_6147 :不管车辆是否支持,在建造窗口中启用游乐设施支持的所有类型的轨道部件。 -STR_6148 :正在连接主服务器… +STR_6146 :启用所有可渲染的轨道部件 +STR_6147 :在建造窗口中启用该设备类型所能使用的所有轨道部件,无论车辆是否支持这些部件。 +STR_6148 :正在连接主服务器…… STR_6149 :无法连接主服务器 -STR_6150 :主服务器返回不正确的响应信息(没有 JSON 数字) +STR_6150 :主服务器返回无效的响应信息(无 JSON 数字) STR_6151 :主服务器没能返回服务 -STR_6152 :主服务器返回不正确的响应信息(没有 JSON 数组) +STR_6152 :主服务器返回无效的响应信息(无 JSON 数组) STR_6153 :付费进入游乐园 / 为每一个游乐设施付费 STR_6154 :因为安全原因,不推荐提高权限来运行OpenRCT2。 STR_6155 :KDialog和Zenity库均没有安装。请至少安装其一,或者在命令行配置它们。 @@ -3285,7 +3285,7 @@ STR_6171 :查找 STR_6172 :查找 STR_6173 :请输入名字来查找: STR_6188 :呕吐物 -STR_6189 :样子 +STR_6189 :鸭子 STR_6191 :表面 STR_6192 :墙 STR_6193 :{COMMA16}位游客 @@ -3305,8 +3305,8 @@ STR_6217 :游乐设施 / 轨道可用性 STR_6218 :OpenRCT2官方 STR_6219 :高亮道路相关物 STR_6220 :使之可用 -STR_6221 :每个站台只能有一个入口或出口可用。 -STR_6222 :无法在此放置游客入口… +STR_6221 :将游乐设施的已知入口或出口位置设置为当前选定的地块。每个站台只能拥有一个入口或出口。 +STR_6222 :无法在此放置游客入口…… STR_6223 :必须在游乐园边界外! STR_6224 :{STRING}放置一个游客入口。 STR_6225 :不支持OpenGL渲染 @@ -3321,41 +3321,41 @@ STR_6233 :剖视图视角 STR_6234 :高亮道路相关物 STR_6235 :服务器信息 STR_6236 :玩家 -STR_6237 :组 +STR_6237 :权限组 STR_6238 :多人选项 STR_6239 :垂直切割 STR_6240 :纵横切割 STR_6241 :选择面积 STR_6242 :清空选项 STR_6243 :翻新游乐设施,{NEWLINE}让其焕然一新 -STR_6244 :无法翻新游乐设施… +STR_6244 :无法翻新游乐设施…… STR_6245 :无需翻新游乐设施 STR_6246 :翻新 -STR_6247 :翻新游乐设施/胜地 +STR_6247 :翻新游乐设施/景点 STR_6248 :{WINDOW_COLOUR_1}你是否要翻新{STRINGID}以获得{CURRENCY}? STR_6249 :{WINDOW_COLOUR_1}你是否要翻新{STRINGID}? STR_6250 :{WINDOW_COLOUR_1}你是否确定要完全拆除{STRINGID}以获得{CURRENCY}? STR_6251 :游乐设施尚未清空 STR_6255 :链接无效 STR_6256 :渲染效果 -STR_6257 :明净的(半透明) -STR_6258 :澄清(透明) +STR_6257 :透视(半透明) +STR_6258 :隐藏(透明) STR_6259 :已停用 -STR_6260 :显示受阻网格 +STR_6260 :显示受阻地块 STR_6261 :显示宽阔走道 STR_6262 :主音量 STR_6263 :切换所有声音开/关 -STR_6264 :总是使用系统的文件浏览器 -STR_6265 :当启用后,操作系统自带的文件浏览器将代替OpenRCT2的。 +STR_6264 :总是使用系统文件浏览器 +STR_6265 :启用后,操作系统自带的文件浏览器将代替OpenRCT2的。 STR_6266 :打开自定义内容文件夹 -STR_6267 :打开网格检查器 +STR_6267 :打开地块检查器 STR_6268 :移至下一帧 STR_6269 :非法的气候ID STR_6270 :地表 STR_6271 :地表边缘 STR_6272 :站台 STR_6273 :音乐 -STR_6274 :无法设置配色主题… +STR_6274 :无法设置配色主题…… STR_6275 :{WINDOW_COLOUR_2}车站类型: STR_6276 :{RED}{STRINGID}有游客被困住了,这可能是因为无效的设施类型或者运行模式 STR_6277 :车站编号:{BLACK}{STRINGID} @@ -3398,7 +3398,7 @@ STR_6322 :{WINDOW_COLOUR_2}实体编号:{BLACK}{INT32} STR_6323 :模拟中 STR_6324 :模拟 STR_6325 :模拟设施/景点 -STR_6326 :无法模拟{STRINGID}… +STR_6326 :无法模拟{STRINGID}…… STR_6327 :大型截图使用透明背景 STR_6328 :开启此选项,大型截图将会使用透明的背景而不是默认的黑色背景 STR_6329 :{STRING}{STRINGID} @@ -3407,17 +3407,17 @@ STR_6331 :生成鸭子 STR_6332 :移除鸭子 STR_6333 :增加缩放比例 STR_6334 :减小缩放比例 -STR_6336 :地图网格检查工具:拷贝元素 -STR_6337 :地图网格检查工具:粘贴元素 -STR_6338 :地图网格检查工具:删除元素 -STR_6339 :地图网格检查工具:向上移动元素 -STR_6340 :地图网格检查工具:向下移动元素 -STR_6341 :地图网格检查工具:增加X坐标 -STR_6342 :地图网格检查工具:减少X坐标 -STR_6343 :地图网格检查工具:增加Y坐标 -STR_6344 :地图网格检查工具:减少Y坐标 -STR_6345 :地图网格检查工具:增加元素高度 -STR_6346 :地图网格检查工具:减少元素高度 +STR_6336 :地块检查工具:拷贝元素 +STR_6337 :地块检查工具:粘贴元素 +STR_6338 :地块检查工具:删除元素 +STR_6339 :地块检查工具:向上移动元素 +STR_6340 :地块检查工具:向下移动元素 +STR_6341 :地块检查工具:增加X坐标 +STR_6342 :地块检查工具:减少X坐标 +STR_6343 :地块检查工具:增加Y坐标 +STR_6344 :地块检查工具:减少Y坐标 +STR_6345 :地块检查工具:增加元素高度 +STR_6346 :地块检查工具:减少元素高度 STR_6347 :路径添加不能放置在平交道口上! STR_6348 :请先移除平交道口! STR_6349 :随机标题序列 @@ -3449,7 +3449,7 @@ STR_6374 :C STR_6375 :未知设施 STR_6376 :{WINDOW_COLOUR_2}设施载具:{NEWLINE}{BLACK}{STRINGID}给{STRINGID} STR_6377 :{WINDOW_COLOUR_2}类型:{BLACK}{STRINGID}给{STRINGID} -STR_6378 :接收对象列表:{INT32} / {INT32} +STR_6378 :接收对象列表: STR_6379 :接收到无效数据 STR_6380 :有更新! STR_6381 :快来加入 OpenRCT2 的 Discord! @@ -3458,8 +3458,8 @@ STR_6383 :打开下载页 STR_6384 :雪 STR_6385 :大雪 STR_6386 :大暴雪 -STR_6387 :不能更低了… -STR_6388 :不能更高了… +STR_6387 :不能更低了…… +STR_6388 :不能更高了…… STR_6389 :无效的许可 STR_6390 :OpenRCT2需要原版过山车大亨2的文件才能工作,请选择您的过山车大亨2安装目录 STR_6391 :请选择您的过山车大亨2安装目录 @@ -3510,7 +3510,7 @@ STR_6435 :{WINDOW_COLOUR_2}破坏被停止:{BLACK}{COMMA32} STR_6436 :切换至可见 STR_6437 :可见 STR_6438 :{MOVE_X}{2}👁 -STR_6439 :地图网格检查工具:切换隐性 +STR_6439 :地块检查工具:切换隐形 STR_6440 :透明的水 STR_6441 :至少选择一个非队列人行道表面样式 STR_6442 :至少选择一个队列人行道表面样式 @@ -3525,8 +3525,8 @@ STR_6450 :{BLACK}“{STRING}” STR_6451 :{BLACK}“{STRING}”——{STRING} STR_6452 :{WINDOW_COLOUR_2}销售:{BLACK}{STRING} STR_6453 :拷贝版本信息 -STR_6454 :不能重命名横幅… -STR_6455 :不能重命名标志… +STR_6454 :不能重命名横幅…… +STR_6455 :不能重命名标志…… STR_6456 :大型截图 STR_6457 :在GitHub上反馈BUG(英文) STR_6458 :在主屏幕跟随 @@ -3558,7 +3558,7 @@ STR_6484 :半透明植被切换 STR_6485 :半透明载具切换 STR_6486 :隐藏游客切换 STR_6487 :隐藏员工切换 -STR_6488 :{RED}游客在抱怨排队区的长度。{NEWLINE}请考虑减少造成问题的队列长度或增加设施的游客接待量(试试增加列车数?) +STR_6488 :{RED}游客在抱怨排队区的长度。{NEWLINE}请考虑减少造成问题的队列长度或增加设施的吞吐量 STR_6489 :错误:不兼容的公园版本 STR_6490 :警告:半兼容的公园版本 STR_6491 :这个公园是较新版本的OpenRCT2保存的,存档创建的版本:v{INT32},您至少需要将游戏更新至 v{INT32}才可以运行。您目前正在使用 v{INT32}。 @@ -3567,13 +3567,13 @@ STR_6493 :这个公园是较新版本的OpenRCT2保存的,一些数据或 STR_6494 :按设施类型分类 STR_6495 :按设施的类型分类显示而不是直接显示各个载具 STR_6496 :{WINDOW_COLOUR_2}{STRINGID} -STR_6497 :点击网格以显示元素信息{NEWLINE}按住Ctrl点击网格元素以直接选择 +STR_6497 :点击地块以显示元素信息{NEWLINE}按住Ctrl点击地块元素以直接选择 STR_6498 :开启以保持正方形的地图形状 STR_6499 :此载具类型并不被此轨道设计支持 STR_6500 :此轨道元素并不被此轨道设计支持 STR_6501 :随机颜色 -STR_6502 :输入值在 {COMMA16}和 {COMMA16}之间 -STR_6503 :至少需要选择一个车站项目 +STR_6502 :输入值在{COMMA16}和{COMMA16}之间 +STR_6503 :至少需要选择一个车站元素 STR_6504 :至少需要选择一个地表 STR_6505 :至少需要选择一个地表边缘 STR_6506 :大型半螺旋(向左转) @@ -3590,12 +3590,12 @@ STR_6516 :一个或多个项目附加需要链接过山车大亨1才能正常 STR_6517 :在此乐园中的一个或多个项目需要链接过山车大亨1才能正常显示。将使用备用图像显示。 STR_6518 :{BLACK}将鼠标悬停在剧本上可查看其说明和目标。单击它开始游玩。 STR_6519 :额外内容 -STR_6520 :资产包 +STR_6520 :附加包 STR_6521 :低优先级 STR_6522 :高优先级 -STR_6523 :降低所选资产包的优先级 -STR_6524 :增加所选资产包的优先级 -STR_6525 :使用已启用的资产包重新加载在游戏中的所有资产 +STR_6523 :降低所选附加包的优先级 +STR_6524 :增加所选附加包的优先级 +STR_6525 :使用已启用的附加包重新加载在游戏中的所有附加内容 STR_6526 :(基础图形、音乐及音效) STR_6527 :竞赛 STR_6528 :无效的轨道参数! @@ -3606,14 +3606,14 @@ STR_6532 :凯蒂的幻想世界 STR_6533 :{WINDOW_COLOUR_2}兴奋度:{BLACK}-{COMMA16}% STR_6534 :{WINDOW_COLOUR_2}刺激度:{BLACK}-{COMMA16}% STR_6535 :{WINDOW_COLOUR_2}眩晕度:{BLACK}-{COMMA16}% -STR_6536 :这个公园是较新版本的OpenRCT2保存的,存档创建的版本:v{INT32},您目前正在使用v{INT32}。 +STR_6536 :这个游乐园是较新版本的OpenRCT2保存的,存档创建的版本:v{INT32},您目前正在使用v{INT32}。 STR_6537 :允许使用普通道路作为队列道路使用 STR_6538 :在道路窗口中的队列道路选择框中显示普通道路。 STR_6539 :关闭制动器 STR_6540 :{WINDOW_COLOUR_2}特别感谢以下公司允许他们的肖像: STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group,Josef Wiegand GmbH & Co. KG STR_6542 :贡献者 -STR_6543 :贡献者… +STR_6543 :贡献者…… STR_6544 :贷款不得为负! STR_6545 :使用RCT1的贷款汇率 STR_6546 :使用过山车大亨1的贷款利率算法,此算法使用固定的1.33%作为贷款利率。 @@ -3648,7 +3648,7 @@ STR_6574 :虚空 STR_6575 :允许特殊配色 STR_6576 :在调色板中加入特殊颜色 STR_6577 :分段制动器速度 -STR_6578 :给分段制动器设置速度上限。 在分段模式中, 相邻的速度较慢的制动器与分段制动器相连. +STR_6578 :给分段制动器设置速度上限。 在分段模式中,相邻的速度较慢的制动器与分段制动器相连。 STR_6579 :保存为轨道设计时,分段制动器速度将设置为默认速度。 STR_6580 :重置 STR_6581 :您确定要重置此标签页上的所有快捷键吗? @@ -3664,7 +3664,7 @@ STR_6590 :在左侧显示窗口按钮(例如关闭窗口的按钮)在标 STR_6591 :维修人员目前正在修理游乐设施,不能被开除。 STR_6592 :维修人员目前正在检查游乐设施,不能被开除。 STR_6593 :拆除公园围栏 -STR_6594 :单元检查器:切换墙面坡度 +STR_6594 :地块检查器:切换墙面坡度 STR_6595 :{WINDOW_COLOUR_2}作者: {BLACK}{STRING} STR_6596 :{WINDOW_COLOUR_2}作者: {BLACK}{STRING} STR_6597 :参数无效 @@ -3677,7 +3677,7 @@ STR_6603 :未找到游乐设施入口 STR_6604 :未找到玩家 STR_6605 :未找到入口 STR_6606 :未找到地表元素 -STR_6607 :未找到单元元素 +STR_6607 :未找到地块元素 STR_6608 :未找到轨道元素 STR_6609 :未找到轨道块 STR_6610 :未找到道路元素 @@ -3687,17 +3687,35 @@ STR_6613 :重新加载对象 STR_6614 :无法更改公园门票 STR_6615 :这个位置上的轨道下需要有水 STR_6616 :对该工作人员类型无效 -STR_6617 :无法将单元与自身互换 -STR_6618 :无法限制或取消限制对象... +STR_6617 :无法将地块与自身互换 +STR_6618 :无法限制或取消限制对象…… STR_6619 :无法限制对象类型! STR_6620 :未找到对象! STR_6621 :限制 STR_6622 :将对象限制在“场景编辑器”和“沙盒”模式中。 STR_6623 :输入“help”查看可用命令列表。输入“hide”隐藏控制台。 -STR_6624 :单元检查器:对元素进行排序 +STR_6624 :地块检查器:对元素进行排序 STR_6625 :颜色无效 STR_6626 :动画是反向的 STR_6627 :轨道速度过快! +STR_6628 :只能放置在路径边缘! +STR_6629 :将工具栏按钮水平居中对齐 +STR_6630 :此设置将使工具栏按钮水平排列在屏幕中央。传统的对齐方式是将它们排列在左右两个角落。 +STR_6631 :加载中…… +STR_6632 :检查物品文件…… +STR_6633 :检查剧情文件…… +STR_6634 :检查轨道设计文件…… +STR_6635 :检查附加包…… +STR_6636 :检查开场动画…… +STR_6637 :加载开场动画…… +STR_6638 :放大用户界面 +STR_6639 :修改用户界面,使其更适合触屏控制 +STR_6640 :编辑附加包…… +STR_6641 :加载进度条窗口 +STR_6642 :{STRING}({COMMA32} / {COMMA32}) +STR_6643 :{STRING}({COMMA32} / {COMMA32} 千字节) +STR_6644 :增强触控模式 +STR_6645 :将一些用户界面元素放大,使其更容易点击或触碰。 ############# # Scenarios # @@ -3707,22 +3725,22 @@ STR_6627 :轨道速度过快! STR_SCNR :森之边林 STR_PARK :森之边林 -STR_DTLS :在隐藏于森林深处的空地中,建造一个很受欢迎的游乐园 +STR_DTLS :在隐藏于森林深处的空地中,建造一个繁荣的主题公园 STR_SCNR :炸药山丘 STR_PARK :炸药山丘 -STR_DTLS :这个座立于沙漠中的乐园只有一座云霄飞车,但不缺乏可供扩充的空地 +STR_DTLS :这个坐立于沙漠中的乐园只有一座云霄飞车,但不缺乏可供扩充的空地 STR_SCNR :茂林湖 STR_PARK :茂林湖 -STR_DTLS :在一个大型湖泊的旁边,由零开始建造一个乐园 +STR_DTLS :在一个大型湖泊的旁边,从零开始兴建一个主题乐园 STR_SCNR :钻石高地 STR_PARK :钻石高地 -STR_DTLS :钻石高地已经是一个拥有极佳游乐设施,并且很发展得很成功的乐园——继续发展它让它的价值翻倍 +STR_DTLS :钻石高地已经是一个拥有极佳游乐设施,并且很发展得很成功的乐园——继续发展以让它的价值翻倍 STR_SCNR :常青花园 @@ -3732,11 +3750,11 @@ STR_DTLS :将景色优美的常青花园转型成一个很受欢迎的乐园 STR_SCNR :邦布利海滩 STR_PARK :邦布利海滩 -STR_DTLS :将邦布利海滩这个小型乐园发展成一个很受欢迎的乐园 +STR_DTLS :将邦布利海滩这个小型乐园发展成一个繁荣的主题乐园 -STR_SCNR :三位一体群岛 -STR_PARK :三位一体群岛 +STR_SCNR :三体群岛 +STR_PARK :三体群岛 STR_DTLS :几个邻近的岛屿组成了这个新乐园的基本地势 @@ -3823,7 +3841,7 @@ STR_DTLS :将海边悬崖开发成繁华的游乐园 STR_SCNR :三猴乐园 STR_PARK :三猴乐园 -STR_DTLS :这个大型发展中公园的中心是一个巨大的三轨钢过山车 +STR_DTLS :这个大型发展中公园的中心是一个巨大的三轨钢制过山车 STR_SCNR :金丝雀矿 @@ -3903,7 +3921,7 @@ STR_DTLS :这里的天气非常潮湿,以至于建造了一个巨大的金 STR_SCNR :和声山丘 STR_PARK :和声山丘 -STR_DTLS :在这个公园当地政府不允许建造比树高的设施 +STR_DTLS :这个公园当地的政府不允许建造比树高的设施 STR_SCNR :罗马村庄 @@ -3933,17 +3951,17 @@ STR_DTLS :杂草丛生,破败不堪,你能复活这个曾经伟大的游 STR_SCNR :惨淡森林 STR_PARK :惨淡森林 -STR_DTLS :充满设计不良和危险的游乐设施,您的预算和时间非常有限,解决这些问题并扭转公园 +STR_DTLS :充满设计不良和危险的游乐设施,您的预算和时间非常有限,解决这些问题并扭转乐园的颓势。 STR_SCNR :腌黄瓜公园 STR_PARK :腌黄瓜公园 -STR_DTLS :地方政府不允许任何形式的广告或促销,所以这个公园必须靠声誉才能成功 +STR_DTLS :地方政府不允许任何形式的广告或促销,所以这个公园必须靠声誉才能赢得成功。 STR_SCNR :伤心嬉笑 STR_PARK :伤心嬉笑 -STR_DTLS :四车道障碍赛是这个扩建公园的核心 +STR_DTLS :四车道障碍赛是这个不断扩大的游乐园的核心 STR_SCNR :采石场公园 @@ -3951,8 +3969,8 @@ STR_PARK :采石场公园 STR_DTLS :将这个废弃的采石场变成吸引寻求刺激的游客的地方 -STR_SCNR :过山车狂热 -STR_PARK :过山车狂热 +STR_SCNR :狂热过山车 +STR_PARK :狂热过山车 STR_DTLS :用有限的金钱和无限的时间把这个山脚下的地区变成一个巨大的游乐园吧 @@ -3973,8 +3991,8 @@ STR_PARK :冰山群岛 STR_DTLS :一系列冰山为这个雄心勃勃的主题公园营造了一个寒冷的环境 -STR_SCNR :火山 -STR_PARK :火山 +STR_SCNR :火焰之域 +STR_PARK :火焰之域 STR_DTLS :这座休眠的火山就是过山车建造挑战的背景 @@ -4023,8 +4041,8 @@ STR_PARK :大冰川 STR_DTLS :一个充满冰川的山谷等你开发成游乐园 -STR_SCNR :疯狂中心 -STR_PARK :疯狂中心 +STR_SCNR :疯狂陨石坑 +STR_PARK :疯狂陨石坑 STR_DTLS :在一个不需要钱的遥远世界里,你必须建造一个娱乐中心来让人们开心 @@ -4048,8 +4066,8 @@ STR_PARK :阳光沼泽 STR_DTLS :这个主题鲜明的游乐园已经有好几部游乐设施,但仍有足够的扩展空间等你来扩张 -STR_SCNR :恐惧山丘 -STR_PARK :恐惧山丘 +STR_SCNR :惊魂山丘 +STR_PARK :惊魂山丘 STR_DTLS :一个在中心有一座巨大过山车的诡异公园 @@ -4063,19 +4081,19 @@ STR_PARK :八角游乐园 STR_DTLS :在这个大公园里你需要设计建造十种大型过山车 -STR_SCNR :愉悦岛 -STR_PARK :愉悦岛 +STR_SCNR :欢悦岛 +STR_PARK :欢悦岛 STR_DTLS :一个狭长的岛屿使得过山车的建筑变得富有挑战 STR_SCNR :冰封世界 STR_PARK :冰封世界 -STR_DTLS :一个极地主题乐园等你来变得欣欣向荣 +STR_DTLS :一个极地主题乐园等你来把它变得欣欣向荣 STR_SCNR :南方沙漠 STR_PARK :南方沙漠 -STR_DTLS :一个有着几座聪明设计的过山车的沙漠公园等你扩张 +STR_DTLS :一个有着几座设计精明的过山车的沙漠公园等你扩张 STR_SCNR :小方块 @@ -4088,8 +4106,8 @@ STR_PARK :永无止境公园 STR_DTLS :一个有着与众不同的交通系统环绕的大公园 -STR_SCNR :太平洋 -STR_PARK :太平洋 +STR_SCNR :太平岛 +STR_PARK :太平岛 STR_DTLS :你的这个大岛屿需要你来改造成为游乐园 @@ -4137,8 +4155,8 @@ STR_DTLS : ## Misc parks from RCT1 # Had no details -STR_SCNR :碍事城堡 -STR_PARK :碍事城堡 +STR_SCNR :时空堡垒 +STR_PARK :时空堡垒 STR_DTLS : ########### @@ -4148,6 +4166,7 @@ STR_DTLS : ## Start OpenRCT2 Official [TTPIRF05] + STR_NAME :屋顶 ## End OpenRCT2 Official @@ -4289,87 +4308,87 @@ STR_DTLS :建造遗失的六旗乐园游乐设施,或用自己的设计善 ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :非洲——非洲钻石矿 +STR_SCNR :非洲矿山 STR_PARK :非洲矿山 STR_DTLS :你继承了一个废弃的钻石矿,并找到一个珍贵的钻石。你决定用那笔钱去建造一个世界闻名的主题乐园。 -STR_SCNR :非洲——绿洲 +STR_SCNR :海市蜃楼狂热 STR_PARK :海市蜃楼狂热 STR_DTLS :一个沙漠绿洲被发现了,它为游乐园提供了一个美丽的环境。游乐园已有绿洲运输。 -STR_SCNR :非洲——维多利亚瀑布 +STR_SCNR :大河边缘 STR_PARK :大河边缘 STR_DTLS :当地建成了一个大坝,提供了丰富的,廉价的水电,用来运行一个公园。你需要用公园来获得很多的钱,用来偿还建造大坝的贷款。 -STR_SCNR :南极——生态救援 +STR_SCNR :冰冷冒险 STR_PARK :冰冷冒险 STR_DTLS :环境署已经把你碍眼的旧炼油厂改造成顶级生态的旅游胜地。土地便宜但贷款利息高。你可以卖掉旧建筑来赚钱。 -STR_SCNR :亚洲——中国长城旅游业发展 +STR_SCNR :中国长城 STR_PARK :中国长城 STR_DTLS :当局已决定在附近的土地上建造主题公园,以加强在长城周边的旅游业发展。 -STR_SCNR :亚洲——日本填海工程 +STR_SCNR :冲绳海岸 STR_PARK :冲绳海岸 STR_DTLS :一个现有的公园已经用完了空间。你唯一的选择是建立在海上,所以你采取了贷款。你的建筑的高度被地基和地震风险限制。 -STR_SCNR :亚洲——迈索尔皇宫 +STR_SCNR :迈索尔公园 STR_PARK :迈索尔公园 STR_DTLS :你被委托为当地人建造大型的娱乐设施。由王公的宫殿改建成一个游乐园。 -STR_SCNR :大洋洲——艾尔斯岩 +STR_SCNR :艾尔斯冒险 STR_PARK :艾尔斯冒险 STR_DTLS :作为文化意识计划的一部分,你要帮助土著人建立一个游乐园。你需要让大量的客人知道土著们具有独特的文化遗产。 -STR_SCNR :大洋洲——海滩上的乐趣 +STR_SCNR :海滩烧烤风 STR_PARK :海滩烧烤风 STR_DTLS :一个本地企业家的海滨游乐园已经破产。你已经经营了一个小游乐园,你要从建筑公司购买另一个游乐园。开发一个大联合游乐园。 -STR_SCNR :欧洲——欧洲文化盛会 +STR_SCNR :欧洲盛会 STR_PARK :欧洲盛会 STR_DTLS :你被安排接管一个欧洲文化游的景点,必须增加客人的数量,在目前的欧洲议会任期结束前支付加入欧盟的税款。 -STR_SCNR :欧洲——翻新计划 +STR_SCNR :来自灰烬 STR_PARK :来自灰烬 STR_DTLS :一个老公园年久失修。你获得一个欧盟的补助金,将这个被剥夺的地区归还给它昔日的荣耀!你需要整修公园并偿还补助金。 -STR_SCNR :北美洲——极限夏威夷岛 +STR_SCNR :积极威基基 STR_PARK :积极威基基 STR_DTLS :夏威夷的人们厌倦了冲浪,寻找更刺激的东西。你需要建立一个游乐园,以保持该地区的旅游评级。 -STR_SCNR :北美洲——大峡谷 +STR_SCNR :峡谷浩劫 STR_PARK :峡谷浩劫 STR_DTLS :你必须在有限的土地上建立一个游乐园,这里有自然财富——从美洲印第安人那里有机会购买邻近的土地。维持当地城镇的人口是你需要完成的目标。 -STR_SCNR :北美——过山车天堂 +STR_SCNR :过山车天堂 STR_PARK :过山车天堂 STR_DTLS :你是在休假想要利用这段时间改造城市公园的过山车的天堂一个成功的商业大亨。金钱是没有目标的! -STR_SCNR :南美洲——印加失落之城 +STR_SCNR :失落之城 STR_PARK :失落之城 STR_DTLS :为了进一步促进当地旅游业的发展,你需要建设一个与周围环境相协调的公园。 -STR_SCNR :南美洲——雨林高原 +STR_SCNR :嬉闹雨林 STR_PARK :嬉闹雨林 STR_DTLS :空间是有限的宝贵的热带雨林——你必须尽可能多地塞进现有的结算,以提供一个可行的替代当地木材业。 -STR_SCNR :南美洲——里约狂欢节 +STR_SCNR :蜜糖面包海岸 STR_PARK :蜜糖面包海岸 STR_DTLS :你在里约附近的一个小公园,但银行已在你的贷款。你需要快速提高你的盈利能力来偿还这意想不到的债务。 @@ -4377,72 +4396,72 @@ STR_DTLS :你在里约附近的一个小公园,但银行已在你的贷款 ## Time Twister Scenarios ############################################################################### -STR_SCNR :黑暗时代——城堡 +STR_SCNR :悬崖城堡 STR_PARK :悬崖城堡 STR_DTLS :战斗的地方成员重新制定的社会是相当严重的他们的爱好。他们委托你在悬崖边的城堡的场地建设一个黑暗时代的主题公园的工作。 -STR_SCNR :黑暗时代——罗宾汉 +STR_SCNR :舍伍德森林 STR_PARK :舍伍德森林 STR_DTLS :为了把财富从富人中解放出来并分发给有需要的人,你和你的快乐的人决定在舍伍德森林里建立一个主题公园。 -STR_SCNR :未来时代——邂逅 +STR_SCNR :外星盛会 STR_PARK :外星盛会 STR_DTLS :生命在一个遥远的星球上被发现,建造一个外星人主题公园,以现金在前所未有的兴趣浪潮。 -STR_SCNR :未来时代——未来世界 +STR_SCNR :双子城 STR_PARK :双子城 STR_DTLS :炫耀你的创造性的,乌托邦式的未来愿景——想出一个未来的公园设计,结合国家的最先进的景点。 -STR_SCNR :神话时代——动画电影摄影棚 +STR_SCNR :古怪的动画电影 STR_PARK :古怪的动画电影 STR_DTLS :你已经被赋予了运行和改进现有的主题公园的任务,它是建立在一个旧的电影集上的。建立一个向创业的定格动画人第一次带来了神秘的生物生活在银幕上。 -STR_SCNR :神话时代——文明的摇篮 +STR_SCNR :神话狂热 STR_PARK :神话狂热 STR_DTLS :你拥有一个特定的考古价值的岛屿。你已经决定采用基于地区丰富的神话遗产建设主题公园的保护基金。 -STR_SCNR :史前时代——小行星之后 +STR_SCNR :陨石坑大战 STR_PARK :陨石坑大战 STR_DTLS :你拥有一个布满灰尘的老流星陨石坑。在真正的创业精神,你已经决定建造一个小行星主题公园,并转换你的看似毫无价值的土地变成一个相当大的财富。 -STR_SCNR :史前时代——游历侏罗纪 +STR_SCNR :过山龙 STR_PARK :过山龙 STR_DTLS :你被赋予了建设一个侏罗纪时代主题公园的任务。为了优化您的游客访问异国情调的植物和动物的展品,你将需要建立乘坐去到山谷。 -STR_SCNR :史前时代——石器时代 +STR_SCNR :洛基漫步 STR_PARK :洛基漫步 STR_DTLS :为了阻止公路的开发和维护神秘的古老的石头圈,你将需要建造一个石器时代主题公园,并把利润。然而,吸引游客可能会构成挑战,因为地形有点荒凉。 -STR_SCNR :咆哮20年代——监狱岛 +STR_SCNR :恶魔岛 STR_PARK :恶魔岛 STR_DTLS :臭名昭著的监狱岛的人口曾经充满了走私犯和诈骗犯——现在出售。你已经决定把它变成一个顶级的旅游景点,钱是没有对象 -STR_SCNR :咆哮20年代——施耐德杯 +STR_SCNR :施耐德海岸 STR_PARK :施耐德海岸 STR_DTLS :你的祖父的施耐德杯胜利第七十五周年是几年来。你要尊重自己的成就,通过构建一个基于著名的水上飞机比赛主题公园。 -STR_SCNR :咆哮20年代——摩天大楼 +STR_SCNR :大都会 STR_PARK :大都会 STR_DTLS :你拥有一个空的地段,靠近城镇的低矮的部分。把最贵的城市属性,建立一个主题公园的启发,摩天大楼高耸的建筑装饰艺术的年代。 -STR_SCNR :摇滚时代——花之力 +STR_SCNR :伍德斯托克 STR_PARK :伍德斯托克 STR_DTLS :一个大型的年度音乐节在你的土地上。打造一个主题公园,保持自由奔放的观众的娱乐。 -STR_SCNR :摇滚时代——摇滚 +STR_SCNR :摇滚复兴 STR_PARK :摇滚复兴 STR_DTLS :这个老龄化的主题公园已经看到了更好的日子。帮助主人给它一个复古摇滚的改造,把这个地方变成一个成功的地点。 @@ -4511,7 +4530,7 @@ STR_DTLS :哇奥!看看这这个时间机器吧我们带到哪里去了! STR_SCNR :做出改变 STR_PARK :做出改变 -STR_DTLS :我们会希望你可以…{NEWLINE}作者:Fossil +STR_DTLS :我们会希望你可以……{NEWLINE}作者:Fossil STR_SCNR :世外桃源 @@ -4545,12 +4564,12 @@ STR_DTLS :妈咪!爸比!我想去呜呜小镇!{NEWLINE}作者:Fossil STR_SCNR :龙之岛 STR_PARK :龙之岛 -STR_DTLS :龙之岛?我可不确定我会想去那…{NEWLINE}作者:Fossil +STR_DTLS :龙之岛?我可不确定我会想去那……{NEWLINE}作者:Fossil STR_SCNR :基迪嘉年华2 STR_PARK :基迪嘉年华 -STR_DTLS :嘿!孩子!玩的开心!{NEWLINE}作者:Piehead & Fossil +STR_DTLS :嘿,孩子们!玩的开心!{NEWLINE}作者:Piehead & Fossil STR_SCNR :梦幻沙丘 diff --git a/data/language/zh-TW.txt b/data/language/zh-TW.txt index 8d28a6df49..269af446af 100644 --- a/data/language/zh-TW.txt +++ b/data/language/zh-TW.txt @@ -1741,7 +1741,7 @@ STR_2382 :土地 STR_2383 :水塘 STR_2384 :{WINDOW_COLOUR_2}你的目標: STR_2385 :{BLACK}無 -STR_2386 :{BLACK}在{POP16}{MONTHYEAR}尾之前, 樂園裡至少有{PUSH16}{PUSH16}{COMMA32}個遊客, 而且樂園評價並不低於600 +STR_2386 :{BLACK}在{POP16}{POP16}{MONTHYEAR}尾之前, 樂園裡至少有{PUSH16}{PUSH16}{PUSH16}{COMMA32}個遊客, 而且樂園評價並不低於600 STR_2387 :{BLACK}在{POP16}{MONTHYEAR}尾之前, 樂園價值必需達到{CURRENCY} STR_2388 :{BLACK}盡情玩吧! STR_2389 :{BLACK}建造你的最佳{STRINGID}吧! @@ -2889,7 +2889,7 @@ STR_5755 :不合適的遊戲版本 (伺服器版本為{STRING}) STR_5756 :密碼錯誤 STR_5757 :伺服器人數已滿 STR_5758 :{OUTLINE}{GREEN}{STRING}已加入遊戲 -STR_5759 :下載劇情中… ({INT32} / {INT32}) KiB +STR_5759 :下載劇情中… STR_5760 :港幣 (HK$) STR_5761 :新台幣 (NT$) STR_5762 :人民幣 (CN¥) @@ -3452,7 +3452,7 @@ STR_6374 :阻礙檢查已關閉 STR_6375 :未知遊樂設施 STR_6376 :{WINDOW_COLOUR_2}遊樂設施車輛:{NEWLINE}{BLACK}{STRINGID}於{STRINGID}內 STR_6377 :{WINDOW_COLOUR_2}種類: {BLACK}{STRINGID}於{STRINGID}內 -STR_6378 :正在接收物件列表: {INT32} / {INT32} +STR_6378 :正在接收物件列表: STR_6379 :已接收不正確的資料 STR_6380 :有可用的更新! STR_6381 :加入OpenRCT2的Discord! @@ -4191,87 +4191,87 @@ STR_DTLS :建造缺少的六旗遊樂設施,或建造你自己設計的以改 ## Wacky Worlds Scenarios ############################################################################### -STR_SCNR :Africa - African Diamond Mine +STR_SCNR :Mines of Africa STR_PARK :Mines of Africa STR_DTLS :You inherited a disused diamond mine, and find a valuable diamond. You decide to invest that money to build a world-famous theme park. -STR_SCNR :Africa - Oasis +STR_SCNR :Mirage Madness STR_PARK :Mirage Madness STR_DTLS :A desert Oasis has been discovered and would provide a beautiful location for a park. Transport to the oasis has been provided. -STR_SCNR :Africa - Victoria Falls +STR_SCNR :Over The Edge STR_PARK :Over The Edge STR_DTLS :A dam has been built offering abundant, cheap hydroelectric power with which to run a park. You need to reach a high park value to help repay the loan for the dam. -STR_SCNR :Antarctic - Ecological Salvage +STR_SCNR :Icy Adventures STR_PARK :Icy Adventures STR_DTLS :The environment agency has turned to you to transform an old oil refinery ecological eyesore into a top tourist attraction. Land is cheap but loan interest is high. You can sell the old buildings for salvage. -STR_SCNR :Asia - Great Wall of China Tourism Enhancement +STR_SCNR :Great Wall of China STR_PARK :Great Wall of China STR_DTLS :The authorities have decided to enhance tourism around the Great Wall by building a theme park on the adjacent land. Money is no object! -STR_SCNR :Asia - Japanese Coastal Reclaim +STR_SCNR :Okinawa Coast STR_PARK :Okinawa Coast STR_DTLS :An existing park has run out of space. Your only option is to build out into the sea, and so you have taken out a loan. Height restrictions on your building are enforced due to foundations and earthquake risk. -STR_SCNR :Asia - Maharaja Palace +STR_SCNR :Park Maharaja STR_PARK :Park Maharaja STR_DTLS :You have been commissioned by the Maharaja to bring entertainment to the large local population. Build a park inspired by the Maharaja’s palace. -STR_SCNR :Australasia - Ayers Rock +STR_SCNR :Ayers Adventure STR_PARK :Ayers Adventure STR_DTLS :You are helping Aboriginal people to build a park as part of a cultural awareness program. You need to get a large number of guests to educate them in the unique heritage of the Aboriginal people. -STR_SCNR :Australasia - Fun at the Beach +STR_SCNR :Beach Barbecue Blast STR_PARK :Beach Barbecue Blast STR_DTLS :A local entrepreneur’s sealife park has gone bust. You already operate a small park and buy the other park from the construction company. Develop a big combined park. -STR_SCNR :Europe - European Cultural Festival +STR_SCNR :European Extravaganza STR_PARK :European Extravaganza STR_DTLS :You have been brought in to take over a European Cultural Visitor Attraction and must increase the number of guests in order to pay back the EU subsidy by the end of the current European parliament term. -STR_SCNR :Europe - Renovation +STR_SCNR :From The Ashes STR_PARK :From The Ashes STR_DTLS :An old park has fallen into disrepair. You gain a European Union grant to return this deprived area to its former glory! You need to renovate the park and repay the grant. -STR_SCNR :N. America - Extreme Hawaiian Island +STR_SCNR :Wacky Waikiki STR_PARK :Wacky Waikiki STR_DTLS :The people of Hawaii are bored of surfing and are looking for something more intense. You need to build a park with this in mind to keep the area’s tourist attraction rating high. -STR_SCNR :North America - Grand Canyon +STR_SCNR :Canyon Calamities STR_PARK :Canyon Calamities STR_DTLS :You have to build a park on limited land either side of this natural treasure - you do have the opportunity to buy neighbouring land from the Native American Indians. You need to complete the objective to sustain the local town’s population. -STR_SCNR :North America - Rollercoaster Heaven +STR_SCNR :Rollercoaster Heaven STR_PARK :Rollercoaster Heaven STR_DTLS :You are a successful business tycoon on long sabbatical who desires to use this time transforming the city park into Rollercoaster Heaven. Money is no object! -STR_SCNR :South America - Inca Lost City +STR_SCNR :Lost City Founder STR_PARK :Lost City Founder STR_DTLS :To further boost local tourism you must construct a park that is in tune with its surroundings, and has height restrictions. -STR_SCNR :South America - Rain Forest Plateau +STR_SCNR :Rainforest Romp STR_PARK :Rainforest Romp STR_DTLS :Space is limited in the precious rainforest - you must cram as much as possible into the existing clearing, in order to provide a viable alternative to the local timber industry. -STR_SCNR :South America - Rio Carnival +STR_SCNR :Sugarloaf Shores STR_PARK :Sugarloaf Shores STR_DTLS :You run a small park near Rio but the bank has called in your loan. You need to quickly increase your earning capacity to repay this unexpected debt. @@ -4279,72 +4279,72 @@ STR_DTLS :You run a small park near Rio but the bank has called in your loan. ## Time Twister Scenarios ############################################################################### -STR_SCNR :黑暗時代-城堡 +STR_SCNR :克利弗塞德城堡 STR_PARK :克利弗塞德城堡 STR_DTLS :本地的戰役重現協會成員對他們的這項嗜好相當認真。他們授權您建造一座以克利弗塞德城堡為主題的黑暗時代主題樂園。 -STR_SCNR :黑暗時代-羅賓漢 +STR_SCNR :舍伍德森林 STR_PARK :舍伍德森林 STR_DTLS :為了劫富濟貧,您與您的伙伴們決定要在舍伍德森林中建造一座主題樂園。 -STR_SCNR :未來-第一次接觸 +STR_SCNR :外星文明博覽會 STR_PARK :外星文明博覽會 STR_DTLS :在遙遠的行星上發現了生命 建築一個外星主題樂園,在這個史無前例的風潮中大撈一票。 -STR_SCNR :未來-未來世界 +STR_SCNR :雙子星城市 STR_PARK :雙子星城市 STR_DTLS :展現您對於未來的創造力與想像力-設計出以最先進科技為特色的未來主題樂園。 -STR_SCNR :神話-機械偶影片組 +STR_SCNR :機械偶動作 STR_PARK :機械偶動作 STR_DTLS :您被賦予經營並改善現有主題樂園的工作,樂園建築在舊片場上。為首先將神話生物帶到銀幕中的定格動畫家們獻上崇高敬意 -STR_SCNR :神話-文明起源 +STR_SCNR :神話狂熱 STR_PARK :神話狂熱 STR_DTLS :您擁有一個具有特殊考古價值的小島。您決定透過建造一座以這個區域非常豐富的神話遺產為主題的樂園。 -STR_SCNR :史前時代-小行星撞擊之後 +STR_SCNR :隕石坑大屠殺 STR_PARK :隕石坑大屠殺 STR_DTLS :您擁有滿是灰塵的老舊隕石坑。您的企業家精神讓您決定建立小行星主題樂園,並將看來毫無價值的土地轉變成巨大的財富。 -STR_SCNR :史前時代 - 侏羅紀探險 +STR_SCNR :Coastersaurus STR_PARK :Coastersaurus STR_DTLS :您被賦予建立侏羅紀主題公園的工作。為了讓您的訪客能更容易接近觀賞各種動植物,您必須在河谷中建立交通工具 -STR_SCNR :史前時代-石器時代 +STR_SCNR :石間漫步 STR_PARK :石間漫步 STR_DTLS :為了阻止高速公路開發者並保存神秘的古代石頭環,您必須建立石器時代主題公園並獲利。但很難吸引到遊客,因為地形荒涼 -STR_SCNR :喧騰的20年代-監獄島 +STR_SCNR :惡魔島 STR_PARK :惡魔島 STR_DTLS :惡名昭彰的監獄島-島上居名曾以販賣私酒者或騙徒為主-現在正待價而沽中。您決定要將這個小島轉變為觀光勝地,錢不是問題 -STR_SCNR :喧騰的20年代-施耐德盃 +STR_SCNR :施耐德海岸 STR_PARK :施耐德海岸 STR_DTLS :令祖父在施耐德盃優勝的75週年紀念再過幾年就要到了。您決定建造以著名的水上飛機競速賽為主題的樂園來紀念他的成就。 -STR_SCNR :喧騰的20年代-摩天大樓 +STR_SCNR :大都會 STR_PARK :大都會 STR_DTLS :您在市鎮低層數建築區中擁有空地。為了讓地產發揮最大價值,請建造以喧騰的20年代裝飾藝術為主題的摩天大樓主題樂園 -STR_SCNR :搖滾-花的魅力 +STR_SCNR :伍斯托克音樂會 STR_PARK :伍斯托克音樂會 STR_DTLS :您的土地上將舉辦大型的年度音樂嘉年華。請建立一個能讓這些崇尚心靈自由的人們感到愉快的主題樂園。 -STR_SCNR :搖滾-搖滾 +STR_SCNR :搖滾復興 STR_PARK :搖滾復興 STR_DTLS :這個過時的主題樂園曾經有過輝煌的日子。請協助所有者將讓這個主題樂園再次搖滾起來,讓這個地方成為成功的企業。 diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 1a31da1cc9..70453e11d4 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,3 +1,62 @@ +0.4.12 (in development) +------------------------------------------------------------------------ +- Feature: [#622] Add option to align the top toolbar buttons horizontally centred (off by default). +- Feature: [#20263] Ability to increase the size of the map in the (0, 0) direction. +- Feature: [#21714] [Plugin] Costume assignment is now tailored to each staff type. +- Feature: [#21853] Enlarged UI mode. +- Feature: [#21893, #22065] On launch, the game now indicates what system is being initialised. +- Feature: [#21913] [Plugin] Allow precise and safe control of peep animations. +- Feature: [#22046] [Plugin] Add interface for crashed vehicle particle. +- Feature: [#22085] [Plugin] The result of actions that create banners now includes the bannerIndex. +- Feature: [#22087] [Plugin] Expose guests’ favourite rides to the plugin API. +- Feature: [#22090] [Plugin] Allow writing of paused state in non-networked settings. +- Feature: [#22140] Add option to automatically close dropdown menus if Enlarged UI is enabled. +- Feature: [#22150] [Plugin] Expose monthly expenditure history to the plugin API. +- Feature: [#22210] [Plugin] Peeps can now be made stationary or completely frozen. +- Feature: [#22210] [Plugin] The direction in which a peep is facing can now be manipulated. +- Improved: [#19870] Allow using new colours in UI themes. +- Improved: [#21774] The Alpine Coaster now supports using the alternative colour schemes. +- Improved: [#21853] Dropdowns now automatically use multiple columns if they are too tall for the screen. +- Improved: [#21981] Rendering performance of the map window has been improved considerably. +- Improved: [#21981] The map window now defaults to showing as much of the map as fits the screen. +- Improved: [#21983] Taking a screenshot now shows a message again, closing when taking another. +- Improved: [#22026] The options window now stays centred when window scaling is changed. +- Improved: [#22060] [Plugin] The scroll wheel can now be used to modify spinner widget values in custom/script windows. +- Improved: [#22065] Joining a network game now indicates progress using coaster trains. +- Improved: [#22075] [Plugin] Plugins can now use G1 Icons. +- Improved: [#22084] The game now temporarily pauses while the load/save window is open. +- Improved: [#22217] See-through items are ignored again in viewport/pointer interaction. +- Improved: [objects#238] Add preview image for invisible queue. +- Improved: [objects#329] Add RCT1AA lay-down coaster trains (for import only). +- Change: [#7248] Small mini-maps are now centred in the map window. +- Change: [#20240] Heavy snow and blizzards now make guests buy and use umbrellas. +- Change: [#21043] The new music styles are no longer added to old parks automatically. +- Change: [#21214] Wacky Worlds and Time Twister’s scenario names now match their park names. +- Change: [#21991] UI themes JSON now use colour names and a translucency bool, instead of a number (old themes still work). +- Change: [#22057] Reorder Time Twister’s scenarios and adjust their difficulty classification. +- Change: [#22173] Patrol path selection is visible over existing patrol paths. +- Change: [#22196] Make track navigation buttons holdable. +- Change: [#22227] [Plugin] Ride prices are now constrained for plugins as well. +- Fix: [#13234] Vehicle weight sometimes wrong after using Remove All Guests cheat. +- Fix: [#13294] Map corners are cut off in some directions (original bug). +- Fix: [#14630] Non-ASCII thousands and decimal separators not processed correctly. +- Fix: [#21496] Some RCT1 scenery is hidden after saving and reloading. +- Fix: [#21533] Support glitches on Hybrid Coaster. +- Fix: [#21974] No reason specified when attempting to place benches, lamps, or bins on path with no unconnected edges (original bug). +- Fix: [#21987] [Plugin] API cannot handle negative removal prices. +- Fix: [#22008] Uninverted Lay-down roller coaster uses the wrong support type. +- Fix: [#22012] [Plugin] Images on ImgButton widgets cannot be updated. +- Fix: [#22121] Some news items in the “Recent Messages” window have the wrong text colour. +- Fix: [#22152] [Plugin] Negative signed integers are truncated. +- Fix: [#22161] Using arrow keys in textboxes crashes the game. +- Fix: [#22174] Cheats are reset when starting a server. +- Fix: [#22185] Intensity and nausea are incorrectly sorted in the rides list after ratings invalidation. +- Fix: [#22226] Red traffic light shows incorrect sprite when pressed. +- Fix: [objects#323] Incorrect wall boundaries on large WW/TT scenery objects. +- Fix: [objects#331] Incorrect hover car capacity string. +- Fix: [objects#334] Incorrect school bus capacity string. +- Fix: [objects#337] Swan Boats use an incorrect third remap colour (original bug). + 0.4.11 (2024-05-05) ------------------------------------------------------------------------ - Feature: [#11512] Coloured usernames by group on multiplayer servers. @@ -50,6 +109,7 @@ - Fix: [#21434] Number of guests overflows in objective text. - Fix: [#21522] Supports for 3×3 turns and 45 degree turns on the Hybrid Coaster and Wooden Roller Coaster not drawn correctly. - Fix: [#21543] Crash with creating a TrackIterator with invalid arguments. +- Fix: [#21627] [Plugin] Banners are properly created or deleted when tile elements are changed by plugins. - Fix: [#21635] Tile inspector hotkey can set wall slope for non-slopeable objects. - Fix: [#21641] Crash when creating track iterator from an invalid tile element. - Fix: [#21652] Dialog window to confirm overwriting files does not apply the theme colours correctly. @@ -57,7 +117,7 @@ - Fix: [#21654] Extraneous reports of an object conflict between `rct2.audio.base` and `rct2.audio.base.rctc`. - Fix: [#21664] Crash when switching between languages that use TTF. - Fix: [#21668] Crash when on null ride in Guest::UpdateRideLeaveExit. -- Fix: [#21691] Crash when validating rides which can't contain banked track. +- Fix: [#21691] Crash when validating rides which can’t contain banked track. - Fix: [objects#290] “Haunted Mansion” cars have a non-functional third remap colour. - Fix: [objects#296] Incorrect wall placement around large Kremlin/drab pieces. - Fix: [objects#300] Incorrect Colosseum and volcano corner clearances. @@ -107,7 +167,7 @@ 0.4.8 (2024-02-04) ------------------------------------------------------------------------ -- Feature: [#21062] [Plugin] Add API for managing a guest's items. +- Feature: [#21062] [Plugin] Add API for managing a guest’s items. - Improved: [#18632, #21306] Land ownership and construction rights are now shown on top of the water. - Improved: [#20951] Activate OpenRCT2 window after using native file dialog on macOS. - Improved: [#21184] The construction marker for rides, paths and large scenery is now shown on top of the water. diff --git a/distribution/openrct2.d.ts b/distribution/openrct2.d.ts index 4cc2078b17..a1a9cfb76e 100644 --- a/distribution/openrct2.d.ts +++ b/distribution/openrct2.d.ts @@ -217,9 +217,9 @@ declare global { readonly mode: GameMode; /** - * Whether the game is currently paused or not. + * Whether the game is currently paused or not. Readonly in network mode. */ - readonly paused: boolean; + paused: boolean; /** * Render the current state of the map and save to disc. @@ -317,7 +317,7 @@ declare global { queryAction(action: string, args: object, callback?: (result: GameActionResult) => void): void; queryAction(action: ActionType, args: object, callback?: (result: GameActionResult) => void): void; queryAction(action: "balloonpress", args: BalloonPressArgs, callback?: (result: GameActionResult) => void): void; - queryAction(action: "bannerplace", args: BannerPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "bannerplace", args: BannerPlaceArgs, callback?: (result: BannerCreateActionResult) => void): void; queryAction(action: "bannerremove", args: BannerRemoveArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "bannersetcolour", args: BannerSetColourArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "bannersetname", args: BannerSetNameArgs, callback?: (result: GameActionResult) => void): void; @@ -339,7 +339,7 @@ declare global { queryAction(action: "landsetheight", args: LandSetHeightArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "landsetrights", args: LandSetRightsArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "landsmooth", args: LandSmoothArgs, callback?: (result: GameActionResult) => void): void; - queryAction(action: "largesceneryplace", args: LargeSceneryPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "largesceneryplace", args: LargeSceneryPlaceArgs, callback?: (result: BannerCreateActionResult) => void): void; queryAction(action: "largesceneryremove", args: LargeSceneryRemoveArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "largescenerysetcolour", args: LargeScenerySetColourArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "loadorquit", args: LoadOrQuitArgs, callback?: (result: GameActionResult) => void): void; @@ -392,7 +392,7 @@ declare global { queryAction(action: "trackplace", args: TrackPlaceArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "trackremove", args: TrackRemoveArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "tracksetbrakespeed", args: TrackSetBrakeSpeedArgs, callback?: (result: GameActionResult) => void): void; - queryAction(action: "wallplace", args: WallPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "wallplace", args: WallPlaceArgs, callback?: (result: BannerCreateActionResult) => void): void; queryAction(action: "wallremove", args: WallRemoveArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "wallsetcolour", args: WallSetColourArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "waterlower", args: WaterLowerArgs, callback?: (result: GameActionResult) => void): void; @@ -409,7 +409,7 @@ declare global { executeAction(action: string, args: object, callback?: (result: GameActionResult) => void): void; executeAction(action: ActionType, args: object, callback?: (result: GameActionResult) => void): void; executeAction(action: "balloonpress", args: BalloonPressArgs, callback?: (result: GameActionResult) => void): void; - executeAction(action: "bannerplace", args: BannerPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "bannerplace", args: BannerPlaceArgs, callback?: (result: BannerCreateActionResult) => void): void; executeAction(action: "bannerremove", args: BannerRemoveArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "bannersetcolour", args: BannerSetColourArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "bannersetname", args: BannerSetNameArgs, callback?: (result: GameActionResult) => void): void; @@ -431,7 +431,7 @@ declare global { executeAction(action: "landsetheight", args: LandSetHeightArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "landsetrights", args: LandSetRightsArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "landsmooth", args: LandSmoothArgs, callback?: (result: GameActionResult) => void): void; - executeAction(action: "largesceneryplace", args: LargeSceneryPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "largesceneryplace", args: LargeSceneryPlaceArgs, callback?: (result: BannerCreateActionResult) => void): void; executeAction(action: "largesceneryremove", args: LargeSceneryRemoveArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "largescenerysetcolour", args: LargeScenerySetColourArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "loadorquit", args: LoadOrQuitArgs, callback?: (result: GameActionResult) => void): void; @@ -484,7 +484,7 @@ declare global { executeAction(action: "trackplace", args: TrackPlaceArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "trackremove", args: TrackRemoveArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "tracksetbrakespeed", args: TrackSetBrakeSpeedArgs, callback?: (result: GameActionResult) => void): void; - executeAction(action: "wallplace", args: WallPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "wallplace", args: WallPlaceArgs, callback?: (result: BannerCreateActionResult) => void): void; executeAction(action: "wallremove", args: WallRemoveArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "wallsetcolour", args: WallSetColourArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "waterlower", args: WaterLowerArgs, callback?: (result: GameActionResult) => void): void; @@ -876,7 +876,7 @@ declare global { x: number; y: number; height: number; - style: number; // see TILE_ELEMENT_SLOPE in openrct2/world/Surface.h + style: number; // see openrct2/world/tile_element/Slope.h } interface LandSetRightsArgs extends GameActionArgs { @@ -939,6 +939,8 @@ declare global { interface MapChangeSizeArgs extends GameActionArgs { targetSizeX: number; targetSizeY: number; + shiftX: number; + shiftY: number; } interface MazePlaceTrackArgs extends GameActionArgs { @@ -1341,6 +1343,10 @@ declare global { expenditureType?: ExpenditureType; } + interface BannerCreateActionResult extends GameActionResult { + readonly bannerIndex?: number; + } + interface RideCreateActionResult extends GameActionResult { readonly ride?: number; } @@ -2121,6 +2127,11 @@ declare global { supports: number; } + interface CrashedVehicleColour { + body: number; + trim: number; + } + interface VehicleColour { body: number; trim: number; @@ -2606,6 +2617,63 @@ declare global { "waiting_to_depart" | "waiting_to_start"; + type CrashParticleType = "corner" | "rod" | "wheel" | "panel" | "seat"; + + /** + * Override properties for launch data. All properties except colour are randomly + * chosen if not overridden, using the same algorithm as regular crashed particles. + */ + interface CrashParticleLaunchData { + colours?: CrashedVehicleColour; + timeToLive?: number; + velocity?: CoordsXYZ; + crashParticleType?: CrashParticleType; + frame?: number; + } + + /** + * Represents a vehicle explosion particle. They are emitted during a vehicle + * crash and will bounce until their timer expires and they are automatically + * removed. + */ + interface CrashedVehicleParticle extends Entity { + /** + * The colour of the particle. + */ + colours: CrashedVehicleColour; + + /** + * The lifetime of the particle in ticks. Default value 65535. Entity is + * automatically removed at 0. + */ + timeToLive: number; + + /** + * The particle velocity. + */ + velocity: CoordsXYZ; + + /** + * The acceleration of the particle in the x, y, and z directions. + */ + acceleration: CoordsXYZ; + + /** + * The type of crash particle. + */ + crashParticleType: CrashParticleType; + + /** + * The current frame of the crash particle. + */ + frame: number; + + /** + * Sets the sprite bounds and launches the particle. + */ + launch(launchData?: CrashParticleLaunchData): void; + } + /** * Represents a guest or staff member. * @deprecated since version 34, use guest or staff instead. @@ -2626,6 +2694,11 @@ declare global { */ destination: CoordsXY; + /** + * The peep's orthogonal direction, from 0 to 3. + */ + direction: Direction; + /** * How tired the guest is between 32 and 128 where lower is more tired. */ @@ -2675,13 +2748,43 @@ declare global { "joy" | "angry" | "iceCream" | - "hereWeAre"; + "hereWeAre" | + "positionFrozen" | + "animationFrozen"; /** * @deprecated since version 34, use EntityType instead. */ type PeepType = "guest" | "staff"; + type GuestAnimation = + "walking" | + "checkTime" | + "watchRide" | + "eatFood" | + "shakeHead" | + "emptyPockets" | + "holdMat" | + "sittingIdle" | + "sittingEatFood" | + "sittingLookAroundLeft" | + "sittingLookAroundRight" | + "hanging" | + "wow" | + "throwUp" | + "jump" | + "drowning" | + "joy" | + "readMap" | + "wave" | + "wave2" | + "takePhoto" | + "clap" | + "disgust" | + "drawPicture" | + "beingWatched" | + "withdrawMoney"; + /** * Represents a guest. */ @@ -2819,6 +2922,36 @@ declare global { * Removes all items from the guest's possession. */ removeAllItems(): void; + + /** + * The animations available to this guest. + */ + readonly availableAnimations: GuestAnimation[]; + + /** + * Gets an array of sprite ids representing a particular guest animation. + */ + getAnimationSpriteIds(animation: GuestAnimation, rotation: number): number[]; + + /** + * The animation the guest is currently exhibiting. + */ + animation: GuestAnimation; + + /** + * The frame offset in the current animation. + */ + animationOffset: number; + + /** + * The total number of frames in the current animation. + */ + readonly animationLength: number; + + /** + * The ride ID of the guest's favourite ride. + */ + favouriteRide: number | null; } /** @@ -3095,6 +3228,44 @@ declare global { readonly item: GuestItemType; } + type StaffCostume = + "none" | + "handyman" | + "mechanic" | + "security1" | + "security2" | + "panda" | + "tiger" | + "elephant" | + "roman" | + "gorilla" | + "snowman" | + "knight" | + "astronaut" | + "bandit" | + "sheriff" | + "pirate"; + + type StaffAnimation = + "walking" | + "watchRide" | + "wave" | + "hanging" | + "staffMower" | + "staffSweep" | + "drowning" | + "staffAnswerCall" | + "staffAnswerCall2" | + "staffCheckBoard" | + "staffFix" | + "staffFix2" | + "staffFixGround" | + "staffFix3" | + "staffWatering" | + "joy" | + "staffEmptyBin" | + "wave2"; + /** * Represents a staff member. */ @@ -3105,14 +3276,19 @@ declare global { staffType: StaffType; /** - * Colour of the staff member. Not applicable for entertainers. + * Colour of the staff member. Not applicable to entertainers. */ colour: number; /** - * The entertainer's costume, only applicable for entertainers. + * Array of costumes available to this particular staff member. */ - costume: number; + readonly availableCostumes: StaffCostume[]; + + /** + * The staff member's costume. + */ + costume: StaffCostume | string | number; /** * The enabled jobs the staff can do, e.g. sweep litter, water plants, inspect rides etc. @@ -3123,6 +3299,31 @@ declare global { * Gets the patrol area for the staff member. */ readonly patrolArea: PatrolArea; + + /** + * The animations available to this staff member. + */ + readonly availableAnimations: StaffAnimation[]; + + /** + * Gets an array of sprite ids representing a particular staff animation. + */ + getAnimationSpriteIds(animation: StaffAnimation, rotation: number): number[]; + + /** + * The animation the staff member is currently exhibiting. + */ + animation: StaffAnimation; + + /** + * The frame offset in the current animation. + */ + animationOffset: number; + + /** + * The total number of frames in the current animation. + */ + readonly animationLength: number; } type StaffType = "handyman" | "mechanic" | "security" | "entertainer"; @@ -3605,6 +3806,14 @@ declare global { postMessage(message: string): void; postMessage(message: ParkMessageDesc): void; + + /** + * Gets the monthly expenditure history for a given type. + * Index 0 represents the current month, index 1 the previous month, etc. + * The maximum length of the array is 16. + * @param type The type of expenditure to get. + */ + getMonthlyExpenditure(type: ExpenditureType): number[] } interface Research { @@ -4160,25 +4369,29 @@ declare global { ButtonWidget | CheckboxWidget | ColourPickerWidget | CustomWidget | DropdownWidget | GroupBoxWidget | LabelWidget | ListViewWidget | SpinnerWidget | TextBoxWidget | ViewportWidget; - type IconName = "arrow_down" | "arrow_up" | "chat" | "cheats" | "copy" | "empty" | "eyedropper" | - "fast_forward" | "game_speed_indicator" | "game_speed_indicator_double" | "glassy_recolourable" | - "hide_full" | "hide_partial" | "hide_scenery" | "hide_supports" | "hide_vegetation" | "hide_vehicles" | - "large_scenery" | "legacy_paths" | "link_chain" | "logo" | "logo_text" | "map_east" | - "map_east_pressed" | "map_gen_land" | "map_gen_noise" | "map_gen_trees" | "map_north" | - "map_north_pressed" | "map_south" | "map_south_pressed" | "map_west" | "map_west_pressed" | - "mountain_tool_even" | "mountain_tool_odd" | "multiplayer" | "multiplayer_desync" | "multiplayer_sync" | - "multiplayer_toolbar" | "multiplayer_toolbar_pressed" | "mute" | "mute_pressed" | "news_messages" | - "normal_selection_6x6" | "palette_invisible" | "palette_invisible_pressed" | "paste" | "path_railings" | "path_surfaces" | "paths" | "placeholder" | - "rct1_close_off" | "rct1_close_off_pressed" | "rct1_close_on" | "rct1_close_on_pressed" | "rct1_open_off" | - "rct1_open_off_pressed" | "rct1_open_on" | "rct1_open_on_pressed" | "rct1_simulate_off" | - "rct1_simulate_off_pressed" | "rct1_simulate_on" | "rct1_simulate_on_pressed" | "rct1_test_off" | - "rct1_test_off_pressed" | "rct1_test_on" | "rct1_test_on_pressed" | "reload" | "ride_stations" | - "scenery_scatter_high" | "scenery_scatter_low" | "scenery_scatter_medium" | "search" | - "selection_edge_ne" | "selection_edge_nw" | "selection_edge_se" | "selection_edge_sw" | - "server_password" | "sideways_tab" | "sideways_tab_active" | "simulate" | "small_scenery" | "sort" | - "terrain_edges" | "title_play" | "title_restart" | "title_skip" | "title_stop" | "unmute" | - "unmute_pressed" | "view" | "zoom_in" | "zoom_in_background" | "zoom_out" | "zoom_out_background"; - + type IconName = + "arrow_down" | "arrow_up" | "award" | "awards" | "chain_lift" | "chat" | "cheats" | "closed" | "construction" | + "copy" | "demolish" | "empty" | "eyedropper" | "fast_forward" | "finance" | "floppy_disk" | "game_speed_indicator" | + "game_speed_indicator_double" | "glassy_recolourable" | "graph" | "guest_inventory" | "guests" | + "hearing" | "hide_full" | "hide_partial" | "hide_scenery" | "hide_supports" | "hide_vegetation" | "hide_vehicles" | + "kiosks_and_facilities" | "large_scenery" | "legacy_paths" | "link_chain" | "locate" | "logo" | "logo_text" | "map" | + "map_east" | "map_east_pressed" | "map_gen_land" | "map_gen_noise" | "map_gen_trees" | "map_north" | "map_north_pressed" | + "map_south" | "map_south_pressed" | "map_west" | "map_west_pressed" | "mechanic" | "mirror_arrow" | + "mountain_tool_even" | "mountain_tool_odd" | "multiplayer" | "multiplayer_desync" | "multiplayer_sync" | + "multiplayer_toolbar" | "multiplayer_toolbar_pressed" | "music" | "mute" | "mute_pressed" | "news_messages" | + "new_ride" | "next" | "no_entry" | "open" | "paintbrush" | "palette_invisible" | "palette_invisible_pressed" | "park" | + "paste" | "path_railings" | "path_surfaces" | "paths" | "patrol" | "pause" | "pickup" | "placeholder" | "previous" | + "question" | "rct1_close_off" | "rct1_close_off_pressed" | "rct1_close_on" | "rct1_close_on_pressed" | "rct1_open_off" | + "rct1_open_off_pressed" | "rct1_open_on" | "rct1_open_on_pressed" | "rct1_simulate_off" | "rct1_simulate_off_pressed" | + "rct1_simulate_on" | "rct1_simulate_on_pressed" | "rct1_test_off" | "rct1_test_off_pressed" | "rct1_test_on" | + "rct1_test_on_pressed" | "reload" | "rename" | "research" | "ride" | "ride_stations" | "rides_gentle" | + "rides_rollercoasters" | "rides_shop" | "rides_thrill" | "rides_transport" | "rides_water" | "rotate_arrow" | "scenery" | + "scenery_cluster" | "scenery_paths" | "scenery_paths_items" | "scenery_scatter_high" | "scenery_scatter_low" | + "scenery_scatter_medium" | "scenery_signage" | "scenery_statues" | "scenery_trees" | "scenery_urban" | "scenery_walls" | + "search" | "selection_edge_ne" | "selection_edge_nw" | "selection_edge_se" | "selection_edge_sw" | "server_password" | + "shops_and_stalls" | "sideways_tab" | "sideways_tab_active" | "simulate" | "small_scenery" | "sort" | "stats" | "testing" | + "terrain_edges" | "title_play" | "title_restart" | "title_skip" | "title_stop" | "unmute" | "unmute_pressed" | "view" | + "water" | "zoom_in" | "zoom_in_background" | "zoom_out" | "zoom_out_background"; interface WidgetBase { readonly window: Window; diff --git a/openrct2.common.props b/openrct2.common.props index 5091ca81a7..89776e4560 100644 --- a/openrct2.common.props +++ b/openrct2.common.props @@ -115,7 +115,7 @@ - $(SolutionDir)src;$(SolutionDir)src\thirdparty;$(SolutionDir)src\thirdparty\duktape;$(SolutionDir)lib\$(Platform)\include;$(SolutionDir)lib\$(Platform)\include\SDL2;$(IncludePath) + $(SolutionDir)src;$(SolutionDir)src\thirdparty;$(SolutionDir)src\thirdparty\duktape;$(SolutionDir)lib\$(Platform)\include;$(SolutionDir)lib\$(Platform)\include\SDL2;$(SolutionDir)lib\$(Platform)\include\crashpad;$(IncludePath) $(SolutionDir)lib\$(Platform)\debug\lib;$(LibraryPath) $(SolutionDir)lib\$(Platform)\lib;$(LibraryPath) diff --git a/openrct2.proj b/openrct2.proj index 107b175e49..e001693d4d 100644 --- a/openrct2.proj +++ b/openrct2.proj @@ -37,16 +37,16 @@ $(RootDir).dependencies - https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-arm64-windows-static.zip - 89f119395c4347f25427990eb47ea8f57bba95d8 - https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-x64-windows-static.zip - 1303b2423be26f40bdb75fa2c91f1bc7ef1de1ed - https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-x86-windows-static.zip - f3636b530110c7592deab23ca0d0c1916fc7e44c + https://github.com/OpenRCT2/Dependencies/releases/download/v36/openrct2-libs-v36-arm64-windows-static.zip + c3cf49093261e605f3d62c5e82e53ff5e7600661 + https://github.com/OpenRCT2/Dependencies/releases/download/v36/openrct2-libs-v36-x64-windows-static.zip + 3816671560af3571ada728ffeceec0443471c03b + https://github.com/OpenRCT2/Dependencies/releases/download/v36/openrct2-libs-v36-x86-windows-static.zip + d2b8d98a9711cf319e3bd5330e77aef5395820f1 https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.6/title-sequences.zip 80fefc6ebbabc42a6f4703412daa5c62f661420d - https://github.com/OpenRCT2/objects/releases/download/v1.4.4/objects.zip - 4e9b5d7f85a07b90ec57fe37517e04b19ee0395c + https://github.com/OpenRCT2/objects/releases/download/v1.4.6/objects.zip + 49852246ba3d3a44f143e0c4de8f4d2e8f950c10 https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.5/opensound.zip b1b1f1b241d2cbff63a1889c4dc5a09bdf769bfb https://github.com/OpenRCT2/OpenMusic/releases/download/v1.5/openmusic.zip diff --git a/resources/g2/loader/loader_hybrid_supports.png b/resources/g2/loader/loader_hybrid_supports.png new file mode 100644 index 0000000000..8860ca12dd Binary files /dev/null and b/resources/g2/loader/loader_hybrid_supports.png differ diff --git a/resources/g2/loader/loader_hybrid_track.png b/resources/g2/loader/loader_hybrid_track.png new file mode 100644 index 0000000000..326fd4b5ea Binary files /dev/null and b/resources/g2/loader/loader_hybrid_track.png differ diff --git a/resources/g2/loader/loader_hybrid_vehicle.png b/resources/g2/loader/loader_hybrid_vehicle.png new file mode 100644 index 0000000000..914bf2447a Binary files /dev/null and b/resources/g2/loader/loader_hybrid_vehicle.png differ diff --git a/resources/g2/loader/loader_steel_supports.png b/resources/g2/loader/loader_steel_supports.png new file mode 100644 index 0000000000..9dc4c99874 Binary files /dev/null and b/resources/g2/loader/loader_steel_supports.png differ diff --git a/resources/g2/loader/loader_steel_track.png b/resources/g2/loader/loader_steel_track.png new file mode 100644 index 0000000000..d0c604426b Binary files /dev/null and b/resources/g2/loader/loader_steel_track.png differ diff --git a/resources/g2/loader/loader_steel_vehicle.png b/resources/g2/loader/loader_steel_vehicle.png new file mode 100644 index 0000000000..410b84f422 Binary files /dev/null and b/resources/g2/loader/loader_steel_vehicle.png differ diff --git a/resources/g2/loader/loader_wooden_supports.png b/resources/g2/loader/loader_wooden_supports.png new file mode 100644 index 0000000000..bf324c1b1e Binary files /dev/null and b/resources/g2/loader/loader_wooden_supports.png differ diff --git a/resources/g2/loader/loader_wooden_track.png b/resources/g2/loader/loader_wooden_track.png new file mode 100644 index 0000000000..adafe2432a Binary files /dev/null and b/resources/g2/loader/loader_wooden_track.png differ diff --git a/resources/g2/loader/loader_wooden_vehicle.png b/resources/g2/loader/loader_wooden_vehicle.png new file mode 100644 index 0000000000..5267ea5eb0 Binary files /dev/null and b/resources/g2/loader/loader_wooden_vehicle.png differ diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index d2f4bd51f3..d78e14f195 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -60,7 +60,7 @@ "path": "icons/rct1_close_on.png" }, { - "path": "icons/rct1_close_off_pressed.png" + "path": "icons/rct1_close_on_pressed.png" }, { "path": "icons/rct1_test_off.png" @@ -311,6 +311,39 @@ { "path": "icons/colour_invisible_pressed.png" }, + { + "path": "loader/loader_hybrid_supports.png", + "y": 10 + }, + { + "path": "loader/loader_hybrid_track.png", + "y": 15 + }, + { + "path": "loader/loader_hybrid_vehicle.png" + }, + { + "path": "loader/loader_steel_supports.png", + "y": 27 + }, + { + "path": "loader/loader_steel_track.png", + "y": 16 + }, + { + "path": "loader/loader_steel_vehicle.png" + }, + { + "path": "loader/loader_wooden_supports.png", + "y": 3 + }, + { + "path": "loader/loader_wooden_track.png", + "y": 3 + }, + { + "path": "loader/loader_wooden_vehicle.png" + }, { "path": "palette_map/palette_map_dark_olive_dark.png", "palette": "keep", @@ -24912,12 +24945,12 @@ "palette": "keep" }, { - "path": "icons/medium-curve-left.png", + "path": "icons/medium-curve-left.png", "x": 2, "y": 6 }, { - "path": "icons/medium-curve-right.png", + "path": "icons/medium-curve-right.png", "x": 1, "y": 6 } diff --git a/src/openrct2-ui/CursorRepository.cpp b/src/openrct2-ui/CursorRepository.cpp index 301f256246..eb4261faf0 100644 --- a/src/openrct2-ui/CursorRepository.cpp +++ b/src/openrct2-ui/CursorRepository.cpp @@ -27,7 +27,7 @@ CursorRepository::~CursorRepository() void CursorRepository::LoadCursors() { - SetCursorScale(static_cast(round(gConfigGeneral.WindowScale))); + SetCursorScale(static_cast(round(Config::Get().general.WindowScale))); SetCurrentCursor(CursorID::Arrow); } diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index cadf06829b..1477446bb6 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -10,6 +10,7 @@ #include "TextComposition.h" #include "UiContext.h" +#include "UiStringIds.h" #include "interface/InGameConsole.h" #include @@ -18,7 +19,10 @@ #include #include #include -#include +#include + +// TODO: only because of STR_NONE. We can do better. +#include #ifdef __MACOSX__ // macOS uses COMMAND rather than CTRL for many keyboard shortcuts diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 7dfa271b1b..d774d262a8 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -11,6 +11,8 @@ # include "UiContext.h" +# include "UiStringIds.h" + # include # include # include @@ -18,7 +20,7 @@ # include # include # include -# include +# include # include # include # include diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp index 588dbd5d73..f2a669092a 100644 --- a/src/openrct2-ui/UiContext.Win32.cpp +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -11,6 +11,9 @@ // Windows.h needs to be included first // clang-format off +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # include # include // clang-format on diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index dd87767c91..922eff7b43 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -12,6 +12,7 @@ #include "CursorRepository.h" #include "SDLException.h" #include "TextComposition.h" +#include "UiStringIds.h" #include "WindowManager.h" #include "drawing/engines/DrawingEngineFactory.hpp" #include "input/ShortcutManager.h" @@ -38,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -47,6 +47,9 @@ #include #include +// TODO: only because of STR_NONE. We can do better. +#include + using namespace OpenRCT2; using namespace OpenRCT2::Drawing; using namespace OpenRCT2::Scripting; @@ -189,12 +192,13 @@ public: // Set window size UpdateFullscreenResolutions(); - Resolution resolution = GetClosestResolution(gConfigGeneral.FullscreenWidth, gConfigGeneral.FullscreenHeight); + Resolution resolution = GetClosestResolution( + Config::Get().general.FullscreenWidth, Config::Get().general.FullscreenHeight); SDL_SetWindowSize(_window, resolution.Width, resolution.Height); } else if (mode == FULLSCREEN_MODE::WINDOWED) { - SDL_SetWindowSize(_window, gConfigGeneral.WindowWidth, gConfigGeneral.WindowHeight); + SDL_SetWindowSize(_window, Config::Get().general.WindowWidth, Config::Get().general.WindowHeight); } if (SDL_SetWindowFullscreen(_window, windowFlags)) @@ -355,16 +359,16 @@ public: { // Update default display index int32_t displayIndex = SDL_GetWindowDisplayIndex(_window); - if (displayIndex != gConfigGeneral.DefaultDisplay) + if (displayIndex != Config::Get().general.DefaultDisplay) { - gConfigGeneral.DefaultDisplay = displayIndex; - ConfigSaveDefault(); + Config::Get().general.DefaultDisplay = displayIndex; + Config::Save(); } break; } } - if (gConfigSound.audio_focus) + if (Config::Get().sound.audio_focus) { if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) { @@ -377,8 +381,8 @@ public: } break; case SDL_MOUSEMOTION: - _cursorState.position = { static_cast(e.motion.x / gConfigGeneral.WindowScale), - static_cast(e.motion.y / gConfigGeneral.WindowScale) }; + _cursorState.position = { static_cast(e.motion.x / Config::Get().general.WindowScale), + static_cast(e.motion.y / Config::Get().general.WindowScale) }; break; case SDL_MOUSEWHEEL: if (_inGameConsole.IsOpen()) @@ -394,8 +398,8 @@ public: { break; } - ScreenCoordsXY mousePos = { static_cast(e.button.x / gConfigGeneral.WindowScale), - static_cast(e.button.y / gConfigGeneral.WindowScale) }; + ScreenCoordsXY mousePos = { static_cast(e.button.x / Config::Get().general.WindowScale), + static_cast(e.button.y / Config::Get().general.WindowScale) }; switch (e.button.button) { case SDL_BUTTON_LEFT: @@ -430,8 +434,8 @@ public: { break; } - ScreenCoordsXY mousePos = { static_cast(e.button.x / gConfigGeneral.WindowScale), - static_cast(e.button.y / gConfigGeneral.WindowScale) }; + ScreenCoordsXY mousePos = { static_cast(e.button.x / Config::Get().general.WindowScale), + static_cast(e.button.y / Config::Get().general.WindowScale) }; switch (e.button.button) { case SDL_BUTTON_LEFT: @@ -585,7 +589,7 @@ public: { char scaleQualityBuffer[4]; _scaleQuality = ScaleQuality::SmoothNearestNeighbour; - if (gConfigGeneral.WindowScale == std::floor(gConfigGeneral.WindowScale)) + if (Config::Get().general.WindowScale == std::floor(Config::Get().general.WindowScale)) { _scaleQuality = ScaleQuality::NearestNeighbour; } @@ -605,10 +609,10 @@ public: void CreateWindow() override { - SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, gConfigGeneral.MinimizeFullscreenFocusLoss ? "1" : "0"); + SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, Config::Get().general.MinimizeFullscreenFocusLoss ? "1" : "0"); // Set window position to default display - int32_t defaultDisplay = std::clamp(gConfigGeneral.DefaultDisplay, 0, 0xFFFF); + int32_t defaultDisplay = std::clamp(Config::Get().general.DefaultDisplay, 0, 0xFFFF); auto windowPos = ScreenCoordsXY{ static_cast(SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay)), static_cast(SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay)) }; @@ -733,8 +737,8 @@ private: void CreateWindow(const ScreenCoordsXY& windowPos) { // Get saved window size - int32_t width = gConfigGeneral.WindowWidth; - int32_t height = gConfigGeneral.WindowHeight; + int32_t width = Config::Get().general.WindowWidth; + int32_t height = Config::Get().general.WindowHeight; if (width <= 0) width = 640; if (height <= 0) @@ -742,7 +746,7 @@ private: // Create window in window first rather than fullscreen so we have the display the window is on first uint32_t flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI; - if (gConfigGeneral.DrawingEngine == DrawingEngine::OpenGL) + if (Config::Get().general.DrawingEngine == DrawingEngine::OpenGL) { flags |= SDL_WINDOW_OPENGL; } @@ -756,7 +760,7 @@ private: ApplyScreenSaverLockSetting(); SDL_SetWindowMinimumSize(_window, 720, 480); - SetCursorTrap(gConfigGeneral.TrapCursor); + SetCursorTrap(Config::Get().general.TrapCursor); _platformUiContext->SetWindowIcon(_window); // Initialise the surface, palette and draw buffer @@ -765,15 +769,15 @@ private: UpdateFullscreenResolutions(); - SetFullscreenMode(static_cast(gConfigGeneral.FullscreenMode)); + SetFullscreenMode(static_cast(Config::Get().general.FullscreenMode)); TriggerResize(); } void OnResize(int32_t width, int32_t height) { // Scale the native window size to the game's canvas size - _width = static_cast(width / gConfigGeneral.WindowScale); - _height = static_cast(height / gConfigGeneral.WindowScale); + _width = static_cast(width / Config::Get().general.WindowScale); + _height = static_cast(height / Config::Get().general.WindowScale); DrawingEngineResize(); @@ -795,11 +799,11 @@ private: if (!(flags & nonWindowFlags)) { - if (width != gConfigGeneral.WindowWidth || height != gConfigGeneral.WindowHeight) + if (width != Config::Get().general.WindowWidth || height != Config::Get().general.WindowHeight) { - gConfigGeneral.WindowWidth = width; - gConfigGeneral.WindowHeight = height; - ConfigSaveDefault(); + Config::Get().general.WindowWidth = width; + Config::Get().general.WindowHeight = height; + Config::Save(); } } } @@ -844,10 +848,11 @@ private: resolutions.erase(last, resolutions.end()); // Update config fullscreen resolution if not set - if (!resolutions.empty() && (gConfigGeneral.FullscreenWidth == -1 || gConfigGeneral.FullscreenHeight == -1)) + if (!resolutions.empty() + && (Config::Get().general.FullscreenWidth == -1 || Config::Get().general.FullscreenHeight == -1)) { - gConfigGeneral.FullscreenWidth = resolutions.back().Width; - gConfigGeneral.FullscreenHeight = resolutions.back().Height; + Config::Get().general.FullscreenWidth = resolutions.back().Width; + Config::Get().general.FullscreenHeight = resolutions.back().Height; } _fsResolutions = resolutions; diff --git a/src/openrct2-ui/UiStringIds.h b/src/openrct2-ui/UiStringIds.h new file mode 100644 index 0000000000..e2982019e5 --- /dev/null +++ b/src/openrct2-ui/UiStringIds.h @@ -0,0 +1,2219 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +namespace OpenRCT2 +{ + enum : StringId + { + // General + STR_ADJUST_LARGER_LAND_TIP = 2379, + STR_ADJUST_SMALLER_LAND_TIP = 2378, + STR_BROKEN = 3124, + STR_CANCEL = 972, + STR_CANT_INCREASE_FURTHER = 3264, + STR_CANT_REDUCE_FURTHER = 3265, + STR_CHANGE_BASE_LAND_TIP = 2294, + STR_CHANGE_VERTICAL_LAND_TIP = 2295, + STR_CHAT = 5913, + STR_CLOSE_WINDOW_TIP = 828, + STR_COMMA16 = 5919, + STR_CONSOLE_HELPER_TEXT = 6623, + STR_CURRENCY_FORMAT_LABEL = 3246, + STR_COPY_INPUT_TO_CLIPBOARD = 6363, + STR_COST_AMOUNT = 986, + STR_COST_LABEL = 1408, + STR_ENTER_NEW_VALUE = 6000, + STR_ENTER_PARK_NAME = 1719, + STR_ENTER_SELECTION_SIZE = 5129, + STR_ERROR_INVALID_CHARACTERS = 5243, + STR_FORMAT_INTEGER = 5182, + STR_GRAPH_LABEL = 2222, + STR_LIGHTPINK_STRINGID = 5299, + STR_ENTER_MAP_SIZE = 5131, + STR_MAINTAIN_SQUARE_MAP_TOOLTIP = 6498, + STR_MAP_TOOLTIP_BANNER_STRINGID_STRINGID = 6308, + STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY = 1163, + STR_MAP_TOOLTIP_STRINGID_CLICK_TO_REMOVE = 1164, + STR_MISSING_DIALOG_APPLICATION_ERROR = 6155, + STR_OK = 973, + STR_OPTIONS_DROPDOWN_ITEM = 2777, + STR_OPTIONS_DROPDOWN_ITEM_SELECTED = 2778, + STR_PICKUP_TIP = 1706, + STR_POP16_COMMA16 = 3212, + STR_RED_OUTLINED_STRING = 1192, + STR_RED_STRINGID = 5298, + STR_SAVE_PROMPT_CANCEL = 946, + STR_SELECTION_SIZE = 5128, + STR_STRING_DEFINED_TOOLTIP = 1812, + STR_WINDOW_COLOUR_2_COMMA2DP32 = 3311, + STR_WINDOW_COLOUR_2_COMMA32 = 3309, + STR_WINDOW_TITLE_TIP = 829, + STR_WHITE_STRING = 5139, + + // Colour dropdown tooltips + STR_COLOUR_AQUAMARINE_TIP = 5526, + STR_COLOUR_AQUA_DARK_TIP = 6569, + STR_COLOUR_BLACK_TIP = 5516, + STR_COLOUR_BORDEAUX_RED_DARK_TIP = 6554, + STR_COLOUR_BORDEAUX_RED_LIGHT_TIP = 6555, + STR_COLOUR_BORDEAUX_RED_TIP = 5542, + STR_COLOUR_BRIGHT_GREEN_TIP = 5530, + STR_COLOUR_BRIGHT_PINK_TIP = 5546, + STR_COLOUR_BRIGHT_PURPLE_TIP = 5521, + STR_COLOUR_BRIGHT_RED_TIP = 5544, + STR_COLOUR_BRIGHT_YELLOW_TIP = 5533, + STR_COLOUR_DARK_BLUE_TIP = 5522, + STR_COLOUR_DARK_BROWN_TIP = 5540, + STR_COLOUR_DARK_GREEN_TIP = 5528, + STR_COLOUR_DARK_OLIVE_DARK_TIP = 6551, + STR_COLOUR_DARK_OLIVE_GREEN_TIP = 5532, + STR_COLOUR_DARK_OLIVE_LIGHT_TIP = 6552, + STR_COLOUR_DARK_ORANGE_TIP = 5537, + STR_COLOUR_DARK_PINK_TIP = 5545, + STR_COLOUR_DARK_PURPLE_TIP = 5519, + STR_COLOUR_DARK_YELLOW_TIP = 5535, + STR_COLOUR_DULL_BROWN_DARK_TIP = 6571, + STR_COLOUR_DULL_BROWN_LIGHT_TIP = 6572, + STR_COLOUR_DULL_GREEN_DARK_TIP = 6564, + STR_COLOUR_DULL_GREEN_LIGHT_TIP = 6565, + STR_COLOUR_DULL_PURPLE_LIGHT_TIP = 6563, + STR_COLOUR_GRASS_GREEN_DARK_TIP = 6556, + STR_COLOUR_GRASS_GREEN_LIGHT_TIP = 6557, + STR_COLOUR_GREY_TIP = 5517, + STR_COLOUR_ICY_BLUE_TIP = 5524, + STR_COLOUR_INVISIBLE_TIP = 6573, + STR_COLOUR_LIGHT_BLUE_TIP = 5523, + STR_COLOUR_LIGHT_BROWN_TIP = 5538, + STR_COLOUR_LIGHT_ORANGE_TIP = 5536, + STR_COLOUR_LIGHT_PINK_TIP = 5547, + STR_COLOUR_LIGHT_PURPLE_TIP = 5520, + STR_COLOUR_MAGENTA_LIGHT_TIP = 6570, + STR_COLOUR_MOSS_GREEN_TIP = 5529, + STR_COLOUR_OLIVE_DARK_TIP = 6558, + STR_COLOUR_OLIVE_GREEN_TIP = 5531, + STR_COLOUR_OLIVE_LIGHT_TIP = 6559, + STR_COLOUR_ORANGE_LIGHT_TIP = 6568, + STR_COLOUR_SALMON_PINK_TIP = 5541, + STR_COLOUR_SATURATED_BROWN_LIGHT_TIP = 6553, + STR_COLOUR_SATURATED_BROWN_TIP = 5539, + STR_COLOUR_SATURATED_GREEN_LIGHT_TIP = 6560, + STR_COLOUR_SATURATED_GREEN_TIP = 5527, + STR_COLOUR_SATURATED_PURPLE_DARK_TIP = 6566, + STR_COLOUR_SATURATED_PURPLE_LIGHT_TIP = 6567, + STR_COLOUR_SATURATED_RED_TIP = 5543, + STR_COLOUR_TAN_DARK_TIP = 6561, + STR_COLOUR_TAN_LIGHT_TIP = 6562, + STR_COLOUR_TEAL_TIP = 5525, + STR_COLOUR_VOID_TIP = 6574, + STR_COLOUR_WHITE_TIP = 5518, + STR_COLOUR_YELLOW_TIP = 5534, + + // Shortcuts + STR_SHORTCUT_ADJUST_LAND = 2511, + STR_SHORTCUT_ADJUST_WATER = 2512, + STR_SHORTCUT_ADVANCE_TO_NEXT_TICK = 6268, + STR_SHORTCUT_BACKSPACE = 2533, + STR_SHORTCUT_BUILD_NEW_RIDE = 2515, + STR_SHORTCUT_BUILD_PATHS = 2514, + STR_SHORTCUT_BUILD_SCENERY = 2513, + STR_SHORTCUT_CANCEL_CONSTRUCTION_MODE = 2495, + STR_SHORTCUT_CLEAR_SCENERY = 6134, + STR_SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS = 2494, + STR_SHORTCUT_CLOSE_TOP_MOST_WINDOW = 2493, + STR_SHORTCUT_CONSTRUCTION_BANK_LEFT = 6024, + STR_SHORTCUT_CONSTRUCTION_BANK_RIGHT = 6025, + STR_SHORTCUT_CONSTRUCTION_BUILD_CURRENT = 6028, + STR_SHORTCUT_CONSTRUCTION_CHAIN_LIFT_TOGGLE = 6023, + STR_SHORTCUT_CONSTRUCTION_DEMOLISH_CURRENT = 6029, + STR_SHORTCUT_CONSTRUCTION_NEXT_TRACK = 6027, + STR_SHORTCUT_CONSTRUCTION_PREVIOUS_TRACK = 6026, + STR_SHORTCUT_CONSTRUCTION_SLOPE_DOWN = 6021, + STR_SHORTCUT_CONSTRUCTION_SLOPE_UP = 6022, + STR_SHORTCUT_CONSTRUCTION_TURN_LEFT = 6018, + STR_SHORTCUT_CONSTRUCTION_TURN_RIGHT = 6019, + STR_SHORTCUT_CONSTRUCTION_USE_TRACK_DEFAULT = 6020, + STR_SHORTCUT_COPY_ELEMENT = 6336, + STR_SHORTCUT_DEBUG_PAINT_TOGGLE = 5899, + STR_SHORTCUT_DECREASE_ELEM_HEIGHT = 6346, + STR_SHORTCUT_DECREASE_X_COORD = 6342, + STR_SHORTCUT_DECREASE_Y_COORD = 6344, + STR_SHORTCUT_DELETE = 2571, + STR_SHORTCUT_DOWN = 2565, + STR_SHORTCUT_ESCAPE = 2552, + STR_SHORTCUT_GIANT_SCREENSHOT = 6456, + STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE = 6161, + STR_SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE = 2508, + STR_SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE = 2510, + STR_SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE = 2509, + STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE = 6234, + STR_SHORTCUT_INCREASE_ELEM_HEIGHT = 6345, + STR_SHORTCUT_INCREASE_GAME_SPEED = 5450, + STR_SHORTCUT_INCREASE_X_COORD = 6341, + STR_SHORTCUT_INCREASE_Y_COORD = 6343, + STR_SHORTCUT_INSERT = 2570, + STR_SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE = 2506, + STR_SHORTCUT_JOY_DOWN = 6428, + STR_SHORTCUT_JOY_LEFT = 6425, + STR_SHORTCUT_JOY_NUMBER = 6429, + STR_SHORTCUT_JOY_RIGHT = 6426, + STR_SHORTCUT_JOY_UP = 6427, + STR_SHORTCUT_LEFT = 2562, + STR_SHORTCUT_MOD_ALT = 6419, + STR_SHORTCUT_MOD_CTRL = 6416, + STR_SHORTCUT_MOD_GUI = 6422, + STR_SHORTCUT_MOD_LALT = 6420, + STR_SHORTCUT_MOD_LCTRL = 6417, + STR_SHORTCUT_MOD_LGUI = 6423, + STR_SHORTCUT_MOD_LSHIFT = 6414, + STR_SHORTCUT_MOD_RALT = 6421, + STR_SHORTCUT_MOD_RCTRL = 6418, + STR_SHORTCUT_MOD_RGUI = 6424, + STR_SHORTCUT_MOD_RSHIFT = 6415, + STR_SHORTCUT_MOD_SHIFT = 6413, + STR_SHORTCUT_MOUSE_LEFT = 6430, + STR_SHORTCUT_MOUSE_NUMBER = 6432, + STR_SHORTCUT_MOUSE_RIGHT = 6431, + STR_SHORTCUT_MOVE_ELEMENT_DOWN = 6340, + STR_SHORTCUT_MOVE_ELEMENT_UP = 6339, + STR_SHORTCUT_MUTE_SOUND = 5804, + STR_SHORTCUT_NUMPAD_0 = 2621, + STR_SHORTCUT_NUMPAD_1 = 2622, + STR_SHORTCUT_NUMPAD_2 = 2623, + STR_SHORTCUT_NUMPAD_3 = 2624, + STR_SHORTCUT_NUMPAD_4 = 2625, + STR_SHORTCUT_NUMPAD_5 = 2626, + STR_SHORTCUT_NUMPAD_6 = 2627, + STR_SHORTCUT_NUMPAD_7 = 2628, + STR_SHORTCUT_NUMPAD_8 = 2629, + STR_SHORTCUT_NUMPAD_9 = 2630, + STR_SHORTCUT_NUMPAD_DIVIDE = 2636, + STR_SHORTCUT_NUMPAD_MINUS = 2634, + STR_SHORTCUT_NUMPAD_MULTIPLY = 2631, + STR_SHORTCUT_NUMPAD_PERIOD = 2635, + STR_SHORTCUT_NUMPAD_PLUS = 2632, + STR_SHORTCUT_NUMPAD_RETURN = 6412, + STR_SHORTCUT_OPEN_CHEATS_WINDOW = 5451, + STR_SHORTCUT_OPEN_KEYBOARD_SHORTCUTS_WINDOW = 6582, + STR_SHORTCUT_OPEN_SCENERY_PICKER = 6304, + STR_SHORTCUT_OPEN_TILE_INSPECTOR = 6267, + STR_SHORTCUT_OPEN_TRANSPARENCY_OPTIONS = 6483, + STR_SHORTCUT_PASTE_ELEMENT = 6337, + STR_SHORTCUT_PAUSE_GAME = 2496, + STR_SHORTCUT_PGDN = 2559, + STR_SHORTCUT_PGUP = 2558, + STR_SHORTCUT_REDUCE_GAME_SPEED = 5449, + STR_SHORTCUT_REMOVE_BASE_LAND_TOGGLE = 2502, + STR_SHORTCUT_REMOVE_ELEMENT = 6338, + STR_SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE = 2503, + STR_SHORTCUT_RETURN = 2538, + STR_SHORTCUT_RIGHT = 2564, + STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT = 2500, + STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE = 5460, + STR_SHORTCUT_ROTATE_VIEW_CLOCKWISE = 2499, + STR_SHORTCUT_SCALE_DOWN = 6334, + STR_SHORTCUT_SCALE_UP = 6333, + STR_SHORTCUT_SCREENSHOT = 2524, + STR_SHORTCUT_SCROLL_MAP_DOWN = 5471, + STR_SHORTCUT_SCROLL_MAP_LEFT = 5470, + STR_SHORTCUT_SCROLL_MAP_RIGHT = 5472, + STR_SHORTCUT_SCROLL_MAP_UP = 5469, + STR_SHORTCUT_SEE_THROUGH_GUESTS_TOGGLE = 6486, + STR_SHORTCUT_SEE_THROUGH_PATHS_TOGGLE = 5912, + STR_SHORTCUT_SEE_THROUGH_RIDES_TOGGLE = 2504, + STR_SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE = 2505, + STR_SHORTCUT_SEE_THROUGH_STAFF_TOGGLE = 6487, + STR_SHORTCUT_SEE_THROUGH_VEGETATION_TOGGLE = 6484, + STR_SHORTCUT_SEE_THROUGH_VEHICLES_TOGGLE = 6485, + STR_SHORTCUT_SEND_MESSAGE = 5493, + STR_SHORTCUT_SHOW_FINANCIAL_INFORMATION = 2516, + STR_SHORTCUT_SHOW_GUEST_LIST = 2520, + STR_SHORTCUT_SHOW_MULTIPLAYER = 5812, + STR_SHORTCUT_SHOW_OPTIONS = 5714, + STR_SHORTCUT_SHOW_PARK_INFORMATION = 2519, + STR_SHORTCUT_SHOW_RECENT_MESSAGES = 2522, + STR_SHORTCUT_SHOW_RESEARCH_INFORMATION = 2517, + STR_SHORTCUT_SHOW_RIDES_LIST = 2518, + STR_SHORTCUT_SHOW_STAFF_LIST = 2521, + STR_SHORTCUT_SORT_ELEMENTS = 6624, + STR_SHORTCUT_SPACEBAR = 2557, + STR_SHORTCUT_TAB = 2534, + STR_SHORTCUT_TOGGLE_CLEARANCE_CHECKS = 6373, + STR_SHORTCUT_TOGGLE_INVISIBILITY = 6439, + STR_SHORTCUT_TOGGLE_VISIBILITY_OF_TOOLBARS = 5452, + STR_SHORTCUT_TOGGLE_WALL_SLOPE = 6594, + STR_SHORTCUT_UNDERGROUND_VIEW_TOGGLE = 2501, + STR_SHORTCUT_UP = 2563, + STR_SHORTCUT_VIEW_CLIPPING = 6233, + STR_SHORTCUT_WINDOWED_MODE_TOGGLE = 5806, + STR_SHORTCUT_ZOOM_VIEW_IN = 2498, + STR_SHORTCUT_ZOOM_VIEW_OUT = 2497, + + // Window: About.cpp + STR_ABOUT_FAIRGROUND_ORGAN = 6588, + STR_ABOUT_OPENRCT2_DESCRIPTION = 6137, + STR_ABOUT_OPENRCT2_DESCRIPTION_2 = 6138, + STR_ABOUT_OPENRCT2_DESCRIPTION_3 = 6139, + STR_ABOUT_OPENRCT2_TITLE = 6587, + STR_ABOUT_SPECIAL_THANKS_1 = 6540, + STR_ABOUT_SPECIAL_THANKS_2 = 6541, + STR_ADDITIONAL_SOUNDS_RECORDED_BY_DE = 854, + STR_CHANGELOG_ELLIPSIS = 6140, + STR_CONTRIBUTORS_WINDOW_BUTTON = 6543, + STR_COPYRIGHT_CS = 850, + STR_COPY_BUILD_HASH = 6453, + STR_DESIGNED_AND_PROGRAMMED_BY_CS = 851, + STR_GRAPHICS_BY_SF = 852, + STR_JOIN_DISCORD = 6381, + STR_LICENSED_TO_INFOGRAMES_INTERACTIVE_INC = 2861, + STR_REPRESENTATION_BY_JL = 855, + STR_SOUND_AND_MUSIC_BY_AB = 853, + STR_THANKS_TO = 856, + STR_THANKS_TO_PEOPLE = 857, + + // Window: AssetPacks + STR_ASSET_PACKS = 6520, + STR_BASE_GRAPHICS_MUSIC_SOUND = 6526, + STR_DECREASE_PRIOTITY_TIP = 6523, + STR_HIGH_PRIORITY = 6522, + STR_INCREASE_PRIOTITY_TIP = 6524, + STR_LOW_PRIORITY = 6521, + STR_RELOAD_ASSET_PACKS_TIP = 6525, + + // Window: Banner + STR_BANNER_TEXT = 2982, + STR_BANNER_WINDOW_TITLE = 2985, + STR_CHANGE_BANNER_TEXT_TIP = 2986, + STR_DEMOLISH_BANNER_TIP = 2988, + STR_ENTER_BANNER_TEXT = 2983, + STR_SELECT_MAIN_SIGN_COLOUR_TIP = 2989, + STR_SELECT_TEXT_COLOUR_TIP = 2990, + STR_SET_AS_NO_ENTRY_BANNER_TIP = 2987, + STR_TEXT_COLOUR_BABYBLUE = 3004, + STR_TEXT_COLOUR_BLACK = 2996, + STR_TEXT_COLOUR_CELADON = 3003, + STR_TEXT_COLOUR_GREEN = 3000, + STR_TEXT_COLOUR_GREY = 2997, + STR_TEXT_COLOUR_LIGHTPINK = 3007, + STR_TEXT_COLOUR_PALEGOLD = 3006, + STR_TEXT_COLOUR_PALELAVENDER = 3005, + STR_TEXT_COLOUR_PALESILVER = 3009, + STR_TEXT_COLOUR_PEARLAQUA = 3008, + STR_TEXT_COLOUR_RED = 2999, + STR_TEXT_COLOUR_TOPAZ = 3002, + STR_TEXT_COLOUR_WHITE = 2998, + STR_TEXT_COLOUR_YELLOW = 3001, + + // Window: Changelog + STR_CONTRIBUTORS_WINDOW = 6542, + STR_NEW_RELEASE_DOWNLOAD_PAGE = 6383, + STR_NEW_RELEASE_VERSION_INFO = 6382, + + // Window: Cheats + STR_ADD_MONEY = 5998, + STR_ADD_SET_MONEY = 5997, + STR_CHANGE_WEATHER_TOOLTIP = 5726, + STR_CHEAT_10_MINUTE_INSPECTIONS_TIP = 5560, + STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES_TIP = 5909, + STR_CHEAT_ALLOW_PATH_AS_QUEUE_TIP = 6538, + STR_CHEAT_ALLOW_SPECIAL_COLOUR_SCHEMES_TIP = 6576, + STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS_TIP = 6370, + STR_CHEAT_BUILD_IN_PAUSE_MODE_TIP = 5798, + STR_CHEAT_CLOSE_PARK = 2770, + STR_CHEAT_DISABLE_BRAKES_FAILURE_TIP = 5799, + STR_CHEAT_DISABLE_BREAKDOWNS_TIP = 5800, + STR_CHEAT_DISABLE_LITTERING_TIP = 5802, + STR_CHEAT_DISABLE_PLANT_AGING_TIP = 5872, + STR_CHEAT_DISABLE_RIDE_VALUE_AGING_TIP = 6102, + STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT_TIP = 5811, + STR_CHEAT_DISABLE_VANDALISM_TIP = 5515, + STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES_TIP = 6147, + STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK_TIP = 5874, + STR_CHEAT_FIX_ALL_RIDES_TIP = 5792, + STR_CHEAT_FREEZE_WEATHER_TIP = 5797, + STR_CHEAT_GENERAL_GROUP = 5464, + STR_CHEAT_GROUP_AVAILABILITY = 6217, + STR_CHEAT_GROUP_CONSTRUCTION = 6215, + STR_CHEAT_GROUP_OPERATION = 6216, + STR_CHEAT_GUEST_ENERGY = 5353, + STR_CHEAT_GUEST_HAPPINESS = 5352, + STR_CHEAT_GUEST_HUNGER = 5354, + STR_CHEAT_GUEST_NAUSEA = 5356, + STR_CHEAT_GUEST_NAUSEA_TOLERANCE = 5357, + STR_CHEAT_GUEST_PREFERRED_INTENSITY = 5362, + STR_CHEAT_GUEST_THIRST = 5355, + STR_CHEAT_GUEST_TOILET = 5358, + STR_CHEAT_IGNORE_INTENSITY_TIP = 5795, + STR_CHEAT_IGNORE_RESEARCH_STATUS_TIP = 6133, + STR_CHEAT_LARGE_TRAM_GUESTS_TIP = 2684, + STR_CHEAT_LESS_THAN_15 = 5364, + STR_CHEAT_MAINTENANCE_GROUP = 6395, + STR_CHEAT_MAKE_DESTRUCTABLE_TIP = 5794, + STR_CHEAT_MORE_THAN_1 = 5363, + STR_CHEAT_MOWED_GRASS = 2753, + STR_CHEAT_NEVERENDING_MARKETING_TIP = 5741, + STR_CHEAT_OBJECTIVE_GROUP = 6394, + STR_CHEAT_OPEN_PARK_TIP = 5796, + STR_CHEAT_OWN_ALL_LAND_TIP = 6121, + STR_CHEAT_REMOVE_ALL_GUESTS_TIP = 5360, + STR_CHEAT_RENEW_RIDES_TIP = 5791, + STR_CHEAT_RESET_CRASH_STATUS_TIP = 5793, + STR_CHEAT_STAFF_GROUP = 5466, + STR_CHEAT_TITLE_FINANCIAL = 5345, + STR_CHEAT_TITLE_GUEST = 5346, + STR_CHEAT_TITLE_PARK = 5347, + STR_CHEAT_TITLE_RIDE = 5348, + STR_CHEAT_UNLOCK_OPERATING_LIMITS_TIP = 5585, + STR_CHEAT_WEATHER_GROUP = 5465, + STR_CREATE_DUCKS = 6331, + STR_CREATE_DUCKS_TIP = 6356, + STR_DATE_RESET = 6200, + STR_DATE_SET = 6199, + STR_DAY = 6198, + STR_FAST = 5367, + STR_FINANCIAL_CHEATS_TIP = 5178, + STR_FORMAT_MONTH = 6201, + STR_FROZEN = 6232, + STR_GUEST_CHEATS_TIP = 5179, + STR_MAX = 5350, + STR_MIN = 5351, + STR_MONTH = 6197, + STR_NORMAL = 5366, + STR_PARK_CHEATS_TIP = 5180, + STR_REMOVE_DUCKS = 6332, + STR_REMOVE_DUCKS_TIP = 6357, + STR_RIDE_CHEATS_TIP = 5181, + STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE = 5563, + STR_WARNING_IN_CAPS = 5562, + STR_YEAR = 6196, + + // Window: Cheats -- weather + STR_SUNNY = 5719, + STR_PARTIALLY_CLOUDY = STR_SUNNY + 1, + STR_CLOUDY = STR_SUNNY + 2, + STR_RAIN = STR_SUNNY + 3, + STR_HEAVY_RAIN = STR_SUNNY + 4, + STR_THUNDERSTORM = STR_SUNNY + 5, + STR_SNOW = 6384, + STR_HEAVY_SNOW = 6385, + STR_BLIZZARD = 6386, + + // Window: ClearScenery + STR_CLEAR_SCENERY = 3439, + STR_CLEAR_SCENERY_REMOVE_FOOTPATHS_TIP = 5274, + STR_CLEAR_SCENERY_REMOVE_LARGE_SCENERY_TIP = 5273, + STR_CLEAR_SCENERY_REMOVE_SMALL_SCENERY_TIP = 5272, + + // Window: CustomCurrency + STR_CURRENCY_FORMAT = 5462, + STR_CURRENCY_SYMBOL_TEXT = 5886, + STR_CUSTOM_CURRENCY_EQUIVALENCY = 5885, + STR_CUSTOM_CURRENCY_SYMBOL_INPUT_DESC = 5890, + STR_CUSTOM_CURRENCY_SYMBOL_INPUT_TITLE = 5889, + STR_CUSTOM_CURRENCY_WINDOW_TITLE = 5883, + STR_PREFIX = 5887, + STR_RATE = 5884, + STR_RATE_INPUT_DESC = 5894, + STR_RATE_INPUT_TITLE = 5893, + STR_SUFFIX = 5888, + + // Window: DebugPaint + STR_DEBUG_PAINT_SHOW_BLOCKED_TILES = 6260, + STR_DEBUG_PAINT_SHOW_BOUND_BOXES = 5902, + STR_DEBUG_PAINT_SHOW_DIRTY_VISUALS = 6144, + STR_DEBUG_PAINT_SHOW_SEGMENT_HEIGHTS = 5901, + STR_DEBUG_PAINT_SHOW_WIDE_PATHS = 6261, + + // Window: DemolishRidePrompt + STR_DEMOLISH = 994, + STR_DEMOLISH_RIDE = 993, + STR_DEMOLISH_RIDE_ID = 995, + STR_DEMOLISH_RIDE_ID_MONEY = 6250, + + // Window: EditorBottomToolbar + STR_BACK_TO_PREVIOUS_STEP = 3209, + STR_CANT_ADVANCE_TO_NEXT_EDITOR_STAGE = 3328, + STR_EDITOR_STEP_INVENTIONS_LIST_SET_UP = 3203, + STR_EDITOR_STEP_LANDSCAPE_EDITOR = 3202, + STR_EDITOR_STEP_OBJECTIVE_SELECTION = 3205, + STR_EDITOR_STEP_OBJECT_SELECTION = 3201, + STR_EDITOR_STEP_OPTIONS_SELECTION = 3204, + STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER = 3207, + STR_EDITOR_STEP_SAVE_SCENARIO = 3206, + STR_EDITOR_STEP_TRACK_DESIGNS_MANAGER = 3208, + STR_FORWARD_TO_NEXT_STEP = 3210, + STR_UNABLE_TO_SAVE_SCENARIO_FILE = 3320, + + // Window: EditorInventionsList + STR_INVENTION_LIST = 3195, + STR_INVENTION_PREINVENTED_ITEMS = 3197, + STR_INVENTION_RESEARCH_GROUP = 3196, + STR_INVENTION_TO_BE_INVENTED_ITEMS = 3198, + STR_MOVE_ALL_BOTTOM = 2751, + STR_MOVE_ALL_TOP = 2750, + STR_RANDOM_SHUFFLE = 3199, + STR_RANDOM_SHUFFLE_TIP = 3200, + STR_WINDOW_COLOUR_2_STRINGID_STRINGID = 6229, + + // Window: EditorObjectSelection + STR_INCLUDES_X_OBJECTS = 3167, + STR_INSTALL_NEW_TRACK_DESIGN = 3376, + STR_INSTALL_NEW_TRACK_DESIGN_TIP = 3377, + STR_MUSIC_OBJECT_TRACK_HEADER = 6449, + STR_MUSIC_OBJECT_TRACK_LIST_ITEM = 6450, + STR_MUSIC_OBJECT_TRACK_LIST_ITEM_WITH_COMPOSER = 6451, + STR_NON_SELECTED_ONLY = 5881, + STR_NOT_ALL_OBJECTS_IN_THIS_SCENERY_GROUP_COULD_BE_SELECTED = 3375, + STR_OBJECTS_SORT_RIDE = 5448, + STR_OBJECTS_SORT_TYPE = 5447, + STR_OBJECT_FILTER = 5261, + STR_OBJECT_FILTER_ALL_RIDES_TIP = 5349, + STR_OBJECT_FILTER_TIP = 5265, + STR_OBJECT_SEARCH_CLEAR = 5277, + STR_OBJECT_SELECTION = 3181, + STR_OBJECT_SELECTION_ADVANCED = 3364, + STR_OBJECT_SELECTION_ADVANCED_TIP = 3365, + STR_OBJECT_SELECTION_COMPAT_OBJECT_DESCRIPTION = 6550, + STR_OBJECT_SELECTION_FALLBACK_IMAGES_WARNING = 6516, + STR_OBJECT_SELECTION_FOOTPATHS = 3189, + STR_OBJECT_SELECTION_FOOTPATH_RAILINGS = 6445, + STR_OBJECT_SELECTION_FOOTPATH_SURFACES = 6444, + STR_OBJECT_SELECTION_LARGE_SCENERY = 3186, + STR_OBJECT_SELECTION_MUSIC = 6273, + STR_OBJECT_SELECTION_PATH_EXTRAS = 3190, + STR_OBJECT_SELECTION_PATH_SIGNS = 3188, + STR_OBJECT_SELECTION_RIDE_VEHICLES_ATTRACTIONS = 3184, + STR_OBJECT_SELECTION_SCENERY_GROUPS = 3191, + STR_OBJECT_SELECTION_SELECTION_SIZE = 3164, + STR_OBJECT_SELECTION_SMALL_SCENERY = 3185, + STR_OBJECT_SELECTION_STATIONS = 6272, + STR_OBJECT_SELECTION_TERRAIN_EDGES = 6271, + STR_OBJECT_SELECTION_TERRAIN_SURFACES = 6270, + STR_OBJECT_SELECTION_WALLS_FENCES = 3187, + STR_OBJECT_SELECTION_WATER = 3193, + STR_OBJECT_USES_FALLBACK_IMAGES = 6515, + STR_RELOAD_OBJECT_TIP = 6613, + STR_RIDE_OBJECT_SHOP_SELLS = 6452, + STR_ROLLER_COASTER_DESIGNER_SELECT_RIDE_TYPES_VEHICLES = 3335, + STR_SELECTED_ONLY = 5880, + STR_TRACK_DESIGNS_MANAGER_SELECT_RIDE_TYPE = 3336, + STR_UNABLE_TO_DE_SELECT_THIS_OBJECT = 3177, + STR_UNABLE_TO_SELECT_THIS_OBJECT = 3176, + STR_WARNING_TOO_MANY_OBJECTS_SELECTED = 3374, + + // Window: EditorObjectiveOptions + STR_CHANGE = 3294, + STR_CHANGE_DETAIL_NOTES_ABOUT_PARK_SCENARIO_TIP = 3297, + STR_CHANGE_NAME_OF_PARK_TIP = 3295, + STR_CHANGE_NAME_OF_SCENARIO_TIP = 3296, + STR_ENTER_SCENARIO_DESCRIPTION = 3316, + STR_ENTER_SCENARIO_NAME = 3314, + STR_OBJECTIVE_DROPDOWN_NONE = 2397, + STR_OBJECTIVE_DROPDOWN_BUILD_10_ROLLER_COASTERS = STR_OBJECTIVE_DROPDOWN_NONE + 5, + STR_OBJECTIVE_DROPDOWN_BUILD_10_ROLLER_COASTERS_OF_A_GIVEN_LENGTH = STR_OBJECTIVE_DROPDOWN_NONE + 8, + STR_OBJECTIVE_DROPDOWN_BUILD_THE_BEST_RIDE_YOU_CAN = STR_OBJECTIVE_DROPDOWN_NONE + 4, + STR_OBJECTIVE_DROPDOWN_FINISH_BUILDING_5_ROLLER_COASTERS = STR_OBJECTIVE_DROPDOWN_NONE + 9, + STR_OBJECTIVE_DROPDOWN_HAVE_FUN = STR_OBJECTIVE_DROPDOWN_NONE + 3, + STR_OBJECTIVE_DROPDOWN_MONTHLY_INCOME_FROM_RIDE_TICKETS = STR_OBJECTIVE_DROPDOWN_NONE + 7, + STR_OBJECTIVE_DROPDOWN_MONTHLY_PROFIT_FROM_FOOD_MERCHANDISE = STR_OBJECTIVE_DROPDOWN_NONE + 11, + STR_OBJECTIVE_DROPDOWN_NUMBER_OF_GUESTS_AT_A_GIVEN_DATE = STR_OBJECTIVE_DROPDOWN_NONE + 1, + STR_OBJECTIVE_DROPDOWN_NUMBER_OF_GUESTS_IN_PARK = STR_OBJECTIVE_DROPDOWN_NONE + 6, + STR_OBJECTIVE_DROPDOWN_PARK_VALUE_AT_A_GIVEN_DATE = STR_OBJECTIVE_DROPDOWN_NONE + 2, + STR_OBJECTIVE_DROPDOWN_REPAY_LOAN_AND_ACHIEVE_A_GIVEN_PARK_VALUE = STR_OBJECTIVE_DROPDOWN_NONE + 10, + STR_OBJECTIVE_SELECTION = 3284, + STR_OBJECTIVE_WINDOW = 3287, + STR_PARK_SCENARIO_DETAILS = 3315, + STR_SCENARIO_NAME = 3313, + STR_SELECT_OBJECTIVE_AND_PARK_NAME_TIP = 3282, + STR_SELECT_OBJECTIVE_FOR_THIS_SCENARIO_TIP = 3286, + STR_SELECT_RIDES_TO_BE_PRESERVED_TIP = 3283, + STR_SELECT_WHICH_GROUP_THIS_SCENARIO_APPEARS_IN = 3318, + STR_WINDOW_COLOUR_2_LENGTH = 3310, + STR_WINDOW_OBJECTIVE_DATE = 3301, + STR_WINDOW_OBJECTIVE_EXCITEMENT_RATING = 3308, + STR_WINDOW_OBJECTIVE_GUEST_COUNT = 3303, + STR_WINDOW_OBJECTIVE_MINIMUM_LENGTH = 3307, + STR_WINDOW_OBJECTIVE_MONTHLY_INCOME = 3305, + STR_WINDOW_OBJECTIVE_MONTHLY_PROFIT = 3306, + STR_WINDOW_OBJECTIVE_PARK_VALUE = 3304, + STR_WINDOW_OBJECTIVE_VALUE_DATE = 3302, + STR_WINDOW_PARK_DETAILS = 3299, + STR_WINDOW_PARK_NAME = 3298, + STR_WINDOW_PRESERVATION_ORDER = 3312, + STR_WINDOW_SCENARIO_GROUP = 3319, + STR_WINDOW_SCENARIO_NAME = 3300, + + // Window: EditorScenarioOptions + STR_CANT_INCREASE_CASH = 3248, + STR_CANT_INCREASE_INIT_LOAN = 3250, + STR_CANT_INCREASE_INTEREST_RATE = 3254, + STR_CANT_INCREASE_MAX_LOAN = 3252, + STR_CANT_REDUCE_CASH = 3249, + STR_CANT_REDUCE_INIT_LOAN = 3251, + 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, + STR_FORBID_LANDSCAPE_CHANGES = 3269, + STR_FORBID_LANDSCAPE_CHANGES_TIP = 3270, + STR_FORBID_MARKETING = 3244, + STR_FORBID_MARKETING_TIP = 3245, + 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_HARD_GUEST_GENERATION = 3275, + STR_HARD_GUEST_GENERATION_TIP = 3276, + STR_HARD_PARK_RATING = 3273, + STR_HARD_PARK_RATING_TIP = 3274, + STR_INIT_CASH_LABEL = 3240, + STR_INIT_LOAN_LABEL = 3241, + STR_INTEREST_RATE_LABEL = 3243, + STR_LAND_COST_LABEL = 3277, + STR_MAKE_PARK_NO_MONEY_TIP = 3239, + STR_MAX_LOAN_LABEL = 3242, + STR_PAID_ENTRY_PAID_RIDES = 6153, + STR_PAY_FOR_PARK_PAY_FOR_RIDES_TIP = 3266, + STR_PAY_PARK_ENTER = 3280, + STR_PERCENT_FORMAT_LABEL = 3247, + STR_RCT1_INTEREST = 6545, + STR_RCT1_INTEREST_TIP = 6546, + STR_RIGHTS_COST_LABEL = 3278, + STR_SCENARIO_OPTIONS_FINANCIAL = 3232, + STR_SCENARIO_OPTIONS_FINANCIAL_TIP = 3235, + STR_SCENARIO_OPTIONS_GUESTS = 3233, + STR_SCENARIO_OPTIONS_GUESTS_TIP = 3236, + STR_SCENARIO_OPTIONS_PARK = 3234, + STR_SCENARIO_OPTIONS_PARK_TIP = 3237, + STR_SELECT_CLIMATE_TIP = 3288, + + // Window: Finances + STR_1_WEEK_REMAINING = 5484, + STR_CASH_LABEL = 2224, + STR_CASH_NEGATIVE_LABEL = 2225, + STR_COMPANY_VALUE_LABEL = 2227, + STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_NEGATIVE = 2453, + STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_POSITIVE = 2452, + STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE = 2454, + STR_FINANCES_PARK_VALUE = 2787, + STR_FINANCES_RESEARCH_TIP = 2275, + STR_FINANCES_SHOW_CASH_TAB_TIP = 2458, + STR_FINANCES_SHOW_MARKETING_TAB_TIP = 2461, + STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP = 2459, + STR_FINANCES_SHOW_SUMMARY_TAB_TIP = 2457, + STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP = 2460, + STR_FINANCES_SUMMARY_AT_X_PER_YEAR = 1911, + STR_FINANCES_SUMMARY_EXPENDITURE_INCOME = 1896, + STR_FINANCES_SUMMARY_EXPENDITURE_VALUE = 1914, + STR_FINANCES_SUMMARY_FOOD_DRINK_SALES = 1905, + STR_FINANCES_SUMMARY_FOOD_DRINK_STOCK = 1906, + STR_FINANCES_SUMMARY_INCOME_VALUE = 1913, + STR_FINANCES_SUMMARY_LANDSCAPING = 1900, + STR_FINANCES_SUMMARY_LAND_PURCHASE = 1899, + STR_FINANCES_SUMMARY_LOAN = 1916, + STR_FINANCES_SUMMARY_LOAN_INTEREST = 1910, + STR_FINANCES_SUMMARY_LOAN_VALUE = 1917, + STR_FINANCES_SUMMARY_LOSS_VALUE = 1915, + STR_FINANCES_SUMMARY_MARKETING = 1908, + STR_FINANCES_SUMMARY_MONTH_HEADING = 1912, + STR_FINANCES_SUMMARY_PARK_ENTRANCE_TICKETS = 1901, + STR_FINANCES_SUMMARY_RESEARCH = 1909, + STR_FINANCES_SUMMARY_RIDE_CONSTRUCTION = 1897, + STR_FINANCES_SUMMARY_RIDE_RUNNING_COSTS = 1898, + STR_FINANCES_SUMMARY_RIDE_TICKETS = 1902, + STR_FINANCES_SUMMARY_SHOP_SALES = 1903, + STR_FINANCES_SUMMARY_SHOP_STOCK = 1904, + STR_FINANCES_SUMMARY_STAFF_WAGES = 1907, + STR_FINANCES_WEEKLY_PROFIT_LOSS = 2484, + STR_FINANCES_WEEKLY_PROFIT_POSITIVE = 2483, + STR_FINANCIAL_GRAPH = 1950, + STR_FINANCIAL_SUMMARY = 1949, + STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL = 2228, + STR_MARKETING = 1953, + STR_MARKETING_CAMPAIGNS_AVAILABLE = 2411, + STR_MARKETING_CAMPAIGNS_IN_OPERATION = 2409, + STR_MARKETING_CAMPAIGNS_NONE = 2410, + STR_MARKETING_PER_WEEK = 2413, + STR_PARK_VALUE_GRAPH = 1951, + STR_PARK_VALUE_LABEL = 2226, + STR_PROFIT_GRAPH = 1952, + STR_START_THIS_MARKETING_CAMPAIGN = 2412, + STR_X_WEEKS_REMAINING = 5483, + + // Window: Footpath + STR_BUILD_THIS = 1407, + STR_CONSTRUCT_BRIDGE_OR_TUNNEL_FOOTPATH_TIP = 1656, + STR_CONSTRUCT_FOOTPATH_ON_LAND_TIP = 1655, + STR_CONSTRUCT_THE_SELECTED_FOOTPATH_SECTION_TIP = 1189, + STR_DIRECTION = 1183, + STR_DIRECTION_TIP = 1185, + STR_FOOTPATHS = 1181, + STR_FOOTPATH_TIP = 1424, + STR_LEVEL_TIP = 1187, + STR_QUEUE_LINE_PATH_TIP = 1423, + STR_REMOVE_PREVIOUS_FOOTPATH_SECTION_TIP = 1190, + STR_SLOPE = 1184, + STR_SLOPE_DOWN_TIP = 1186, + STR_SLOPE_UP_TIP = 1188, + STR_TYPE = 1182, + + // Window: GameBottomToolbar + STR_BOTTOM_TOOLBAR_CASH = 1390, + STR_BOTTOM_TOOLBAR_CASH_NEGATIVE = 1391, + STR_BOTTOM_TOOLBAR_NEWS_TEXT = 5485, + STR_BOTTOM_TOOLBAR_NUM_GUESTS_DECREASE = 1847, + STR_BOTTOM_TOOLBAR_NUM_GUESTS_DECREASE_SINGULAR = 6194, + STR_BOTTOM_TOOLBAR_NUM_GUESTS_INCREASE = 1848, + STR_BOTTOM_TOOLBAR_NUM_GUESTS_INCREASE_SINGULAR = 6195, + STR_BOTTOM_TOOLBAR_NUM_GUESTS_STABLE = 1846, + STR_BOTTOM_TOOLBAR_NUM_GUESTS_STABLE_SINGULAR = 6193, + STR_CELSIUS_VALUE = 2216, + STR_FAHRENHEIT_VALUE = 2217, + STR_PARK_RATING_TIP = 2221, + STR_PROFIT_PER_WEEK_AND_PARK_VALUE_TIP = 2482, + STR_SHOW_SUBJECT_TIP = 1937, + STR_FOLLOW_SUBJECT_TIP = 6458, + + // Window: Guest + STR_CARRYING = 1810, + STR_FAVOURITE_RIDE = 3093, + STR_GUEST_EXPENSES_DRINK = 2301, + STR_GUEST_EXPENSES_DRINK_PLURAL = 2302, + STR_GUEST_EXPENSES_ENTRANCE_FEE = 2296, + STR_GUEST_EXPENSES_FOOD = 2299, + STR_GUEST_EXPENSES_FOOD_PLURAL = 2300, + STR_GUEST_EXPENSES_RIDE = 2297, + STR_GUEST_EXPENSES_RIDE_PLURAL = 2298, + STR_GUEST_EXPENSES_SOUVENIR = 2303, + STR_GUEST_EXPENSES_SOUVENIR_PLURAL = 2304, + STR_GUEST_ITEM_FORMAT = 1875, + STR_GUEST_LABEL_RIDES_BEEN_ON = 2292, + STR_GUEST_RECENT_THOUGHTS_LABEL = 1654, + STR_GUEST_RENAME_PROMPT = 1453, + STR_GUEST_RENAME_TITLE = 1452, + STR_GUEST_STAT_CASH_IN_POCKET = 1457, + STR_GUEST_STAT_CASH_SPENT = 1456, + STR_GUEST_STAT_ENERGY_LABEL = 1664, + STR_GUEST_STAT_HAPPINESS_LABEL = 1662, + STR_GUEST_STAT_HUNGER_LABEL = 1665, + STR_GUEST_STAT_NAUSEA_LABEL = 1663, + STR_GUEST_STAT_NAUSEA_TOLERANCE = 1661, + STR_GUEST_STAT_PREFERRED_INTESITY_ABOVE = 1660, + STR_GUEST_STAT_PREFERRED_INTESITY_BELOW = 1658, + STR_GUEST_STAT_PREFERRED_INTESITY_BETWEEN = 1659, + STR_GUEST_STAT_PREFERRED_RIDE = 1657, + STR_GUEST_STAT_THIRST_LABEL = 1666, + STR_GUEST_STAT_TIME_IN_PARK = 1458, + STR_GUEST_STAT_TOILET_LABEL = 1667, + STR_NAME_GUEST_TIP = 1055, + STR_NOTHING = 2293, + STR_PEEP_DEBUG_DEST = 6314, + STR_PEEP_DEBUG_NEXT = 6311, + STR_PEEP_DEBUG_NEXT_SLOPE = 6313, + STR_PEEP_DEBUG_NEXT_SURFACE = 6312, + STR_PEEP_DEBUG_PATHFIND_GOAL = 6315, + STR_PEEP_DEBUG_PATHFIND_HISTORY = 6316, + STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM = 6317, + STR_PEEP_DEBUG_POSITION = 6310, + STR_PEEP_DEBUG_SPRITE_INDEX = 6322, + STR_PEEP_FAVOURITE_RIDE_NOT_AVAILABLE = 3094, + STR_PEEP_INVENTORY_VOUCHER_FOOD_OR_DRINK_FREE = 2421, + STR_PEEP_INVENTORY_VOUCHER_PARK_ENTRY_FREE = 2418, + STR_PEEP_INVENTORY_VOUCHER_PARK_ENTRY_HALF_PRICE = 2420, + STR_PEEP_INVENTORY_VOUCHER_RIDE_FREE = 2419, + STR_PEEP_STAT_NAUSEA_TOLERANCE_AVERAGE = 2370, + STR_PEEP_STAT_NAUSEA_TOLERANCE_HIGH = 2371, + STR_PEEP_STAT_NAUSEA_TOLERANCE_LOW = 2369, + STR_PEEP_STAT_NAUSEA_TOLERANCE_NONE = 2368, + STR_SHOW_GUEST_FINANCE_TIP = 1942, + STR_SHOW_GUEST_ITEMS_TIP = 1944, + STR_SHOW_GUEST_NEEDS_TIP = 1940, + STR_SHOW_GUEST_THOUGHTS_TIP = 1943, + STR_SHOW_GUEST_VIEW_TIP = 1938, + STR_SHOW_GUEST_VISITED_RIDES_TIP = 1941, + STR_TOGGLE_GUEST_TRACKING_TIP = 1930, + + // Window: GuestList + STR_ACTIONS = 1814, + STR_ALL_GUESTS = 1818, + STR_ALL_GUESTS_SUMMARISED = 1819, + STR_ARG_4_PAGE_X = 6359, + STR_FORMAT_NUM_GUESTS_PLURAL = 1754, + STR_FORMAT_NUM_GUESTS_SINGULAR = 1755, + STR_GUESTS = 1463, + STR_GUESTS_COUNT_COMMA_SEP = 1817, + STR_GUESTS_ENTER_NAME_TO_SEARCH = 6173, + STR_GUESTS_FILTER = 1820, + STR_GUESTS_FILTER_BY_NAME = 6171, + STR_GUESTS_FILTER_BY_NAME_TIP = 6172, + STR_GUESTS_FILTER_THINKING = 1821, + STR_GUESTS_FILTER_THINKING_ABOUT = 1822, + STR_INDIVIDUAL_GUESTS_TIP = 1752, + STR_INFORMATION_TYPE_TIP = 1816, + STR_PAGE_X = 6358, + STR_SHOW_GUESTS_ON_MAP_TIP = 2803, + STR_SUMMARISED_GUESTS_TIP = 1753, + STR_THOUGHTS = 1815, + STR_TRACKED_GUESTS_ONLY_TIP = 5489, + + // Window: InstallTrack + STR_AN_EXISTING_TRACK_DESIGN_ALREADY_HAS_THIS_NAME = 3384, + STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE = 3134, + STR_INSTALL_NEW_TRACK_DESIGN_CANCEL = 3379, + STR_INSTALL_NEW_TRACK_DESIGN_INSTALL = 3378, + STR_SELECT_NEW_NAME_FOR_TRACK_DESIGN = 3383, + STR_TOGGLE_SCENERY_TIP = 1406, + STR_TRACK_DESIGN_INSTALL_WINDOW_TITLE = 2309, + STR_TRACK_DESIGN_NAME = 6142, + STR_TRACK_DESIGN_TYPE = 6143, + STR_UNABLE_TO_INSTALL_THIS_TRACK_DESIGN = 3380, + STR_UNABLE_TO_LOAD_FILE = 3010, + + // Window: Land + STR_DISABLE_ELEVATION = 5127, + STR_ENABLE_MOUNTAIN_TOOL_TIP = 5554, + STR_LAND = 2382, + STR_LAND_TOOL_SIZE_VALUE = 5486, + STR_LOWER_COST_AMOUNT = 985, + STR_RAISE_COST_AMOUNT = 984, + + // Window: LandRights + STR_ADJUST_LARGER_LAND_RIGHTS_TIP = 5134, + STR_ADJUST_SMALLER_LAND_RIGHTS_TIP = 5133, + STR_BUY_CONSTRUCTION_RIGHTS_TIP = 2326, + STR_BUY_LAND_RIGHTS_TIP = 2325, + STR_LAND_RIGHTS = 5136, + STR_NO_CONSTRUCTION_RIGHTS_FOR_SALE_TIP = 5989, + STR_NO_LAND_RIGHTS_FOR_SALE_TIP = 5988, + + // Window: LoadSave + STR_DATE = 5374, + STR_FILEBROWSER_ACTION_NEW_FILE = 2719, + STR_FILEBROWSER_ACTION_NEW_FOLDER = 5985, + STR_FILEBROWSER_ACTION_UP = 2718, + STR_FILEBROWSER_FILE_NAME_PROMPT = 2710, + STR_FILEBROWSER_FOLDER_NAME_PROMPT = 5986, + STR_FILEBROWSER_OVERWRITE_PROMPT = 2708, + STR_FILEBROWSER_OVERWRITE_TITLE = 2709, + STR_FILEBROWSER_USE_SYSTEM_WINDOW = 2707, + STR_FILE_DIALOG_TITLE_INSTALL_NEW_TRACK_DESIGN = 1039, + STR_FILE_DIALOG_TITLE_LOAD_GAME = 1036, + STR_FILE_DIALOG_TITLE_LOAD_HEIGHTMAP = 6042, + STR_FILE_DIALOG_TITLE_LOAD_LANDSCAPE = 1037, + STR_FILE_DIALOG_TITLE_SAVE_GAME = 1040, + STR_FILE_DIALOG_TITLE_SAVE_LANDSCAPE = 1042, + STR_FILE_DIALOG_TITLE_SAVE_TRACK = 5895, + STR_GAME_SAVE_FAILED = 1047, + STR_LANDSCAPE_SAVE_FAILED = 1049, + STR_LOADSAVE_DEFAULT = 5891, + STR_LOADSAVE_DEFAULT_TIP = 5892, + STR_NAME = 5373, + STR_OPENRCT2_HEIGHTMAP_FILE = 6055, + STR_OPENRCT2_LANDSCAPE_FILE = 1045, + STR_OPENRCT2_SAVED_GAME = 1043, + STR_OPENRCT2_SCENARIO_FILE = 1044, + STR_OPENRCT2_TRACK_DESIGN_FILE = 1046, + STR_RIGHTGUILLEMET = 6059, + STR_SCENARIO_SAVE_FAILED = 1048, + STR_TRACK_SAVE_FAILED = 5896, + STR_UNABLE_TO_CREATE_FOLDER = 5987, + + // Window: Main + + // Window: Map + STR_BUILD_PARK_ENTRANCE_TIP = 3226, + STR_CONSTRUCTION_RIGHTS_OWNED = 3218, + STR_CONSTRUCTION_RIGHTS_SALE = 3220, + STR_LAND_OWNED = 3217, + STR_LAND_SALE = 3219, + STR_MAP_CASH_MACHINE = 3372, + STR_MAP_DRINK_STALL = 3368, + STR_MAP_FIRST_AID = 3371, + STR_MAP_FOOD_STALL = 3367, + STR_MAP_GENERATOR_TIP = 5905, + STR_MAP_INFO_KIOSK = 3370, + STR_MAP_LABEL = 2802, + STR_MAP_RIDE = 3366, + STR_MAP_SIZE = 3211, + STR_MAP_SIZE_2 = 5130, + STR_MAP_SOUVENIR_STALL = 3369, + STR_MAP_TOILET = 3373, + STR_SELECT_PARK_OWNED_LAND_TIP = 3216, + STR_SET_CONSTRUCTION_RIGHTS_TO_BE_AVAILABLE_TIP = 3224, + STR_SET_CONSTRUCTION_RIGHTS_TO_BE_OWNED_TIP = 3222, + STR_SET_LAND_TO_BE_AVAILABLE_TIP = 3223, + STR_SET_LAND_TO_BE_OWNED_TIP = 3221, + STR_SET_STARTING_POSITIONS_TIP = 3228, + STR_SHOW_PEOPLE_ON_MAP_TIP = 3143, + STR_SHOW_RIDES_STALLS_ON_MAP_TIP = 3144, + + // Window: MapGen + STR_BASE_HEIGHT = 5183, + STR_BASE_HEIGHT_LABEL = 2691, + STR_ENTER_BASE_HEIGHT = 5184, + STR_ENTER_WATER_LEVEL = 5186, + STR_MAPGEN_ACTION_GENERATE = 2694, + STR_MAPGEN_NORMALIZE = 6046, + STR_MAPGEN_OPTION_PLACE_TREES = 2696, + STR_MAPGEN_OPTION_RANDOM_TERRAIN = 2695, + STR_MAPGEN_SELECT_HEIGHTMAP = 6043, + STR_MAPGEN_SIMPLEX_NOISE = 2685, + STR_MAPGEN_SIMPLEX_NOISE_BASE_FREQUENCY = 2688, + STR_MAPGEN_SIMPLEX_NOISE_HIGH = 2687, + STR_MAPGEN_SIMPLEX_NOISE_LOW_ = 2686, + STR_MAPGEN_SIMPLEX_NOISE_OCTAVES = 2689, + STR_MAPGEN_SMOOTH_HEIGHTMAP = 6044, + STR_MAPGEN_SMOOTH_STRENGTH = 6045, + STR_MAPGEN_SMOOTH_TILE = 6047, + STR_MAPGEN_WINDOW_TITLE = 2690, + STR_TERRAIN_LABEL = 2693, + STR_WATER_LEVEL = 5185, + STR_WATER_LEVEL_LABEL = 2692, + + // Window: MapTooltip + STR_MAP_TOOLTIP_STRINGID = 1162, + + // Window: MazeConstruction + STR_RIDE_CONSTRUCTION_BUILD = 1732, + STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP = 1761, + STR_RIDE_CONSTRUCTION_BUILD_MODE = 1758, + STR_RIDE_CONSTRUCTION_FILL_IN_MODE = 1760, + STR_RIDE_CONSTRUCTION_MODE = 1733, + STR_RIDE_CONSTRUCTION_MOVE_MODE = 1759, + + // Window: Multiplayer + STR_ADD_GROUP = 5643, + STR_ALLOW_KNOWN_KEYS_ONLY = 5862, + STR_ALLOW_KNOWN_KEYS_ONLY_TIP = 5863, + STR_DEFAULT_GROUP = 5641, + STR_ENTER_NEW_NAME_FOR_THIS_GROUP = 5711, + STR_GROUP = 5642, + STR_GROUPS_TIP = 5640, + STR_GROUP_NAME = 5710, + STR_LAST_ACTION = 5704, + STR_LOG_CHAT = 5865, + STR_LOG_CHAT_TIP = 5866, + STR_LOG_SERVER_ACTIONS = 6065, + STR_LOG_SERVER_ACTIONS_TIP = 6066, + STR_MULTIPLAYER_GROUPS_TITLE = 6237, + STR_MULTIPLAYER_INFORMATION_TITLE = 6235, + STR_MULTIPLAYER_OPTIONS_TITLE = 6238, + STR_MULTIPLAYER_PLAYERS_TITLE = 6236, + STR_MULTIPLAYER_PLAYER_COUNT = 5916, + STR_MULTIPLAYER_PLAYER_COUNT_PLURAL = 5917, + STR_PLAYER = 5496, + STR_PLAYERS_TIP = 5639, + STR_PROVIDER_EMAIL = 5868, + STR_PROVIDER_NAME = 5867, + STR_PROVIDER_WEBSITE = 5869, + STR_REMOVE_GROUP = 5644, + STR_RENAME_GROUP = 5709, + STR_SHOW_SERVER_INFO_TIP = 5870, + + // Window: NetworkStatus + STR_PASSWORD_REQUIRED = 5568, + STR_PASSWORD_REQUIRED_DESC = 5569, + + // Window: NewCampaign + STR_LENGTH_OF_TIME = 2417, + STR_MARKETING_1_WEEK = 2436, + STR_MARKETING_COST_PER_WEEK = 2443, + STR_MARKETING_ITEM = 2416, + STR_MARKETING_NOT_SELECTED = 2414, + STR_MARKETING_RIDE = 2415, + STR_MARKETING_START_THIS_MARKETING_CAMPAIGN = 2445, + STR_MARKETING_TOTAL_COST = 2444, + STR_X_WEEKS = 5475, + + // Window: NewRide + STR_1_DESIGN_AVAILABLE = 3339, + STR_AVAILABLE_VEHICLES = 6160, + STR_CUSTOM_DESIGNED_LAYOUT = 3338, + STR_GENTLE_RIDES_TIP = 1224, + STR_GROUP_BY_TRACK_TYPE = 6494, + STR_GROUP_BY_TRACK_TYPE_TIP = 6495, + STR_NEW_GENTLE_RIDES = 978, + STR_NEW_RIDE_COST = 1691, + STR_NEW_RIDE_COST_FROM = 1692, + STR_NEW_RIDE_NAME_AND_DESCRIPTION = 1690, + STR_NEW_RIDE_VEHICLE_NAME = 6496, + STR_NEW_ROLLER_COASTERS = 979, + STR_NEW_SHOPS_STALLS = 982, + STR_NEW_THRILL_RIDES = 980, + STR_NEW_TRANSPORT_RIDES = 977, + STR_NEW_WATER_RIDES = 981, + STR_ROLLER_COASTERS_TIP = 1225, + STR_SHOPS_STALLS_TIP = 1228, + STR_THRILL_RIDES_TIP = 1226, + STR_TRANSPORT_RIDES_TIP = 1223, + STR_WATER_RIDES_TIP = 1227, + STR_X_DESIGNS_AVAILABLE = 3340, + + // Window: News + STR_NEWS_DATE_FORMAT = 2235, + STR_RECENT_MESSAGES = 2234, + + // Window: NewsOptions + STR_NOTIFICATION_GUEST_BOUGHT_ITEM = 5604, + STR_NOTIFICATION_GUEST_DIED = 5606, + STR_NOTIFICATION_GUEST_LEFT_PARK = 5600, + STR_NOTIFICATION_GUEST_LEFT_RIDE = 5603, + STR_NOTIFICATION_GUEST_ON_RIDE = 5602, + STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE = 5601, + STR_NOTIFICATION_GUEST_USED_FACILITY = 5605, + STR_NOTIFICATION_GUEST_WARNINGS = 5598, + STR_NOTIFICATION_PARK_AWARD = 5590, + STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED = 5591, + STR_NOTIFICATION_PARK_RATING_WARNINGS = 5593, + STR_NOTIFICATION_PARK_WARNINGS = 5592, + STR_NOTIFICATION_RIDE_BROKEN_DOWN = 5594, + STR_NOTIFICATION_RIDE_CASUALTIES = 6365, + STR_NOTIFICATION_RIDE_CRASHED = 5595, + STR_NOTIFICATION_RIDE_RESEARCHED = 5597, + STR_NOTIFICATION_RIDE_VEHICLE_STALLED = 6366, + STR_NOTIFICATION_RIDE_WARNINGS = 5596, + STR_NOTIFICATION_SETTINGS = 5589, + + // Window: ObjectLoadError + STR_COPY_ALL = 6130, + STR_COPY_ALL_TIP = 6302, + STR_COPY_SELECTED = 6129, + STR_COPY_SELECTED_TIP = 6301, + STR_DOWNLOADING_OBJECTS = 6303, + STR_DOWNLOADING_OBJECTS_FROM = 6330, + STR_DOWNLOAD_ALL = 6299, + STR_DOWNLOAD_ALL_TIP = 6300, + STR_OBJECT_ERROR_WINDOW_EXPLANATION = 6128, + STR_OBJECT_ERROR_WINDOW_FILE = 6127, + STR_OBJECT_LOAD_ERROR_TITLE = 6123, + STR_OBJECT_NAME = 6124, + STR_OBJECT_SOURCE = 6131, + STR_OBJECT_TYPE = 6125, + + // Window: Options + STR_ALLOW_EARLY_COMPLETION = 6226, + STR_ALWAYS_NATIVE_LOADSAVE = 6264, + STR_ALWAYS_NATIVE_LOADSAVE_TIP = 6265, + STR_ARG_16_RESOLUTION_X_BY_Y = 840, + STR_AUDIO_DEVICE_TIP = 5834, + STR_AUDIO_FOCUS = 5490, + STR_AUDIO_FOCUS_TIP = 5835, + STR_AUTOSAVE_AMOUNT = 6278, + STR_AUTOSAVE_AMOUNT_TIP = 6279, + STR_AUTOSAVE_FREQUENCY_TIP = 5846, + STR_AUTO_OPEN_SHOPS = 5586, + STR_AUTO_OPEN_SHOPS_TIP = 5587, + STR_AUTO_STAFF_PLACEMENT = 5343, + STR_AUTO_STAFF_PLACEMENT_TIP = 5849, + STR_CELSIUS = 2366, + STR_CHAT_BUTTON_ON_TOOLBAR = 6282, + STR_CHAT_BUTTON_ON_TOOLBAR_TIP = 6281, + STR_CHEATS_BUTTON_ON_TOOLBAR = 5147, + STR_CHEATS_BUTTON_ON_TOOLBAR_TIP = 5840, + STR_CONTROLS_GROUP = 5478, + STR_CURRENCY = 2328, + STR_CURRENCY_TIP = 5829, + STR_CURRENT_THEME_TIP = 5827, + STR_CYCLE_DAY_NIGHT = 5473, + STR_CYCLE_DAY_NIGHT_TIP = 5822, + STR_DATE_FORMAT = 5161, + STR_DATE_FORMAT_TIP = 5833, + STR_DEFAULT_INSPECTION_INTERVAL = 5788, + STR_DEFAULT_INSPECTION_INTERVAL_TIP = 5851, + STR_DISABLE_LIGHTNING_EFFECT = 5789, + STR_DISABLE_LIGHTNING_EFFECT_TIP = 5824, + STR_DISABLE_SCREENSAVER = 6396, + STR_DISABLE_SCREENSAVER_TIP = 6397, + STR_DISPLAY_RESOLUTION = 2360, + STR_DISPLAY_RESOLUTION_TIP = 5856, + STR_DISTANCE_AND_SPEED = 2329, + STR_DISTANCE_AND_SPEED_TIP = 5828, + STR_DRAWING_ENGINE = 5875, + STR_DRAWING_ENGINE_TIP = 5876, + STR_EARLY_COMPLETION_TIP = 6227, + STR_EDIT_ASSET_PACKS_BUTTON = 6640, + STR_EDIT_THEMES_BUTTON = 5153, + STR_EDIT_THEMES_BUTTON_TIP = 5837, + STR_EFFECTS_GROUP = 6256, + STR_ENABLE_DEBUGGING_TOOLS = 5150, + STR_ENABLE_DEBUGGING_TOOLS_TIP = 5845, + STR_ENABLE_LIGHTING_EFFECTS = 6001, + STR_ENABLE_LIGHTING_EFFECTS_TIP = 6002, + STR_ENABLE_LIGHTING_VEHICLES = 6361, + STR_ENABLE_LIGHTING_VEHICLES_TIP = 6362, + STR_ENLARGED_UI = 6638, + STR_ENLARGED_UI_TIP = 6645, + STR_FAHRENHEIT = 2367, + STR_FINANCES_BUTTON_ON_TOOLBAR = 5120, + STR_FINANCES_BUTTON_ON_TOOLBAR_TIP = 5838, + STR_FULLSCREEN_MODE = 5177, + STR_FULLSCREEN_MODE_TIP = 5855, + STR_GRIDLINES = 2363, + STR_GRIDLINES_TIP = 2364, + STR_HARDWARE_GROUP = 5476, + STR_HEIGHT_IN_UNITS = 2358, + STR_HEIGHT_LABELS = 2331, + STR_HEIGHT_LABELS_UNITS_TIP = 5832, + STR_HOTKEY = 2489, + STR_HOTKEY_TIP = 2799, + STR_IMPERIAL = 2344, + STR_INVERT_RIGHT_MOUSE_DRAG = 5372, + STR_INVERT_RIGHT_MOUSE_DRAG_TIP = 5826, + STR_LANGUAGE_LOAD_FAILED = 5561, + STR_LANGUAGE_TIP = 5830, + STR_MASTER_VOLUME = 6262, + STR_MASTER_VOLUME_TIP = 6263, + STR_METRIC = 2345, + STR_MINIMISE_FULLSCREEN_ON_FOCUS_LOSS = 5440, + STR_MINIMISE_FULLSCREEN_ON_FOCUS_LOSS_TIP = 5820, + STR_MULTITHREADING = 6305, + STR_MULTITHREADING_TIP = 6306, + STR_MUTE_BUTTON_ON_TOOLBAR = 6058, + STR_MUTE_BUTTON_ON_TOOLBAR_TIP = 6057, + STR_OPENRCT2_DROPDOWN = 6586, + STR_OPTIONS_ADVANCED = 6167, + STR_OPTIONS_AUDIO_TIP = 5268, + STR_OPTIONS_AUTOSAVE_FREQUENCY_LABEL = 2700, + STR_OPTIONS_CONTROLS_AND_INTERFACE_TIP = 5269, + STR_OPTIONS_CULTURE_TIP = 5267, + STR_OPTIONS_DISPLAY_FULLSCREEN = 2774, + STR_OPTIONS_DISPLAY_FULLSCREEN_BORDERLESS = 2775, + STR_OPTIONS_DISPLAY_TIP = 5266, + STR_OPTIONS_DISPLAY_WINDOWED = 2773, + STR_OPTIONS_LANGUAGE = 2776, + STR_OPTIONS_MISCELLANEOUS_TIP = 5270, + STR_OPTIONS_MUSIC_LABEL = 2738, + STR_OPTIONS_MUSIC_VALUE_NONE = 2739, + STR_OPTIONS_MUSIC_VALUE_RANDOM = 5126, + STR_OPTIONS_RENDERING_TIP = 5734, + STR_OPTIONS_SCENARIO_DIFFICULTY = 5629, + STR_OPTIONS_SCENARIO_GROUPING = 5627, + STR_OPTIONS_SCENARIO_ORIGIN = 5628, + STR_OPTIONS_SCENARIO_SELECTION = 6169, + STR_OPTIONS_SCENARIO_UNLOCKING = 5630, + STR_OPTIONS_TITLE = 1168, + STR_OPTIONS_TITLE_SEQUENCE = 6168, + STR_OPTIONS_TOOLBAR_BUTTONS_CENTRED = 6629, + STR_OPTIONS_TOOLBAR_BUTTONS_CENTRED_TIP = 6630, + STR_OPTIONS_TWEAKS = 6170, + STR_OPTION_DISABLED_DURING_NETWORK_PLAY = 6103, + STR_PATH_TO_RCT1 = 6033, + STR_PATH_TO_RCT1_BROWSER = 6035, + STR_PATH_TO_RCT1_CLEAR_TIP = 6036, + STR_PATH_TO_RCT1_DOES_NOT_CONTAIN_CSG1I_DAT = 6371, + STR_PATH_TO_RCT1_IS_WRONG_VERSION = 6372, + STR_PATH_TO_RCT1_TIP = 6038, + STR_PATH_TO_RCT1_WRONG_ERROR = 6037, + STR_REAL_NAME = 2487, + STR_REAL_NAME_TIP = 2488, + STR_REAL_VALUES = 2359, + STR_RENDERING_GROUP = 5477, + STR_RENDER_WEATHER_EFFECTS = 5920, + STR_RENDER_WEATHER_EFFECTS_TIP = 5921, + STR_RESEARCH_BUTTON_ON_TOOLBAR = 5121, + STR_RESEARCH_BUTTON_ON_TOOLBAR_TIP = 5839, + STR_RESOLUTION_X_BY_Y = 839, + STR_RESTART_REQUIRED = 5558, + STR_RIDE_MUSIC = 1777, + STR_RIDE_MUSIC_TIP = 5854, + STR_ROLLERCOASTER_TYCOON_1_DROPDOWN = 2740, + STR_SAVE_EVERY_15MINUTES = 2703, + STR_SAVE_EVERY_30MINUTES = 2704, + STR_SAVE_EVERY_5MINUTES = 2702, + STR_SAVE_EVERY_HOUR = 2705, + STR_SAVE_EVERY_MINUTE = 2701, + STR_SAVE_NEVER = 2706, + STR_SAVE_PLUGIN_DATA = 3333, + STR_SAVE_PLUGIN_DATA_TIP = 3334, + STR_SCENARIO_GROUPING_TIP = 5842, + STR_SCENARIO_OPTIONS = 6228, + STR_SCENARIO_UNLOCKING_TIP = 5843, + STR_SCREEN_EDGE_SCROLLING = 2797, + STR_SCREEN_EDGE_SCROLLING_TIP = 2798, + STR_SHOW_FPS = 5581, + STR_SHOW_FPS_TIP = 5815, + STR_SHOW_GUEST_PURCHASES = 6060, + STR_SHOW_GUEST_PURCHASES_TIP = 6061, + STR_SHOW_RECENT_MESSAGES_ON_TOOLBAR = 5468, + STR_SHOW_RECENT_MESSAGES_ON_TOOLBAR_TIP = 5841, + STR_SHOW_TOOLBAR_BUTTONS_FOR = 5480, + STR_SI = 5584, + STR_SOUND_EFFECTS = 2333, + STR_SOUND_EFFECTS_TIP = 5853, + STR_SOUND_NONE = 1169, + STR_STAY_CONNECTED_AFTER_DESYNC = 5557, + STR_STAY_CONNECTED_AFTER_DESYNC_TIP = 5844, + STR_STEAM_OVERLAY_PAUSE = 5553, + STR_STEAM_OVERLAY_PAUSE_TIP = 5819, + STR_TEMPERATURE = 2330, + STR_TEMPERATURE_FORMAT_TIP = 5831, + STR_THEMES_GROUP = 5481, + STR_THEMES_LABEL_CURRENT_THEME = 5238, + STR_TILE_SMOOTHING = 2361, + STR_TILE_SMOOTHING_TIP = 2362, + STR_TITLE_MUSIC_TIP = 5836, + STR_TITLE_SEQUENCE_RANDOM = 5310, + STR_TITLE_SEQUENCE_TIP = 5847, + STR_TOOLBAR_BUTTONS_GROUP = 5479, + STR_TOUCH_ENHANCEMENTS = 6644, + STR_TOUCH_ENHANCEMENTS_TIP = 6639, + STR_TRANSPARENT_SCREENSHOT = 6327, + STR_TRANSPARENT_SCREENSHOT_TIP = 6328, + STR_TRAP_MOUSE = 5582, + STR_TRAP_MOUSE_TIP = 5825, + STR_UI_SCALING_DESC = 5579, + STR_UNCAP_FPS = 5454, + STR_UNCAP_FPS_TIP = 5859, + STR_UPPERCASE_BANNERS = 5474, + STR_UPPERCASE_BANNERS_TIP = 5823, + STR_USE_VSYNC = 6165, + STR_USE_VSYNC_TIP = 6166, + STR_VIRTUAL_FLOOR_STYLE = 6202, + STR_VIRTUAL_FLOOR_STYLE_DISABLED = 6259, + STR_VIRTUAL_FLOOR_STYLE_GLASSY = 6257, + STR_VIRTUAL_FLOOR_STYLE_TIP = 6203, + STR_VIRTUAL_FLOOR_STYLE_TRANSPARENT = 6258, + STR_WINDOW_BUTTONS_ON_THE_LEFT = 6589, + STR_WINDOW_BUTTONS_ON_THE_LEFT_TIP = 6590, + STR_WINDOW_SCALE_TIP = 5816, + STR_ZOOM_BUTTON_ON_TOOLBAR = 6410, + STR_ZOOM_BUTTON_ON_TOOLBAR_TIP = 6411, + STR_ZOOM_TO_CURSOR = 5906, + STR_ZOOM_TO_CURSOR_TIP = 5907, + + // Window: Park + STR_ADMISSION_PRICE = 1756, + STR_ADMISSION_PRICE_PAY_PER_RIDE_TIP = 6014, + STR_AWARD_MOST_UNTIDY = 2814, + STR_AWARD_BEST_CUSTOM_DESIGNED_RIDES = STR_AWARD_MOST_UNTIDY + 13, + STR_AWARD_BEST_FOOD = STR_AWARD_MOST_UNTIDY + 8, + STR_AWARD_BEST_GENTLE_RIDES = STR_AWARD_MOST_UNTIDY + 16, + STR_AWARD_BEST_ROLLERCOASTERS = STR_AWARD_MOST_UNTIDY + 2, + STR_AWARD_BEST_STAFF = STR_AWARD_MOST_UNTIDY + 7, + STR_AWARD_BEST_TOILETS = STR_AWARD_MOST_UNTIDY + 10, + STR_AWARD_BEST_VALUE = STR_AWARD_MOST_UNTIDY + 3, + STR_AWARD_BEST_WATER_RIDES = STR_AWARD_MOST_UNTIDY + 12, + STR_AWARD_MOST_BEAUTIFUL = STR_AWARD_MOST_UNTIDY + 4, + STR_AWARD_MOST_CONFUSING_LAYOUT = STR_AWARD_MOST_UNTIDY + 15, + STR_AWARD_MOST_DAZZLING_RIDE_COLOURS = STR_AWARD_MOST_UNTIDY + 14, + STR_AWARD_MOST_DISAPPOINTING = STR_AWARD_MOST_UNTIDY + 11, + STR_AWARD_MOST_TIDY = STR_AWARD_MOST_UNTIDY + 1, + STR_AWARD_SAFEST = STR_AWARD_MOST_UNTIDY + 6, + STR_AWARD_WORST_FOOD = STR_AWARD_MOST_UNTIDY + 9, + STR_AWARD_WORST_VALUE = STR_AWARD_MOST_UNTIDY + 5, + STR_BUY_LAND_AND_CONSTRUCTION_RIGHTS_TIP = 5135, + STR_CLOSE_PARK = 1013, + STR_CLOSE_PARK_TIP = 5296, + STR_ENTER_NAME = 2791, + STR_ENTER_NAME_INTO_SCENARIO_CHART = 2790, + STR_GRAPH_AXIS_LABEL = 6360, + STR_GUESTS_IN_PARK_LABEL = 2223, + STR_INCOME_FROM_ADMISSIONS = 2801, + STR_NAME_PARK_TIP = 1720, + STR_NO_RECENT_AWARDS = 2848, + STR_NUMBER_OF_RIDES_LABEL = 2321, + STR_OBJECTIVE_ACHIEVED = 2788, + STR_OBJECTIVE_FAILED = 2789, + STR_OBJECTIVE_LABEL = 2384, + STR_OPEN_OR_CLOSE_PARK_TIP = 1010, + STR_OPEN_PARK = 1014, + STR_OPEN_PARK_TIP = 5297, + STR_PARK_AWARDS_TAB_TIP = 2468, + STR_PARK_CLOSED = 1721, + STR_PARK_ENTRANCE_TAB_TIP = 2462, + STR_PARK_GUESTS_TAB_TIP = 2464, + STR_PARK_NAME = 1718, + STR_PARK_OBJECTIVE_TAB_TIP = 2467, + STR_PARK_OPEN = 1722, + STR_PARK_PRICE_TAB_TIP = 2465, + STR_PARK_RATING_LABEL = 2220, + STR_PARK_RATING_TAB_TIP = 2463, + STR_PARK_SIZE_IMPERIAL_LABEL = 2324, + STR_PARK_SIZE_METRIC_LABEL = 2323, + STR_PARK_STATS_TAB_TIP = 2466, + STR_PLEASE_ENTER_YOUR_NAME_FOR_THE_SCENARIO_CHART = 2792, + STR_STAFF_LABEL = 2322, + STR_TOTAL_ADMISSIONS = 2800, + + // Window: PatrolArea + STR_ADJUST_LARGER_PATROL_AREA_TIP = 6470, + STR_ADJUST_SMALLER_PATROL_AREA_TIP = 6469, + + // Window: Player + STR_ACTION_NA = 5662, + STR_COMMANDS_RAN = 5636, + STR_KICK_PLAYER_TIP = 5556, + STR_LAST_ACTION_RAN = 5701, + STR_LOCATE_PLAYER_TIP = 5702, + STR_MONEY_SPENT = 5635, + STR_PING = 5497, + + // Window: RefurbishRidePrompt + STR_REFURBISH = 6246, + STR_REFURBISH_RIDE = 6247, + STR_REFURBISH_RIDE_ID_MONEY = 6248, + STR_REFURBISH_RIDE_ID_NO_MONEY = 6249, + + // Window: Research + STR_CURRENTLY_IN_DEVELOPMENT = 2267, + STR_LAST_DEVELOPMENT = 2268, + STR_RESEARCH_AND_DEVELOPMENT = 983, + STR_RESEARCH_AND_DEVELOPMENT_TIP = 2276, + STR_RESEARCH_COMPLETED_AL = 2680, + STR_RESEARCH_COST_PER_MONTH = 2265, + STR_RESEARCH_EXPECTED_FORMAT = 2289, + STR_RESEARCH_EXPECTED_LABEL = 2271, + STR_RESEARCH_FUNDING = 1954, + STR_RESEARCH_FUNDING_ = 2264, + STR_RESEARCH_NEW_GENTLE_RIDES_TIP = 2471, + STR_RESEARCH_NEW_ROLLER_COASTERS_TIP = 2472, + STR_RESEARCH_NEW_SCENERY_AND_THEMING_TIP = 2476, + STR_RESEARCH_NEW_SHOPS_AND_STALLS_TIP = 2475, + STR_RESEARCH_NEW_THRILL_RIDES_TIP = 2473, + STR_RESEARCH_NEW_TRANSPORT_RIDES_TIP = 2470, + STR_RESEARCH_NEW_WATER_RIDES_TIP = 2474, + STR_RESEARCH_PRIORITIES = 2266, + STR_RESEARCH_PROGRESS_LABEL = 2270, + STR_RESEARCH_RIDE_LABEL = 2272, + STR_RESEARCH_SCENERY_LABEL = 2273, + STR_RESEARCH_SHOW_DETAILS_TIP = 2274, + STR_RESEARCH_STAGE_COMPLETING_DESIGN = 2287, + STR_RESEARCH_STAGE_DESIGNING = 2286, + STR_RESEARCH_STAGE_INITIAL_RESEARCH = 2285, + STR_RESEARCH_STAGE_UNKNOWN = 2288, + STR_RESEARCH_TYPE_LABEL = 2269, + STR_RESEARCH_TYPE_LABEL_VEHICLE = 6377, + STR_RESEARCH_UNKNOWN = 2277, + STR_RESEARCH_VEHICLE_LABEL = 6376, + STR_SELECT_LEVEL_OF_RESEARCH_AND_DEVELOPMENT = 2469, + + // Window: Ride + STR_1_CAR_PER_TRAIN = 1022, + STR_ALL_VEHICLES_IN_SAME_COLOURS = 1129, + STR_ALTERNATIVE_COLOUR_SCHEME_1 = 2972, + STR_ALTERNATIVE_COLOUR_SCHEME_2 = 2973, + STR_ALTERNATIVE_COLOUR_SCHEME_3 = 2974, + STR_ANY_LOAD = 1152, + STR_ARG_10_STRINGID = 870, + STR_ARG_14_STRINGID = 872, + STR_ARG_16_STRINGID = 873, + STR_ARG_18_STRINGID = 874, + STR_ARG_20_STRINGID = 875, + STR_ARG_6_CURRENCY2DP = 1429, + STR_ARG_6_STRINGID = 868, + STR_ARRIVING_AT = 1103, + STR_AVERAGE_SPEED = 1347, + STR_BLOCK_SECTIONS = 3110, + STR_BUILT_LAST_YEAR = 1854, + STR_BUILT_THIS_YEAR = 1853, + STR_BUILT_YEARS_AGO = 1855, + STR_CALLING_MECHANIC = 3117, + STR_CAPACITY = 3142, + STR_CLICK_ITEMS_OF_SCENERY_TO_SELECT = 3132, + STR_CLOSE_RIDE = 3107, + STR_CLOSE_RIDE_TIP = 5293, + STR_COLOUR_SCHEME_OPTIONS_TIP = 1396, + STR_COLOUR_SCHEME_TO_CHANGE_TIP = 2975, + STR_CONSTRUCTION = 990, + STR_CRASHED_0 = 1107, + STR_CRASHING = 1106, + STR_CURRENT_BREAKDOWN = 1809, + STR_CUSTOMERS_ON_RIDE = 5739, + STR_CUSTOMERS_PER_HOUR = 1427, + STR_CUSTOMER_INFORMATION_TIP = 1696, + STR_DEBUG_CANT_FORCE_BREAKDOWN = 5291, + STR_DEBUG_FIX_RIDE = 5290, + STR_DEBUG_FORCE_BREAKDOWN_TIP = 5292, + STR_DEBUG_NO_BREAKDOWNS_AVAILABLE = 5289, + STR_DEBUG_RIDE_ALREADY_BROKEN = 5287, + STR_DEBUG_RIDE_IS_CLOSED = 5288, + STR_DEMOLISH_RIDE_TIP = 992, + STR_DEPARTING = 1101, + STR_DESIGN_CANCEL = 3131, + STR_DESIGN_SAVE = 3130, + STR_DIFFERENT_COLOURS_PER = 1130, + STR_DIFFERENT_COLOURS_PER_VEHICLE = 1131, + STR_DOING_CIRCUS_SHOW = 1117, + STR_DOWN_TIME_LABEL_1889 = 1889, + STR_DROPDOWN_MENU_LABEL_SELECTED = 1143, + STR_DROPS = 1355, + STR_ENTER_NEW_NAME_FOR_THIS_RIDE_ATTRACTION = 1058, + STR_ENTER_VALUE = 6502, + STR_EXCITEMENT_FACTOR = 3125, + STR_EXCITEMENT_FACTOR_NEGATIVE = 6533, + STR_EXCITEMENT_RATING = 1473, + STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE = 1474, + STR_EXIT_ONLY = 1220, + STR_FAVOURITE_RIDE_OF_GUEST = 3122, + STR_FAVOURITE_RIDE_OF_GUESTS = 3123, + STR_FORMAT_SECONDS = 1217, + STR_FULL_LOAD = 1151, + STR_GRAPHS_TIP = 1399, + STR_HALF_LOAD = 1149, + STR_HIGHEST_DROP_HEIGHT = 1354, + STR_HOLES = 1357, + STR_INCOME_AND_COSTS_TIP = 1695, + STR_INCOME_PER_HOUR = 1873, + STR_INSPECTION = 1878, + STR_INTENSITY_FACTOR = 3126, + STR_INTENSITY_FACTOR_NEGATIVE = 6534, + STR_INTENSITY_RATING = 1475, + STR_INTENSITY_RATING_NOT_YET_AVAILABLE = 1476, + STR_INTENSITY_RATING_RED = 1477, + STR_INVERSIONS = 1356, + STR_ITEMS_SOLD = 1894, + STR_LAST_BREAKDOWN = 1808, + STR_LAUNCH_SPEED = 1329, + STR_LAUNCH_SPEED_TIP = 1330, + STR_LEAVE_IF_ANOTHER_BOAT_ARRIVES = 1208, + STR_LEAVE_IF_ANOTHER_TRAIN_ARRIVES = 1207, + STR_LEAVE_IF_ANOTHER_VEHICLE_ARRIVES_TIP = 1210, + STR_LIFT_HILL_CHAIN_SPEED = 3095, + STR_LIFT_HILL_CHAIN_SPEED_VALUE = 3096, + STR_LOCATE_NEAREST_AVAILABLE_MECHANIC_TIP = 3120, + STR_LOGGING_DATA_FROM_TIP = 1422, + STR_LOSS_PER_ITEM_SOLD = 1857, + STR_MAINTENANCE_OPTIONS_TIP = 1395, + STR_MAIN_COLOUR_SCHEME = 2971, + STR_MAXIMUM_LENGTH_BEFORE_DEPARTING_TIP = 1214, + STR_MAXIMUM_WAITING_TIME = 1212, + STR_MAX_CARS_PER_TRAIN_TIP = 5923, + STR_MAX_LATERAL_G = 1352, + STR_MAX_LATERAL_G_RED = 1353, + STR_MAX_NEGATIVE_VERTICAL_G = 1350, + STR_MAX_NEGATIVE_VERTICAL_G_RED = 1351, + STR_MAX_PEOPLE_ON_RIDE = 1742, + STR_MAX_PEOPLE_ON_RIDE_TIP = 1743, + STR_MAX_PEOPLE_ON_RIDE_VALUE = 1744, + STR_MAX_POSITIVE_VERTICAL_G = 1348, + STR_MAX_SPEED = 1340, + STR_MAX_VEHICLES_TIP = 5922, + STR_MEASUREMENTS_AND_TEST_DATA_TIP = 1398, + STR_MEHCANIC_IS_FIXING_THE_RIDE = 3119, + STR_MEHCANIC_IS_HEADING_FOR_THE_RIDE = 3118, + STR_MINIMUM_LENGTH_BEFORE_DEPARTING_TIP = 1213, + STR_MINIMUM_WAITING_TIME = 1211, + STR_MOVING_TO_END_OF = 1098, + STR_NAME_RIDE_TIP = 1054, + STR_NAUSEA_FACTOR = 3127, + STR_NAUSEA_FACTOR_NEGATIVE = 6535, + STR_NAUSEA_RATING = 1478, + STR_NAUSEA_RATING_NOT_YET_AVAILABLE = 1479, + STR_NO_ENTRANCE = 1221, + STR_NO_EXIT = 1222, + STR_NO_MECHANICS_ARE_HIRED_MESSAGE = 6041, + STR_NO_TEST_RESULTS_YET = 1339, + STR_NUMBER_OF_CIRCUITS = 1955, + STR_NUMBER_OF_CIRCUITS_TIP = 1956, + STR_NUMBER_OF_CIRCUITS_VALUE = 1957, + STR_NUMBER_OF_LAPS = 1734, + STR_NUMBER_OF_LAPS_TIP = 1735, + STR_NUMBER_OF_LAPS_VALUE = 1736, + STR_NUMBER_OF_ROTATIONS = 1869, + STR_NUMBER_OF_ROTATIONS_TIP = 1870, + STR_NUMBER_OF_ROTATIONS_VALUE = 1871, + STR_NUMBER_OF_SWINGS = 1769, + STR_NUMBER_OF_SWINGS_TIP = 1770, + STR_OPEN_CLOSE_OR_TEST_RIDE = 1008, + STR_OPEN_RIDE = 3109, + STR_OPEN_RIDE_TIP = 5295, + STR_OPERATING = 1125, + STR_OPERATING_0 = 1112, + STR_OPERATING_1 = 1115, + STR_OPERATING_2 = 1116, + STR_OPERATING_3 = 1118, + STR_OPERATING_OPTIONS_TIP = 1394, + STR_OPTION_REVERSE_TRAINS = 6583, + STR_OPTION_REVERSE_TRAINS_TIP = 6584, + STR_OVERALL_VIEW = 996, + STR_PAINT_INDIVIDUAL_AREA_TIP = 2976, + STR_PLAY_MUSIC = 1849, + STR_POPULARITY_PERCENT = 1678, + STR_POPULARITY_UNKNOWN = 1677, + STR_PROFIT_PER_HOUR = 1874, + STR_PROFIT_PER_ITEM_SOLD = 1856, + STR_QUARTER_LOAD = 1148, + STR_QUEUE_TIME_MINUTE = 1359, + STR_QUEUE_TIME_MINUTES = 1360, + STR_RANDOM_COLOUR = 6501, + STR_RATING_EXTREME = 2376, + STR_RATING_HIGH = 2374, + STR_RATING_LOW = 2372, + STR_RATING_MEDIUM = 2373, + STR_RATING_ULTRA_EXTREME = 2377, + STR_RATING_VERY_HIGH = 2375, + STR_REFURBISH_RIDE_TIP = 6243, + STR_RELIABILITY_LABEL_1757 = 1757, + STR_RESET_SELECTION = 3138, + STR_RIDE_ATTRACTION_NAME = 1057, + STR_RIDE_BREAKDOWN_BRAKES_FAILURE = 1806, + STR_RIDE_BREAKDOWN_CONTROL_FAILURE = 1807, + STR_RIDE_BREAKDOWN_DOORS_STUCK_CLOSED = 1803, + STR_RIDE_BREAKDOWN_DOORS_STUCK_OPEN = 1804, + STR_RIDE_BREAKDOWN_RESTRAINTS_STUCK_CLOSED = 1801, + STR_RIDE_BREAKDOWN_RESTRAINTS_STUCK_OPEN = 1802, + STR_RIDE_BREAKDOWN_SAFETY_CUT_OUT = 1800, + STR_RIDE_BREAKDOWN_VEHICLE_MALFUNCTION = 1805, + STR_RIDE_COLOUR_TRAIN_OPTION = 1135, + STR_RIDE_COLOUR_TRAIN_VALUE = 1134, + STR_RIDE_COLOUR_VEHICLE_OPTION = 1133, + STR_RIDE_COLOUR_VEHICLE_VALUE = 1132, + STR_RIDE_DESIGN_MAZE_BRICK_WALLS = 3058, + STR_RIDE_DESIGN_MAZE_HEDGES = 3059, + STR_RIDE_DESIGN_MAZE_ICE_BLOCKS = 3060, + STR_RIDE_DESIGN_MAZE_WOODEN_FENCES = 3061, + STR_RIDE_INCOME_ADMISSION_PAY_FOR_ENTRY_TIP = 6013, + STR_RIDE_INCOME_ADMISSION_PRICE = 1428, + STR_RIDE_LENGTH = 1344, + STR_RIDE_LENGTH_ENTRY = 1345, + STR_RIDE_LENGTH_ENTRY_WITH_SEPARATOR = 1346, + STR_RIDE_MODE_NUMBER_OF_SWINGS_VALUE = 1771, + STR_RIDE_MODE_SPEED_VALUE = 1331, + STR_RIDE_MODE_TIME_LIMIT_VALUE = 1749, + STR_RIDE_NAME_1D = 31, + STR_RIDE_NAME_1F = 33, + STR_RIDE_NAME_22 = 36, + STR_RIDE_NAME_50 = 82, + STR_RIDE_NAME_52 = 84, + STR_RIDE_NAME_53 = 85, + STR_RIDE_NAME_54 = 86, + STR_RIDE_NAME_55 = 87, + STR_RIDE_NAME_59 = 91, + STR_RIDE_SECONDARY_PRICE_VALUE = 1799, + STR_RIDE_STATS_ALTITUDE = 1416, + STR_RIDE_STATS_ALTITUDE_FORMAT = 1420, + STR_RIDE_STATS_G_FORCE_FORMAT = 1421, + STR_RIDE_STATS_LAT_G = 1418, + STR_RIDE_STATS_TIME = 1414, + STR_RIDE_STATS_VELOCITY = 1415, + STR_RIDE_STATS_VELOCITY_FORMAT = 1419, + STR_RIDE_STATS_VERT_G = 1417, + STR_RIDE_TIME = 1341, + STR_RIDE_TIME_ENTRY = 1342, + STR_RIDE_TIME_ENTRY_WITH_SEPARATOR = 1343, + STR_RIDE_VEHICLE_COUNT = 1021, + STR_RIDE_WINDOW_TITLE = 989, + STR_ROTATING_0 = 1110, + STR_ROTATING_1 = 1111, + STR_ROTATING_2 = 1114, + STR_RUNNING_COST_PER_HOUR = 1851, + STR_RUNNING_COST_UNKNOWN = 1852, + STR_SAME_PRICE_THROUGHOUT_PARK = 3071, + STR_SAME_PRICE_THROUGHOUT_PARK_TIP = 3072, + STR_SATISFACTION_PERCENT = 1669, + STR_SATISFACTION_UNKNOWN = 1668, + STR_SAVE_TRACK_DESIGN = 3115, + STR_SAVE_TRACK_DESIGN_ITEM = 3128, + STR_SAVE_TRACK_DESIGN_NOT_POSSIBLE = 3116, + STR_SAVE_TRACK_DESIGN_WITH_SCENERY_ITEM = 3129, + STR_SELECT_ADDITIONAL_COLOUR_1_TIP = 1137, + STR_SELECT_ADDITIONAL_COLOUR_2_TIP = 1138, + STR_SELECT_HOW_OFTEN_A_MECHANIC_SHOULD_CHECK_THIS_RIDE = 1890, + STR_SELECT_MAIN_COLOUR_TIP = 1136, + STR_SELECT_MUSIC_STYLE_TIP = 3045, + STR_SELECT_MUSIC_TIP = 1850, + STR_SELECT_NEARBY_SCENERY = 3137, + STR_SELECT_OPERATING_MODE = 2477, + STR_SELECT_STYLE_OF_ENTRANCE_EXIT_STATION_TIP = 3090, + STR_SELECT_SUPPORT_STRUCTURE_COLOUR_TIP = 1139, + STR_SELECT_VEHICLE_COLOUR_SCHEME_TIP = 1140, + STR_SELECT_VEHICLE_TO_MODIFY_TIP = 1141, + STR_SHOWING_FILM = 1113, + STR_SHOW_GRAPH_OF_ALTITUDE_AGAINST_TIME_TIP = 2479, + STR_SHOW_GRAPH_OF_LATERAL_ACCELERATION_AGAINST_TIME_TIP = 2481, + STR_SHOW_GRAPH_OF_VELOCITY_AGAINST_TIME_TIP = 2478, + STR_SHOW_GRAPH_OF_VERTICAL_ACCELERATION_AGAINST_TIME_TIP = 2480, + STR_SHOW_GUESTS_ON_THIS_RIDE_ATTRACTION_TIP = 1824, + STR_SHOW_GUESTS_QUEUING_FOR_THIS_RIDE_ATTRACTION_TIP = 1825, + STR_SHOW_GUESTS_THOUGHTS_ABOUT_THIS_RIDE_ATTRACTION_TIP = 1823, + STR_SIMULATE_RIDE = 6324, + STR_SIMULATE_RIDE_TIP = 6325, + STR_SOUND_AND_MUSIC_OPTIONS_TIP = 1397, + STR_SPEED = 1471, + STR_SPEED_TIP = 1472, + STR_STARTING = 1124, + STR_STATION_STYLE = 6275, + STR_STOPPED_BY_BLOCK_BRAKES = 1128, + STR_STOPPING_0 = 1121, + STR_STOPPING_1 = 1126, + STR_SWINGING = 1109, + STR_SYNCHRONISE_WITH_ADJACENT_STATIONS = 1215, + STR_SYNCHRONISE_WITH_ADJACENT_STATIONS_TIP = 1216, + STR_TEST_RIDE = 3108, + STR_TEST_RIDE_TIP = 5294, + STR_THREE_QUARTER_LOAD = 1150, + STR_TIME_LIMIT = 1747, + STR_TIME_LIMIT_TIP = 1748, + STR_TIME_SINCE_LAST_INSPECTION_MINUTE = 5482, + STR_TIME_SINCE_LAST_INSPECTION_MINUTES = 1887, + STR_TIME_SINCE_LAST_INSPECTION_MORE_THAN_4_HOURS = 1888, + STR_TOTAL_AIR_TIME = 1358, + STR_TOTAL_CUSTOMERS = 1670, + STR_TOTAL_PROFIT = 1671, + STR_TRAVELLING_AT_0 = 1102, + STR_TRAVELLING_AT_1 = 1105, + STR_TRAVELLING_AT_2 = 1108, + STR_TRAVELLING_AT_3 = 1120, + STR_UNABLE_TO_LOCATE_MECHANIC = 3121, + STR_UNLOADING_PASSENGERS = 1127, + STR_UNLOADING_PASSENGERS_AT = 1104, + STR_VEHICLE_DETAILS_AND_OPTIONS_TIP = 1393, + STR_VIEW_OF_RIDE_ATTRACTION_TIP = 1392, + STR_VIEW_SELECTION = 997, + STR_WAITING_FOR_CABLE_LIFT = 1119, + STR_WAITING_FOR_PASSENGERS = 1122, + STR_WAITING_FOR_PASSENGERS_AT = 1099, + STR_WAITING_TO_DEPART = 1100, + STR_WAITING_TO_START = 1123, + STR_WAIT_FOR = 1206, + STR_WAIT_FOR_PASSENGERS_BEFORE_DEPARTING_TIP = 1209, + STR_X_CARS_PER_TRAIN = 1023, + + // Window: RideConstruction + STR_LOG_BUMPS = 1764, + STR_RIDE_CONSTRUCTION_BOOSTER_SPEED = 5996, + STR_RIDE_CONSTRUCTION_BOOSTER_SPEED_LIMIT_TIP = 6145, + STR_RIDE_CONSTRUCTION_BRAKE_SPEED = 1674, + STR_RIDE_CONSTRUCTION_BRAKE_SPEED_LIMIT_TIP = 1676, + STR_RIDE_CONSTRUCTION_BRAKE_SPEED_VELOCITY = 1675, + STR_RIDE_CONSTRUCTION_CHAIN_LIFT_TIP = 928, + STR_RIDE_CONSTRUCTION_CONSTRUCT_SELECTED_SECTION_TIP = 915, + STR_RIDE_CONSTRUCTION_DIRECTION = 897, + STR_RIDE_CONSTRUCTION_ENTRANCE = 1400, + STR_RIDE_CONSTRUCTION_ENTRANCE_TIP = 1402, + STR_RIDE_CONSTRUCTION_EXIT = 1401, + STR_RIDE_CONSTRUCTION_EXIT_TIP = 1403, + STR_RIDE_CONSTRUCTION_HELIX_DOWN_TIP = 924, + STR_RIDE_CONSTRUCTION_HELIX_UP_TIP = 925, + STR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE_TIP = 904, + STR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL_TIP = 900, + STR_RIDE_CONSTRUCTION_LEFT_CURVE_TIP = 898, + STR_RIDE_CONSTRUCTION_LEFT_CURVE_VERY_SMALL_TIP = 902, + STR_RIDE_CONSTRUCTION_LEVEL_TIP = 920, + STR_RIDE_CONSTRUCTION_MOVE_TO_NEXT_SECTION_TIP = 914, + STR_RIDE_CONSTRUCTION_MOVE_TO_PREVIOUS_SECTION_TIP = 913, + STR_RIDE_CONSTRUCTION_NO_ROLL_TIP = 912, + STR_RIDE_CONSTRUCTION_OTHER_TRACK_CONFIGURATIONS_TIP = 1385, + STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP = 1461, + STR_RIDE_CONSTRUCTION_REMOVE_HIGHLIGHTED_SECTION_TIP = 916, + STR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE_TIP = 905, + STR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL_TIP = 901, + STR_RIDE_CONSTRUCTION_RIGHT_CURVE_TIP = 899, + STR_RIDE_CONSTRUCTION_RIGHT_CURVE_VERY_SMALL_TIP = 903, + STR_RIDE_CONSTRUCTION_ROLL_BANKING = 908, + STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP = 910, + STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP = 911, + STR_RIDE_CONSTRUCTION_SEAT_ROT = 909, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_0 = 960, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_135 = 963, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_180 = 964, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_225 = 965, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_270 = 966, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_315 = 967, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_360 = 968, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_405 = 969, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_45 = 961, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_450 = 970, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_495 = 971, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_90 = 962, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_135 = 957, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_180 = 956, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_45 = 959, + STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_90 = 958, + STR_RIDE_CONSTRUCTION_SELECT_SEAT_ROTATION_ANGLE_TIP = 955, + STR_RIDE_CONSTRUCTION_SLOPE = 907, + STR_RIDE_CONSTRUCTION_SLOPE_DOWN_TIP = 919, + STR_RIDE_CONSTRUCTION_SLOPE_UP_TIP = 921, + STR_RIDE_CONSTRUCTION_SPECIAL = 1386, + STR_RIDE_CONSTRUCTION_STANDARD_RC_TRACK_TIP = 3062, + STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP = 918, + STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP = 922, + STR_RIDE_CONSTRUCTION_STRAIGHT_TIP = 906, + STR_RIDE_CONSTRUCTION_TRACK_STYLE = 1459, + STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP = 1460, + STR_RIDE_CONSTRUCTION_VERTICAL_DROP_TIP = 917, + STR_RIDE_CONSTRUCTION_VERTICAL_RISE_TIP = 923, + STR_RIDE_CONSTRUCTION_WATER_CHANNEL_TIP = 3063, + STR_RIDE_CONSTRUCTION_WINDOW_TITLE = 896, + STR_YELLOW_STRING = 1384, + + // Window: RideList + STR_CLOSE_ALL = 1011, + STR_DOWN_TIME = 1833, + STR_DOWN_TIME_LABEL = 1840, + STR_EXCITEMENT_LABEL = 6463, + STR_GUESTS_FAVOURITE = 1834, + STR_GUESTS_FAVOURITE_LABEL = 1842, + STR_GUESTS_FAVOURITE_PLURAL_LABEL = 1843, + STR_INTENSITY_LABEL = 6465, + STR_LIST_KIOSKS_AND_FACILITIES_TIP = 3106, + STR_LIST_RIDES_TIP = 3104, + STR_LIST_SHOPS_AND_STALLS_TIP = 3105, + STR_NAUSEA_LABEL = 6467, + STR_NUMBER_RIDES = 5807, + STR_NUMBER_SHOPS_AND_STALLS = 5808, + STR_NUMBER_TOILETS_AND_INFORMATION_KIOSKS = 5809, + STR_OPEN_ALL = 1012, + STR_OPEN_OR_CLOSE_ALL_RIDES = 1009, + STR_POPULARITY = 1827, + STR_POPULARITY_LABEL = 1836, + STR_POPULARITY_UNKNOWN_LABEL = 1835, + STR_PROFIT = 1829, + STR_PROFIT_LABEL = 1841, + STR_QUEUE_LENGTH = 1830, + STR_QUEUE_TIME = 1831, + STR_QUEUE_TIME_LABEL = 1204, + STR_QUEUE_TIME_PLURAL_LABEL = 1205, + STR_QUICK_DEMOLISH_RIDE = 6039, + STR_RATING_UKNOWN_LABEL = 6468, + STR_RELIABILITY = 1832, + STR_RELIABILITY_LABEL = 1839, + STR_RIDES = 974, + STR_RIDE_LIST_AGE = 5772, + STR_RIDE_LIST_BUILT_LAST_YEAR_LABEL = 5777, + STR_RIDE_LIST_BUILT_THIS_YEAR_LABEL = 5776, + STR_RIDE_LIST_BUILT_X_YEARS_AGO_LABEL = 5778, + STR_RIDE_LIST_CUSTOMERS_PER_HOUR = 5770, + STR_RIDE_LIST_CUSTOMERS_PER_HOUR_LABEL = 5775, + STR_RIDE_LIST_EXCITEMENT = 6462, + STR_RIDE_LIST_INCOME = 5767, + STR_RIDE_LIST_INCOME_LABEL = 5779, + STR_RIDE_LIST_INFORMATION_TYPE_TIP = 1844, + STR_RIDE_LIST_INTENSITY = 6464, + STR_RIDE_LIST_NAUSEA = 6466, + STR_RIDE_LIST_RUNNING_COST = 5771, + STR_RIDE_LIST_RUNNING_COST_LABEL = 5780, + STR_RIDE_LIST_RUNNING_COST_UNKNOWN = 5781, + STR_RIDE_LIST_SORT_TIP = 2796, + STR_RIDE_LIST_TOTAL_CUSTOMERS = 5768, + STR_RIDE_LIST_TOTAL_CUSTOMERS_LABEL = 5773, + STR_RIDE_LIST_TOTAL_PROFIT = 5769, + STR_RIDE_LIST_TOTAL_PROFIT_LABEL = 5774, + STR_SATISFACTION = 1828, + STR_SATISFACTION_LABEL = 1838, + STR_SATISFACTION_UNKNOWN_LABEL = 1837, + STR_SHOPS_AND_STALLS = 975, + STR_SORT = 2795, + STR_STATUS = 1826, + STR_TOILETS_AND_INFORMATION_KIOSKS = 976, + + // Window: SavePrompt + STR_LOAD_GAME_PROMPT_TITLE = 950, + STR_LOAD_LANDSCAPE_PROMPT_TITLE = 953, + STR_QUIT_GAME_2_PROMPT_TITLE = 952, + STR_QUIT_GAME_PROMPT_TITLE = 951, + STR_SAVE_BEFORE_LOADING = 947, + STR_SAVE_BEFORE_QUITTING = 948, + STR_SAVE_BEFORE_QUITTING_2 = 949, + STR_SAVE_PROMPT_DONT_SAVE = 945, + STR_SAVE_PROMPT_SAVE = 944, + + // Window: ScenarioSelect + STR_COMPLETED_BY = 2793, + STR_COMPLETED_BY_WITH_COMPANY_VALUE = 2794, + STR_OBJECTIVE = 3322, + STR_SCENARIO_CATEGORY_EXTRAS_PARKS = 6519, + STR_SCENARIO_CATEGORY_OTHER_PARKS = 5626, + STR_SCENARIO_CATEGORY_RCT2 = 5622, + STR_SCENARIO_CATEGORY_RCT2_TT = 5624, + STR_SCENARIO_CATEGORY_RCT2_WW = 5623, + STR_SCENARIO_CATEGORY_REAL_PARKS = 5625, + STR_SCENARIO_CATEGORY_UCES = 6530, + STR_SCENARIO_HOVER_HINT = 6518, + STR_SCENARIO_LOCKED = 5783, + STR_SCENARIO_LOCKED_DESC = 5784, + STR_SELECT_SCENARIO = 2291, + STR_SMALL_WINDOW_COLOUR_2_STRINGID = 5138, + + // Window: Scenery + STR_ALL_SCENERY = 6547, + STR_MISCELLANEOUS = 1813, + STR_RESTRICT_SCENERY = 6621, + STR_RESTRICT_SCENERY_TIP = 6622, + STR_ROTATE_OBJECTS_90 = 1327, + STR_SCENERY_AUTHOR = 6595, + STR_SCENERY_AUTHOR_PLURAL = 6596, + STR_SCENERY_CLUSTER_TIP = 3225, + STR_SCENERY_EYEDROPPER_TIP = 6030, + STR_SCENERY_PAINTBRUSH_TIP = 3102, + STR_SELECT_COLOUR = 3099, + STR_SELECT_SECONDARY_COLOUR = 3100, + STR_SELECT_TERTIARY_COLOUR = 3101, + + // Window: SceneryScatter + STR_SCATTER_TOOL_DENSITY = 6352, + STR_SCATTER_TOOL_DENSITY_HIGH = 6355, + STR_SCATTER_TOOL_DENSITY_LOW = 6353, + STR_SCATTER_TOOL_DENSITY_MEDIUM = 6354, + STR_SCENERY_SCATTER = 6350, + + // Window: ServerList + STR_ADD_SERVER = 5500, + STR_ADD_TO_FAVOURITES = 5572, + STR_ENTER_HOSTNAME_OR_IP_ADDRESS = 5503, + STR_FETCH_SERVERS = 5570, + STR_JOIN_GAME = 5571, + STR_NETWORK_VERSION = 5717, + STR_NETWORK_VERSION_TIP = 5718, + STR_PLAYER_NAME = 5499, + STR_REMOVE_FROM_FAVOURITES = 5573, + STR_SERVER_LIST_CONNECTING = 6148, + STR_X_PLAYERS_ONLINE = 5787, + + // Window: ServerStart + STR_ADVERTISE = 5567, + STR_ADVERTISE_SERVER_TIP = 5805, + STR_MAX_PLAYERS = 5575, + STR_PASSWORD = 5566, + STR_PORT = 5576, + STR_SERVER_DESCRIPTION = 6031, + STR_SERVER_GREETING = 6032, + STR_SERVER_MAX_PLAYERS_VALUE = 5918, + STR_SERVER_NAME = 5574, + STR_START_SERVER = 5501, + + // Window: ShortcutKeys + STR_RESET = 6580, + STR_RESET_SHORTCUT_KEYS_PROMPT = 6581, + STR_SHORTCUTS_TITLE = 2490, + STR_SHORTCUT_ACTION_RESET_TIP = 2492, + STR_SHORTCUT_CHANGE_PROMPT = 2785, + STR_SHORTCUT_CHANGE_TITLE = 2784, + STR_SHORTCUT_ENTRY_FORMAT = 2781, + STR_SHORTCUT_LIST_TIP = 2786, + STR_SHORTCUT_REMOVE = 6433, + STR_SHORTCUT_REMOVE_TIP = 6434, + + // Window: Sign + STR_CHANGE_SIGN_TEXT_TIP = 2994, + STR_DEMOLISH_SIGN_TIP = 2995, + STR_SIGN = 2991, + STR_SIGN_TEXT_PROMPT = 2993, + STR_SIGN_TEXT_TITLE = 2992, + + // Window: Staff + STR_CLEAR_PATROL_AREA = 3446, + STR_FIRE_STAFF_TIP = 1705, + STR_FIX_RIDES = 1877, + STR_INSPECT_RIDES = 1876, + STR_NAME_STAFF_TIP = 1056, + STR_SELECT_COSTUME_TIP = 1946, + STR_SET_PATROL_TIP = 1708, + STR_STAFF_OPTIONS_TIP = 1945, + STR_STAFF_OPTION_EMPTY_LITTER = 1714, + STR_STAFF_OPTION_MOW_GRASS = 1715, + STR_STAFF_OPTION_SWEEP_FOOTPATHS = 1712, + STR_STAFF_OPTION_WATER_GARDENS = 1713, + STR_STAFF_OVERVIEW_TIP = 1939, + STR_STAFF_PROMPT_ENTER_NAME = 2978, + STR_STAFF_STATS_TIP = 2348, + STR_STAFF_STAT_BINS_EMPTIED = 2354, + STR_STAFF_STAT_EMPLOYED_FOR = 2350, + STR_STAFF_STAT_GARDENS_WATERED = 2352, + STR_STAFF_STAT_LAWNS_MOWN = 2351, + STR_STAFF_STAT_LITTER_SWEPT = 2353, + STR_STAFF_STAT_RIDES_FIXED = 2355, + STR_STAFF_STAT_RIDES_INSPECTED = 2356, + STR_STAFF_STAT_VANDALS_STOPPED = 6435, + STR_STAFF_STAT_WAGES = 2349, + STR_STAFF_TITLE_STAFF_MEMBER_NAME = 2977, + + // Window: StaffFirePrompt + STR_FIRE_STAFF_ID = 1711, + STR_SACK_STAFF = 1709, + STR_YES = 1710, + + // Window: StaffList + STR_COST_PER_MONTH = 1858, + STR_ENTERTAINER_PLURAL = 1862, + STR_ENTERTAINER_SINGULAR = 1866, + STR_HANDYMAN_PLURAL = 1859, + STR_HANDYMAN_SINGULAR = 1863, + STR_HIRE_ENTERTAINER = 1703, + STR_HIRE_HANDYMAN = 1700, + STR_HIRE_MECHANIC = 1701, + STR_HIRE_SECURITY_GUARD = 1702, + STR_HIRE_STAFF_TIP = 1948, + STR_MECHANIC_PLURAL = 1860, + STR_MECHANIC_SINGULAR = 1864, + STR_NO_THING_IN_PARK_YET = 1891, + STR_QUICK_FIRE_STAFF = 5300, + STR_SECURITY_GUARD_PLURAL = 1861, + STR_SECURITY_GUARD_SINGULAR = 1865, + STR_SHOW_PATROL_AREA_TIP = 1947, + STR_SHOW_STAFF_ON_MAP_TIP = 2804, + STR_STAFF = 1468, + STR_STAFF_ENTERTAINERS_TAB_TIP = 2213, + STR_STAFF_HANDYMEN_TAB_TIP = 2210, + STR_STAFF_LIST_COUNTER = 1867, + STR_STAFF_MECHANICS_TAB_TIP = 2211, + STR_STAFF_SECURITY_TAB_TIP = 2212, + STR_UNIFORM_COLOUR = 1791, + STR_UNIFORM_COLOUR_TIP = 1790, + + // Window: Themes + STR_THEMES_ACTION_DELETE_TIP = 5258, + STR_THEMES_ACTION_DUPLICATE = 5239, + STR_THEMES_ACTION_DUPLICATE_TIP = 5257, + STR_THEMES_ACTION_RENAME_TIP = 5259, + STR_THEMES_DESC_CANT_CHANGE_THIS_THEME = 5256, + STR_THEMES_ERR_CANT_CHANGE_THIS_THEME = 5241, + STR_THEMES_ERR_NAME_ALREADY_EXISTS = 5242, + STR_THEMES_HEADER_PALETTE = 5237, + STR_THEMES_HEADER_WINDOW = 5236, + STR_THEMES_OPTION_RCT1_BOTTOM_TOOLBAR = 6141, + STR_THEMES_OPTION_RCT1_PARK_CONTROLS = 5283, + STR_THEMES_OPTION_RCT1_RIDE_CONTROLS = 5282, + STR_THEMES_OPTION_RCT1_SCENARIO_SELECTION_FONT = 5284, + STR_THEMES_PROMPT_ENTER_THEME_NAME = 5240, + STR_THEMES_TAB_EDITORS_TIP = 5232, + STR_THEMES_TAB_FEATURES_TIP = 5281, + STR_THEMES_TAB_MAIN_TIP = 5228, + STR_THEMES_TAB_MISC_TIP = 5233, + STR_THEMES_TAB_PARK_TIP = 5229, + STR_THEMES_TAB_PROMPTS_TIP = 5234, + STR_THEMES_TAB_RIDES_AND_GUESTS_TIP = 5231, + STR_THEMES_TAB_SETTINGS_TIP = 5235, + STR_THEMES_TAB_TOOLS_TIP = 5230, + STR_THEMES_TITLE = 5244, + STR_THEMES_WINDOW_BANNER = 5209, + STR_THEMES_WINDOW_BOTTOM_TOOLBAR = 5246, + STR_THEMES_WINDOW_BOTTOM_TOOLBAR_SCENARIO_EDITOR = 5248, + STR_THEMES_WINDOW_BOTTOM_TOOLBAR_TRACK_EDITOR = 5247, + STR_THEMES_WINDOW_CHANGE_KEYBOARD_SHORTCUT = 5221, + STR_THEMES_WINDOW_CLEAR_SCENERY = 5195, + STR_THEMES_WINDOW_CONSTRUCT_RIDE = 5201, + STR_THEMES_WINDOW_DEMOLISH_RIDE_PROMPT = 5224, + STR_THEMES_WINDOW_EDITOR_INVENTION_LIST = 5211, + STR_THEMES_WINDOW_EDITOR_OBJECT_SELECTION = 5210, + STR_THEMES_WINDOW_EDITOR_SCENARIO_OPTIONS = 5212, + STR_THEMES_WINDOW_EDTIOR_OBJECTIVE_OPTIONS = 5213, + STR_THEMES_WINDOW_FINANCES = 5187, + STR_THEMES_WINDOW_FIRE_PROMPT = 5225, + STR_THEMES_WINDOW_FOOTPATH = 5198, + STR_THEMES_WINDOW_GUEST_LIST = 5206, + STR_THEMES_WINDOW_INSTALL_TRACK = 5216, + STR_THEMES_WINDOW_KEYBOARD_SHORTCUT_LIST = 5220, + STR_THEMES_WINDOW_LAND = 5193, + STR_THEMES_WINDOW_LAND_RIGHTS = 5196, + STR_THEMES_WINDOW_LOADSAVE = 5222, + STR_THEMES_WINDOW_LOADSAVE_OVERWRITE_PROMPT = 5227, + STR_THEMES_WINDOW_MANAGE_TRACK_DESIGN = 5215, + STR_THEMES_WINDOW_MAP = 5190, + STR_THEMES_WINDOW_MAPGEN = 5214, + STR_THEMES_WINDOW_NETWORK_STATUS = 5735, + STR_THEMES_WINDOW_NEW_CAMPAIGN = 5188, + STR_THEMES_WINDOW_OPTIONS = 5219, + STR_THEMES_WINDOW_PARK_INFORMATION = 5253, + STR_THEMES_WINDOW_PEEP = 5205, + STR_THEMES_WINDOW_PLAYER = 5736, + STR_THEMES_WINDOW_RECENT_NEWS = 5192, + STR_THEMES_WINDOW_RESEARCH = 5189, + STR_THEMES_WINDOW_RIDE = 5203, + STR_THEMES_WINDOW_RIDE_CONSTRUCTION = 5199, + STR_THEMES_WINDOW_RIDE_LIST = 5204, + STR_THEMES_WINDOW_SAVE_PROMPT = 5223, + STR_THEMES_WINDOW_SCENERY = 5197, + STR_THEMES_WINDOW_SCENERY_SCATTER = 6351, + STR_THEMES_WINDOW_STAFF = 5207, + STR_THEMES_WINDOW_STAFF_LIST = 5208, + STR_THEMES_WINDOW_THEMES = 5218, + STR_THEMES_WINDOW_TITLE_MENU_BUTTONS = 5249, + STR_THEMES_WINDOW_TITLE_MENU_EXIT = 5250, + STR_THEMES_WINDOW_TITLE_MENU_OPTIONS = 5251, + STR_THEMES_WINDOW_TITLE_MENU_SCENARIO_SELECTION = 5252, + STR_THEMES_WINDOW_TOP_TOOLBAR = 5245, + STR_THEMES_WINDOW_TRACK_DELETE_PROMPT = 5226, + STR_THEMES_WINDOW_TRACK_DESIGN_LIST = 5202, + STR_THEMES_WINDOW_TRACK_DESIGN_PLACE = 5200, + STR_THEMES_WINDOW_VIEWPORT = 5191, + STR_THEMES_WINDOW_WATER = 5194, + + // Window: TileInspector + STR_MOVE_SELECTED_ELEMENT_DOWN_TIP = 5618, + STR_MOVE_SELECTED_ELEMENT_UP_TIP = 5617, + STR_REMOVE_SELECTED_ELEMENT_TIP = 5610, + STR_ROTATE_SELECTED_ELEMENT_TIP = 5803, + STR_TILE_INSPECTOR_BANNER_BLOCKED_PATHS = 5984, + STR_TILE_INSPECTOR_BASE_HEIGHT = 5339, + STR_TILE_INSPECTOR_BASE_HEIGHT_FULL = 5941, + STR_TILE_INSPECTOR_BASE_HEIGHT_SHORT = 5608, + STR_TILE_INSPECTOR_CLEARANCE_HEIGHT = 5340, + STR_TILE_INSPECTOR_CLEARANGE_HEIGHT_SHORT = 5609, + STR_TILE_INSPECTOR_COLLISSION = 5962, + STR_TILE_INSPECTOR_COLOUR_SCHEME = 6307, + STR_TILE_INSPECTOR_COPY_TIP = 5993, + STR_TILE_INSPECTOR_DIRECTION = 6461, + STR_TILE_INSPECTOR_DIRECTION_SHORT = 6460, + STR_TILE_INSPECTOR_ELEMENT_TYPE = 5338, + STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID = 5970, + STR_TILE_INSPECTOR_ENTRANCE_EXIT_ID = 5971, + STR_TILE_INSPECTOR_ENTRANCE_LEFT = 5968, + STR_TILE_INSPECTOR_ENTRANCE_MAKE_USABLE = 6220, + STR_TILE_INSPECTOR_ENTRANCE_MAKE_USABLE_TIP = 6221, + STR_TILE_INSPECTOR_ENTRANCE_MIDDLE = 5967, + STR_TILE_INSPECTOR_ENTRANCE_PART = 5966, + STR_TILE_INSPECTOR_ENTRANCE_RIDE_ID = 5972, + STR_TILE_INSPECTOR_ENTRANCE_RIGHT = 5969, + STR_TILE_INSPECTOR_ENTRANCE_TYPE = 5965, + STR_TILE_INSPECTOR_ENTRANCE_TYPE_PARK_ENTRANC = 5337, + STR_TILE_INSPECTOR_ENTRANCE_TYPE_RIDE_ENTRANCE = 5335, + STR_TILE_INSPECTOR_ENTRANCE_TYPE_RIDE_EXIT = 5336, + STR_TILE_INSPECTOR_ENTRY_BANNER_NONE = 5981, + STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT = 5980, + STR_TILE_INSPECTOR_FLAG_GHOST = 5612, + STR_TILE_INSPECTOR_FLAG_GHOST_SHORT = 5611, + STR_TILE_INSPECTOR_FLAG_INVISIBLE = 6437, + STR_TILE_INSPECTOR_FLAG_LAST = 5616, + STR_TILE_INSPECTOR_FLAG_LAST_SHORT = 5615, + STR_TILE_INSPECTOR_FOOTPATH_RAILINGS_NAME = 6447, + STR_TILE_INSPECTOR_FOOTPATH_SURFACE_NAME = 6446, + STR_TILE_INSPECTOR_GROUPBOX_BANNER_INFO = 5931, + STR_TILE_INSPECTOR_GROUPBOX_ENTRANCE_INFO = 5928, + STR_TILE_INSPECTOR_GROUPBOX_PATH_INFO = 5925, + STR_TILE_INSPECTOR_GROUPBOX_PROPERTIES = 5933, + STR_TILE_INSPECTOR_GROUPBOX_SCENERY_INFO = 5927, + STR_TILE_INSPECTOR_GROUPBOX_SURFACE_INFO = 5924, + STR_TILE_INSPECTOR_GROUPBOX_TRACK_INFO = 5926, + STR_TILE_INSPECTOR_GROUPBOX_WALL_INFO = 5929, + STR_TILE_INSPECTOR_INVISIBLE_SHORT = 6438, + STR_TILE_INSPECTOR_LAND_NOT_OWNED_AND_NOT_AVAILABLE = 5937, + STR_TILE_INSPECTOR_LARGE_SCENERY_PIECE_ID = 5983, + STR_TILE_INSPECTOR_LARGE_SCENERY_TYPE = 5982, + STR_TILE_INSPECTOR_PASTE_TIP = 5994, + STR_TILE_INSPECTOR_PATH_ADDITIONS = 5943, + STR_TILE_INSPECTOR_PATH_ADDITIONS_NONE = 5944, + STR_TILE_INSPECTOR_PATH_BROKEN = 6321, + STR_TILE_INSPECTOR_PATH_CONNECTED_EDGES = 5945, + STR_TILE_INSPECTOR_PATH_JUNCTION_RAILINGS = 6548, + STR_TILE_INSPECTOR_PATH_NAME = 5942, + STR_TILE_INSPECTOR_PATH_SLOPED = 6015, + STR_TILE_INSPECTOR_SCENERY_AGE = 5954, + STR_TILE_INSPECTOR_SCENERY_ENTRY_IDX = 5961, + STR_TILE_INSPECTOR_SCENERY_QUADRANT = 5955, + STR_TILE_INSPECTOR_SCENERY_QUADRANT_LABEL = 5960, + STR_TILE_INSPECTOR_SCENERY_QUADRANT_NE = 5958, + STR_TILE_INSPECTOR_SCENERY_QUADRANT_NW = 5957, + STR_TILE_INSPECTOR_SCENERY_QUADRANT_SE = 5959, + STR_TILE_INSPECTOR_SCENERY_QUADRANT_SW = 5956, + STR_TILE_INSPECTOR_SELECT_TILE_HINT = 6497, + STR_TILE_INSPECTOR_SORT_TIP = 5953, + STR_TILE_INSPECTOR_STATION_INDEX = 6277, + STR_TILE_INSPECTOR_SURFACE = 6191, + STR_TILE_INSPECTOR_SURFACE_CORNERS = 5963, + STR_TILE_INSPECTOR_SURFACE_DIAGONAL = 5964, + STR_TILE_INSPECTOR_SURFACE_EDGE = 5935, + STR_TILE_INSPECTOR_SURFACE_OWNERSHIP = 5936, + STR_TILE_INSPECTOR_SURFACE_REMOVE_FENCES = 5939, + STR_TILE_INSPECTOR_SURFACE_RESTORE_FENCES = 5940, + STR_TILE_INSPECTOR_SURFACE_TERAIN = 5934, + STR_TILE_INSPECTOR_SURFACE_WATER_LEVEL = 5938, + STR_TILE_INSPECTOR_TITLE = 5314, + STR_TILE_INSPECTOR_TRACK_BLOCK_BRAKE = 6319, + STR_TILE_INSPECTOR_TRACK_BRAKE_CLOSED = 6539, + STR_TILE_INSPECTOR_TRACK_CHAIN_LIFT = 5949, + STR_TILE_INSPECTOR_TRACK_ENTIRE_TRACK_PIECE = 5950, + STR_TILE_INSPECTOR_TRACK_IS_INDESTRUCTIBLE = 6320, + STR_TILE_INSPECTOR_TRACK_PIECE_ID = 5951, + STR_TILE_INSPECTOR_TRACK_RIDE_ID = 5947, + STR_TILE_INSPECTOR_TRACK_RIDE_NAME = 5948, + STR_TILE_INSPECTOR_TRACK_RIDE_TYPE = 5946, + STR_TILE_INSPECTOR_TRACK_SEQUENCE = 5952, + STR_TILE_INSPECTOR_WALL = 6192, + STR_TILE_INSPECTOR_WALL_ANIMATION_FRAME = 6367, + STR_TILE_INSPECTOR_WALL_ANIMATION_IS_BACKWARDS = 6626, + STR_TILE_INSPECTOR_WALL_FLAT = 5976, + STR_TILE_INSPECTOR_WALL_SLOPE = 5975, + STR_TILE_INSPECTOR_WALL_SLOPED_LEFT = 5977, + STR_TILE_INSPECTOR_WALL_SLOPED_RIGHT = 5978, + STR_TILE_INSPECTOR_WALL_TYPE = 5979, + + // Window: TitleExit + STR_EXIT = 1924, + + // Window: TitleMenu + STR_CONTINUE_SAVED_GAME_TIP = 1922, + STR_CONVERT_SAVED_GAME_TO_SCENARIO = 3343, + STR_GAME_TOOLS_TIP = 3341, + STR_OPEN_USER_CONTENT_FOLDER = 6266, + STR_ROLLER_COASTER_DESIGNER = 3344, + STR_SCENARIO_EDITOR = 3342, + STR_SHOW_MULTIPLAYER_TIP = 5588, + STR_START_NEW_GAME_TIP = 1921, + STR_TRACK_DESIGNS_MANAGER = 3345, + STR_UPDATE_AVAILABLE = 6380, + + // Window: TitleOptions + STR_OPTIONS = 2327, + STR_OPTIONS_TIP = 5857, + + // Window: Tooltip + STR_STRING_TOOLTIP = 6034, + + // Window: TopToolbar + STR_ADJUST_LAND_TIP = 938, + STR_ADJUST_WATER_TIP = 1160, + STR_BUILD_FOOTPATH_TIP = 1173, + STR_BUILD_RIDE_TIP = 1895, + STR_CHAT_UNAVAILABLE = 6283, + STR_CHEATS_MENU_OBJECTIVE_OPTIONS = 6393, + STR_CHEATS_TIP = 5149, + STR_CLEAR_SCENERY_TIP = 3437, + STR_DEBUG_DROPDOWN_CONSOLE = 5312, + STR_DEBUG_DROPDOWN_DEBUG_PAINT = 5903, + STR_DEBUG_DROPDOWN_INVENTIONS_LIST = 5491, + STR_DEBUG_DROPDOWN_OBJECT_SELECTION = 5371, + STR_DEBUG_DROPDOWN_SCENARIO_OPTIONS = 5492, + STR_DEBUG_DROPDOWN_TILE_INSPECTOR = 5313, + STR_DEBUG_TIP = 5311, + STR_DISC_AND_GAME_OPTIONS_TIP = 834, + STR_ENABLE_SANDBOX_MODE = 5455, + STR_EXIT_OPENRCT2 = 5159, + STR_EXTRA_VIEWPORT = 2780, + STR_FILE_BUG_ON_GITHUB = 6457, + STR_GAME_SPEED_TIP = 5148, + STR_GIANT_SCREENSHOT = 5260, + STR_GUESTS_TIP = 1693, + STR_HEIGHT_MARKS_ON_LAND = 1154, + STR_HEIGHT_MARKS_ON_PATHS = 1155, + STR_HEIGHT_MARKS_ON_RIDE_TRACKS = 1153, + STR_HIGHLIGHT_PATH_ISSUES_MENU = 6219, + STR_LOAD_LANDSCAPE = 884, + STR_MULTIPLAYER_RECONNECT = 6309, + STR_NEW_GAME = 5715, + STR_OVERLAY_CLEARANCE_CHECKS_DISABLED = 6374, + STR_PARK_INFORMATION_TIP = 2233, + STR_PAUSE_GAME_TIP = 833, + STR_PLACE_SCENERY_TIP = 1159, + STR_QUIT_ROLLERCOASTER_DESIGNER = 888, + STR_QUIT_SCENARIO_EDITOR = 887, + STR_QUIT_TO_MENU = 5158, + STR_QUIT_TRACK_DESIGNS_MANAGER = 889, + STR_REMOVE_BASE_LAND = 940, + STR_REMOVE_VERTICAL_FACES = 941, + STR_RIDES_IN_PARK_TIP = 1053, + STR_ROTATE_ANTI_CLOCKWISE = 5459, + STR_ROTATE_CLOCKWISE = 5458, + STR_ROTATE_90_TIP = 1404, + STR_ROTATE_TIP = 832, + STR_SAVE_GAME_AS = 5512, + STR_SAVE_LANDSCAPE = 885, + STR_SCREENSHOT = 891, + STR_SEE_THROUGH_GUESTS = 6474, + STR_SEE_THROUGH_PATHS = 5911, + STR_SEE_THROUGH_RIDES = 942, + STR_SEE_THROUGH_SCENERY = 943, + STR_SEE_THROUGH_STAFF = 6475, + STR_SEE_THROUGH_SUPPORTS = 6473, + STR_SEE_THROUGH_VEGETATION = 6471, + STR_SEE_THROUGH_VEHICLES = 6472, + STR_SHOW_MAP_TIP = 2805, + STR_SHOW_MULTIPLAYER_STATUS_TIP = 5504, + STR_SHOW_RECENT_MESSAGES_TIP = 5487, + STR_SPEED_FAST = 5144, + STR_SPEED_HYPER = 5146, + STR_SPEED_NORMAL = 5142, + STR_SPEED_QUICK = 5143, + STR_SPEED_TURBO = 5145, + STR_STAFF_TIP = 1694, + STR_TOOLBAR_CHAT_TIP = 6280, + STR_TOOLBAR_MUTE_TIP = 6056, + STR_TRANSPARENCY_OPTIONS = 6481, + STR_UNDERGROUND_VIEW = 939, + STR_VIEW_CLIPPING_MENU = 6003, + STR_VIEW_OPTIONS_TIP = 937, + + // Window: TrackDesignManage + STR_ANOTHER_FILE_EXISTS_WITH_NAME_OR_FILE_IS_WRITE_PROTECTED = 3354, + STR_ARE_YOU_SURE_YOU_WANT_TO_PERMANENTLY_DELETE_TRACK = 3357, + STR_CANT_DELETE_TRACK_DESIGN = 3358, + STR_CANT_RENAME_TRACK_DESIGN = 3352, + STR_DELETE_FILE = 3356, + STR_FILE_IS_WRITE_PROTECTED_OR_LOCKED = 3355, + STR_NEW_NAME_CONTAINS_INVALID_CHARACTERS = 3353, + STR_TRACK_DESIGN_RENAME_DESC = 3351, + STR_TRACK_DESIGN_RENAME_TITLE = 3350, + STR_TRACK_MANAGE_DELETE = 3349, + STR_TRACK_MANAGE_RENAME = 3348, + + // Window: TrackDesignPlace + STR_GO_BACK_TO_DESIGN_SELECTION_WINDOW_TIP = 3114, + STR_MIRROR_IMAGE_TIP = 1405, + STR_SELECT_A_DIFFERENT_DESIGN = 3113, + + // Window: TrackList + STR_BUILD_CUSTOM_DESIGN = 2310, + STR_CLICK_ON_DESIGN_TO_BUILD_IT_TIP = 3111, + STR_CLICK_ON_DESIGN_TO_RENAME_OR_DELETE_IT = 3112, + STR_NO_TRACK_DESIGNS_OF_THIS_TYPE = 3359, + STR_SELECT_DESIGN = 2307, + STR_SELECT_OTHER_RIDE = 5453, + STR_THIS_DESIGN_WILL_BE_BUILT_WITH_AN_ALTERNATIVE_VEHICLE_TYPE = 3136, + STR_TRACK_DESIGNS = 2308, + STR_TRACK_LIST_COST_AROUND = 2315, + STR_TRACK_LIST_EXCITEMENT_RATING = 2311, + STR_TRACK_LIST_INTENSITY_RATING = 2312, + STR_TRACK_LIST_NAME_FORMAT = 5813, + STR_TRACK_LIST_NAUSEA_RATING = 2313, + STR_TRACK_LIST_RIDE_LENGTH = 2314, + STR_TRACK_LIST_SPACE_REQUIRED = 2316, + STR_TRACK_LOAD_FAILED_ERROR = 5898, + STR_TRACK_PREVIEW_NAME_FORMAT = 5814, + STR_VEHICLE_DESIGN_UNAVAILABLE = 3135, + + // Window: Transparency + STR_INVISIBLE_PATHS = 6478, + STR_INVISIBLE_RIDES = 6479, + STR_INVISIBLE_SCENERY = 6477, + STR_INVISIBLE_SUPPORTS = 1051, + STR_INVISIBLE_VEGETATION = 6476, + STR_INVISIBLE_VEHICLES = 6480, + + // Window: ViewClipping + STR_UNIT1DP_NO_SUFFIX = 6012, + STR_UNIT1DP_SUFFIX_FEET = 6011, + STR_UNIT2DP_SUFFIX_METRES = 6010, + STR_VIEW_CLIPPING_CLEAR_SELECTION = 6242, + STR_VIEW_CLIPPING_HEIGHT_ENABLE = 6005, + STR_VIEW_CLIPPING_HEIGHT_ENABLE_TIP = 6006, + STR_VIEW_CLIPPING_HEIGHT_SCROLL_TIP = 6009, + STR_VIEW_CLIPPING_HEIGHT_VALUE = 6007, + STR_VIEW_CLIPPING_HEIGHT_VALUE_TOGGLE = 6008, + STR_VIEW_CLIPPING_HORIZONTAL_CLIPPING = 6240, + STR_VIEW_CLIPPING_SELECT_AREA = 6241, + STR_VIEW_CLIPPING_VERTICAL_CLIPPING = 6239, + + // Window: Viewport + STR_LOCATE_SUBJECT_TIP = 1027, + STR_VIEWPORT_NO = 2779, + STR_ZOOM_IN_TIP = 830, + STR_ZOOM_OUT_TIP = 831, + + // Window: Water + STR_ADJUST_LARGER_WATER_TIP = 2381, + STR_ADJUST_SMALLER_WATER_TIP = 2380, + STR_WATER = 2383, + }; +} diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index f9f37aa088..cc0dc13c37 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -28,6 +28,7 @@ #include #include +using namespace OpenRCT2; using namespace OpenRCT2::Ui; using namespace OpenRCT2::Ui::Windows; @@ -161,7 +162,7 @@ public: case WV_FINANCES_RESEARCH: return FinancesResearchOpen(); case WV_RIDE_RESEARCH: - if (gConfigInterface.ToolbarShowResearch) + if (Config::Get().interface.ToolbarShowResearch) { return this->OpenWindow(WindowClass::Research); } @@ -209,14 +210,14 @@ public: } } - WindowBase* ShowError(StringId title, StringId message, const Formatter& args) override + WindowBase* ShowError(StringId title, StringId message, const Formatter& args, bool autoClose /* = false */) override { - return ErrorOpen(title, message, args); + return ErrorOpen(title, message, args, autoClose); } - WindowBase* ShowError(std::string_view title, std::string_view message) override + WindowBase* ShowError(std::string_view title, std::string_view message, bool autoClose /* = false */) override { - return ErrorOpen(title, message); + return ErrorOpen(title, message, autoClose); } WindowBase* OpenIntent(Intent* intent) override @@ -334,6 +335,28 @@ public: return window; } + case INTENT_ACTION_PROGRESS_OPEN: + { + std::string message = intent->GetStringExtra(INTENT_EXTRA_MESSAGE); + close_callback callback = intent->GetCloseCallbackExtra(INTENT_EXTRA_CALLBACK); + return ProgressWindowOpen(message, callback); + } + + case INTENT_ACTION_PROGRESS_SET: + { + uint32_t currentProgress = intent->GetUIntExtra(INTENT_EXTRA_PROGRESS_OFFSET); + uint32_t totalCount = intent->GetUIntExtra(INTENT_EXTRA_PROGRESS_TOTAL); + StringId format = intent->GetUIntExtra(INTENT_EXTRA_STRING_ID); + ProgressWindowSet(currentProgress, totalCount, format); + return nullptr; + } + + case INTENT_ACTION_PROGRESS_CLOSE: + { + ProgressWindowClose(); + return nullptr; + } + case INTENT_ACTION_NULL: // Intent does not hold an intent action break; @@ -552,6 +575,10 @@ public: WindowNetworkStatusClose(); break; + case WindowClass::ProgressWindow: + ProgressWindowClose(); + break; + default: break; } diff --git a/src/openrct2-ui/audio/AudioMixer.cpp b/src/openrct2-ui/audio/AudioMixer.cpp index 7390610a13..6606f10616 100644 --- a/src/openrct2-ui/audio/AudioMixer.cpp +++ b/src/openrct2-ui/audio/AudioMixer.cpp @@ -146,8 +146,8 @@ void AudioMixer::GetNextAudioChunk(uint8_t* dst, size_t length) else { auto group = channel->GetGroup(); - if ((group != MixerGroup::Sound || gConfigSound.SoundEnabled) && gConfigSound.MasterSoundEnabled - && gConfigSound.MasterVolume != 0) + if ((group != MixerGroup::Sound || Config::Get().sound.SoundEnabled) && Config::Get().sound.MasterSoundEnabled + && Config::Get().sound.MasterVolume != 0) { MixChannel(channel.get(), dst, length); } @@ -159,14 +159,14 @@ void AudioMixer::GetNextAudioChunk(uint8_t* dst, size_t length) void AudioMixer::UpdateAdjustedSound() { // Did the volume level get changed? Recalculate level in this case. - if (_settingSoundVolume != gConfigSound.SoundVolume) + if (_settingSoundVolume != Config::Get().sound.SoundVolume) { - _settingSoundVolume = gConfigSound.SoundVolume; + _settingSoundVolume = Config::Get().sound.SoundVolume; _adjustSoundVolume = powf(static_cast(_settingSoundVolume) / 100.f, 10.f / 6.f); } - if (_settingMusicVolume != gConfigSound.AudioFocus) + if (_settingMusicVolume != Config::Get().sound.AudioFocus) { - _settingMusicVolume = gConfigSound.AudioFocus; + _settingMusicVolume = Config::Get().sound.AudioFocus; _adjustMusicVolume = powf(static_cast(_settingMusicVolume) / 100.f, 10.f / 6.f); } } @@ -297,7 +297,8 @@ void AudioMixer::ApplyPan(const IAudioChannel* channel, void* buffer, size_t len int32_t AudioMixer::ApplyVolume(const IAudioChannel* channel, void* buffer, size_t len) { float volumeAdjust = _volume; - volumeAdjust *= gConfigSound.MasterSoundEnabled ? (static_cast(gConfigSound.MasterVolume) / 100.0f) : 0.0f; + volumeAdjust *= Config::Get().sound.MasterSoundEnabled ? (static_cast(Config::Get().sound.MasterVolume) / 100.0f) + : 0.0f; switch (channel->GetGroup()) { diff --git a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp index 0ecc219d76..a75e9d9819 100644 --- a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp @@ -141,7 +141,7 @@ public: SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer); - uint32_t scale = std::ceil(gConfigGeneral.WindowScale); + uint32_t scale = std::ceil(Config::Get().general.WindowScale); _scaledScreenTexture = SDL_CreateTexture( _sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_TARGET, width * scale, height * scale); @@ -169,7 +169,7 @@ public: _paletteHWMapped[i] = SDL_MapRGB(_screenTextureFormat, palette[i].Red, palette[i].Green, palette[i].Blue); } - if (gConfigGeneral.EnableLightFx) + if (Config::Get().general.EnableLightFx) { auto& lightPalette = LightFXGetPalette(); for (int32_t i = 0; i < 256; i++) @@ -210,7 +210,7 @@ protected: private: void Display() { - if (gConfigGeneral.EnableLightFx) + if (Config::Get().general.EnableLightFx) { void* pixels; int32_t pitch; @@ -244,14 +244,14 @@ private: } bool isSteamOverlayActive = GetContext()->GetUiContext()->IsSteamOverlayActive(); - if (isSteamOverlayActive && gConfigGeneral.SteamOverlayPause) + if (isSteamOverlayActive && Config::Get().general.SteamOverlayPause) { OverlayPreRenderCheck(); } SDL_RenderPresent(_sdlRenderer); - if (isSteamOverlayActive && gConfigGeneral.SteamOverlayPause) + if (isSteamOverlayActive && Config::Get().general.SteamOverlayPause) { OverlayPostRenderCheck(); } @@ -343,8 +343,8 @@ private: void RenderDirtyVisuals() { - float scaleX = gConfigGeneral.WindowScale; - float scaleY = gConfigGeneral.WindowScale; + float scaleX = Config::Get().general.WindowScale; + float scaleY = Config::Get().general.WindowScale; SDL_SetRenderDrawBlendMode(_sdlRenderer, SDL_BLENDMODE_BLEND); for (uint32_t y = 0; y < _dirtyGrid.BlockRows; y++) diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index 998cfefbcd..7a943bce4a 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -126,7 +126,7 @@ private: // https://github.com/OpenRCT2/OpenRCT2/issues/21772 #if !defined(__APPLE__) // Copy the surface to the window - if (gConfigGeneral.WindowScale == 1 || gConfigGeneral.WindowScale <= 0) + if (Config::Get().general.WindowScale == 1 || Config::Get().general.WindowScale <= 0) { SDL_Surface* windowSurface = SDL_GetWindowSurface(_window); if (SDL_BlitSurface(_surface, nullptr, windowSurface, nullptr)) diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index fc83719683..a1ae93d834 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -22,6 +22,7 @@ # include "TransparencyDepth.h" # include +# include # include # include # include @@ -449,7 +450,7 @@ private: } if (GetContext()->GetUiContext()->GetScaleQuality() == ScaleQuality::SmoothNearestNeighbour) { - uint32_t scale = std::ceil(gConfigGeneral.WindowScale); + uint32_t scale = std::ceil(Config::Get().general.WindowScale); _smoothScaleFramebuffer = std::make_unique(_width * scale, _height * scale, false, false); } } @@ -802,8 +803,6 @@ void OpenGLDrawingContext::DrawSpriteSolid(DrawPixelInfo& dpi, const ImageId ima { CalculcateClipping(dpi); - assert((colour & 0xFF) > 0u); - auto g1Element = GfxGetG1Element(image); if (g1Element == nullptr) { diff --git a/src/openrct2-ui/input/InputManager.cpp b/src/openrct2-ui/input/InputManager.cpp index 95ce7d9f3d..eb8f71bc5c 100644 --- a/src/openrct2-ui/input/InputManager.cpp +++ b/src/openrct2-ui/input/InputManager.cpp @@ -120,7 +120,7 @@ void InputManager::HandleViewScrolling() InputScrollViewport(_viewScroll); // Mouse edge scrolling - if (gConfigGeneral.EdgeScrolling) + if (Config::Get().general.EdgeScrolling) { if (InputGetState() != InputState::Normal) return; @@ -155,7 +155,7 @@ void InputManager::HandleModifiers() } #endif - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { if (gInputPlaceObjectModifier & (PLACE_OBJECT_MODIFIER_COPY_Z | PLACE_OBJECT_MODIFIER_SHIFT_Z)) VirtualFloorEnable(); diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index d3774fd69f..83c13be951 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -7,6 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include @@ -33,6 +35,7 @@ #include #include +using namespace OpenRCT2; using namespace OpenRCT2::Ui::Windows; struct RCTMouseData @@ -221,8 +224,10 @@ static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, WindowBa WidgetScrollUpdateThumbs(*w, widgetIndex); WindowInvalidateByNumber(w->classification, w->number); - ScreenCoordsXY fixedCursorPosition = { static_cast(std::ceil(gInputDragLast.x * gConfigGeneral.WindowScale)), - static_cast(std::ceil(gInputDragLast.y * gConfigGeneral.WindowScale)) }; + ScreenCoordsXY fixedCursorPosition = { + static_cast(std::ceil(gInputDragLast.x * Config::Get().general.WindowScale)), + static_cast(std::ceil(gInputDragLast.y * Config::Get().general.WindowScale)) + }; ContextSetCursorPosition(fixedCursorPosition); } @@ -474,7 +479,7 @@ static void InputWindowPositionContinue( { int32_t snapProximity; - snapProximity = (w.flags & WF_NO_SNAPPING) ? 0 : gConfigGeneral.WindowSnapProximity; + snapProximity = (w.flags & WF_NO_SNAPPING) ? 0 : Config::Get().general.WindowSnapProximity; WindowMoveAndSnap(w, newScreenCoords - lastScreenCoords, snapProximity); } @@ -529,7 +534,7 @@ static void InputViewportDragBegin(WindowBase& w) _ticksSinceDragStart = gCurrentRealTimeTicks; auto cursorPosition = ContextGetCursorPosition(); gInputDragLast = cursorPosition; - if (!gConfigGeneral.InvertViewportDrag) + if (!Config::Get().general.InvertViewportDrag) { ContextHideCursor(); } @@ -577,7 +582,7 @@ static void InputViewportDragContinue() differentialCoords.x = (viewport->zoom + 1).ApplyTo(differentialCoords.x); differentialCoords.y = (viewport->zoom + 1).ApplyTo(differentialCoords.y); - if (gConfigGeneral.InvertViewportDrag) + if (Config::Get().general.InvertViewportDrag) { w->savedViewPos -= differentialCoords; } @@ -589,7 +594,7 @@ static void InputViewportDragContinue() } const CursorState* cursorState = ContextGetCursorState(); - if (cursorState->touch || gConfigGeneral.InvertViewportDrag) + if (cursorState->touch || Config::Get().general.InvertViewportDrag) { gInputDragLast = newDragCoords; } @@ -1062,6 +1067,7 @@ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, WindowBase* w, W case WindowWidgetType::LabelCentred: case WindowWidgetType::Label: case WindowWidgetType::Groupbox: + case WindowWidgetType::ProgressBar: case WindowWidgetType::Placeholder: case WindowWidgetType::Last: // Non-interactive widget type @@ -1675,7 +1681,7 @@ void InputScrollViewport(const ScreenCoordsXY& scrollScreenCoords) if (viewport == nullptr) return; - const int32_t speed = gConfigGeneral.EdgeScrollingSpeed; + const int32_t speed = Config::Get().general.EdgeScrollingSpeed; int32_t multiplier = viewport->zoom.ApplyTo(speed); int32_t dx = scrollScreenCoords.x * multiplier; diff --git a/src/openrct2-ui/input/ShortcutInput.cpp b/src/openrct2-ui/input/ShortcutInput.cpp index 3df2c7466c..e3779ae0c4 100644 --- a/src/openrct2-ui/input/ShortcutInput.cpp +++ b/src/openrct2-ui/input/ShortcutInput.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" #include "ShortcutManager.h" #include @@ -14,6 +15,7 @@ #include #include #include +#include #include using namespace OpenRCT2; diff --git a/src/openrct2-ui/input/ShortcutManager.h b/src/openrct2-ui/input/ShortcutManager.h index 29e63e9470..1fb9ffee81 100644 --- a/src/openrct2-ui/input/ShortcutManager.h +++ b/src/openrct2-ui/input/ShortcutManager.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -23,6 +22,9 @@ #include #include +// TODO: only because of STR_NONE. We can do better. +#include + namespace OpenRCT2 { struct IPlatformEnvironment; diff --git a/src/openrct2-ui/input/Shortcuts.cpp b/src/openrct2-ui/input/Shortcuts.cpp index 8652a7d985..85b30e512b 100644 --- a/src/openrct2-ui/input/Shortcuts.cpp +++ b/src/openrct2-ui/input/Shortcuts.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" #include "ShortcutIds.h" #include "ShortcutManager.h" @@ -475,8 +476,8 @@ static void ShortcutOpenSceneryPicker() static void ShortcutScaleUp() { - gConfigGeneral.WindowScale += 0.25f; - ConfigSaveDefault(); + Config::Get().general.WindowScale += 0.25f; + Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); @@ -484,9 +485,9 @@ static void ShortcutScaleUp() static void ShortcutScaleDown() { - gConfigGeneral.WindowScale -= 0.25f; - gConfigGeneral.WindowScale = std::max(0.5f, gConfigGeneral.WindowScale); - ConfigSaveDefault(); + Config::Get().general.WindowScale -= 0.25f; + Config::Get().general.WindowScale = std::max(0.5f, Config::Get().general.WindowScale); + Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); @@ -634,7 +635,7 @@ static void ShortcutToggleConsole() { console.Toggle(); } - else if (gConfigGeneral.DebuggingTools && !ContextIsInputActive()) + else if (Config::Get().general.DebuggingTools && !ContextIsInputActive()) { WindowCancelTextbox(); console.Toggle(); @@ -741,8 +742,8 @@ static void ShortcutToggleTransparentWater() if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - gConfigGeneral.TransparentWater ^= 1; - ConfigSaveDefault(); + Config::Get().general.TransparentWater ^= 1; + Config::Save(); GfxInvalidateScreen(); } @@ -798,7 +799,7 @@ void ShortcutManager::RegisterDefaultShortcuts() RegisterShortcut(ShortcutId::InterfaceSceneryPicker, STR_SHORTCUT_OPEN_SCENERY_PICKER, ShortcutOpenSceneryPicker); RegisterShortcut( ShortcutId::InterfaceDisableClearance, STR_SHORTCUT_TOGGLE_CLEARANCE_CHECKS, ShortcutToggleClearanceChecks); - RegisterShortcut(ShortcutId::InterfaceMultiplayerChat, STR_SEND_MESSAGE, "C", []() { + RegisterShortcut(ShortcutId::InterfaceMultiplayerChat, STR_SHORTCUT_SEND_MESSAGE, "C", []() { if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && ChatAvailable()) { ChatToggle(); @@ -826,7 +827,7 @@ void ShortcutManager::RegisterDefaultShortcuts() RegisterShortcut(ShortcutId::InterfaceOpenTransparencyOptions, STR_SHORTCUT_OPEN_TRANSPARENCY_OPTIONS, "CTRL+T", ShortcutOpenTransparencyWindow); RegisterShortcut(ShortcutId::InterfaceOpenCheats, STR_SHORTCUT_OPEN_CHEATS_WINDOW, "CTRL+ALT+C", ShortcutOpenCheatWindow); RegisterShortcut(ShortcutId::InterfaceOpenTileInspector, STR_SHORTCUT_OPEN_TILE_INSPECTOR, []() { - if (gConfigInterface.ToolbarShowCheats) + if (Config::Get().interface.ToolbarShowCheats) { OpenWindow(WindowClass::TileInspector); } @@ -896,7 +897,7 @@ void ShortcutManager::RegisterDefaultShortcuts() // Debug RegisterShortcut(ShortcutId::DebugToggleConsole, STR_CONSOLE, "`", ShortcutToggleConsole); - RegisterShortcut(ShortcutId::DebugAdvanceTick, STR_ADVANCE_TO_NEXT_TICK, []() { + RegisterShortcut(ShortcutId::DebugAdvanceTick, STR_SHORTCUT_ADVANCE_TO_NEXT_TICK, []() { if (!(gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))) { gDoSingleUpdate = true; diff --git a/src/openrct2-ui/interface/Dropdown.h b/src/openrct2-ui/interface/Dropdown.h index d902d37dcc..95a451c872 100644 --- a/src/openrct2-ui/interface/Dropdown.h +++ b/src/openrct2-ui/interface/Dropdown.h @@ -12,9 +12,11 @@ #include #include #include -#include #include +// TODO: only because of STR_EMPTY. We can do better. +#include + namespace Dropdown { struct Item; @@ -47,20 +49,21 @@ namespace OpenRCT2::Ui::Windows extern int32_t gDropdownDefaultIndex; void WindowDropdownShowText( - const ScreenCoordsXY& screenPos, int32_t extray, uint8_t colour, uint8_t flags, size_t num_items); + const ScreenCoordsXY& screenPos, int32_t extray, ColourWithFlags colour, uint8_t flags, size_t num_items); void WindowDropdownShowTextCustomWidth( - const ScreenCoordsXY& screenPos, int32_t extray, uint8_t colour, uint8_t custom_height, uint8_t flags, size_t num_items, - int32_t width); + const ScreenCoordsXY& screenPos, int32_t extray, ColourWithFlags colour, uint8_t custom_height, uint8_t flags, + size_t num_items, int32_t width); void WindowDropdownShowImage( - int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t flags, int32_t numItems, int32_t itemWidth, + 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); void WindowDropdownClose(); int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, WindowBase* w); - void WindowDropdownShowColour(WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour); + void WindowDropdownShowColour( + WindowBase* w, Widget* widget, ColourWithFlags dropdownColour, colour_t selectedColour, + bool alwaysHideSpecialColours = false); void WindowDropdownShowColourAvailable( WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour, uint32_t availableColours); uint32_t DropdownGetAppropriateImageDropdownItemsPerRow(uint32_t numItems); - bool WindowDropDownHasMultipleColumns(size_t numItems); colour_t ColourDropDownIndexToColour(uint8_t ddidx); } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/interface/Graph.cpp b/src/openrct2-ui/interface/Graph.cpp index 803ab4c9a8..975bacefc6 100644 --- a/src/openrct2-ui/interface/Graph.cpp +++ b/src/openrct2-ui/interface/Graph.cpp @@ -7,12 +7,15 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include #include #include -#include + +using namespace OpenRCT2; namespace Graph { diff --git a/src/openrct2-ui/interface/Graph.h b/src/openrct2-ui/interface/Graph.h index dc6b027631..3f273b03a7 100644 --- a/src/openrct2-ui/interface/Graph.h +++ b/src/openrct2-ui/interface/Graph.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include diff --git a/src/openrct2-ui/interface/InGameConsole.cpp b/src/openrct2-ui/interface/InGameConsole.cpp index 12843d568c..20601dad3d 100644 --- a/src/openrct2-ui/interface/InGameConsole.cpp +++ b/src/openrct2-ui/interface/InGameConsole.cpp @@ -9,8 +9,10 @@ #include "InGameConsole.h" +#include "../UiStringIds.h" #include "Theme.h" +#include #include #include #include @@ -20,15 +22,15 @@ #include #include #include -#include +using namespace OpenRCT2; using namespace OpenRCT2::Ui; static InGameConsole _inGameConsole; static FontStyle InGameConsoleGetFontStyle() { - return (gConfigInterface.ConsoleSmallFont ? FontStyle::Small : FontStyle::Medium); + return (Config::Get().interface.ConsoleSmallFont ? FontStyle::Small : FontStyle::Medium); } static int32_t InGameConsoleGetLineHeight() @@ -278,7 +280,7 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const return; // Set font - uint8_t textColour = NOT_TRANSLUCENT(ThemeGetColour(WindowClass::Console, 1)); + ColourWithFlags textColour = { ThemeGetColour(WindowClass::Console, 1).colour, 0 }; const int32_t lineHeight = InGameConsoleGetLineHeight(); const int32_t maxLines = GetNumVisibleLines(); @@ -286,7 +288,7 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const // as opposed to a desaturated grey thread_local std::string _colourFormatStr; _colourFormatStr.clear(); - if (textColour == COLOUR_BLACK) + if (textColour.colour == COLOUR_BLACK) { _colourFormatStr = "{BLACK}"; } @@ -294,7 +296,7 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const // TTF looks far better without the outlines if (!LocalisationService_UseTrueTypeFont()) { - textColour |= COLOUR_FLAG_OUTLINE; + textColour.setFlag(ColourFlag::withOutline, true); } Invalidate(); @@ -308,7 +310,7 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const FilterPaletteID::Palette51); // Paint background colour. - uint8_t backgroundColour = ThemeGetColour(WindowClass::Console, 0); + auto backgroundColour = ThemeGetColour(WindowClass::Console, 0); GfxFillRectInset(dpi, { _consoleTopLeft, _consoleBottomRight }, backgroundColour, INSET_RECT_FLAG_FILL_NONE); GfxFillRectInset( dpi, { _consoleTopLeft + ScreenCoordsXY{ 1, 1 }, _consoleBottomRight - ScreenCoordsXY{ 1, 1 } }, backgroundColour, @@ -322,7 +324,7 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const { const size_t index = i + _consoleScrollPos; lineBuffer = _colourFormatStr + _consoleLines[index]; - GfxDrawString(dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameConsoleGetFontStyle() }); + DrawText(dpi, screenCoords, { textColour, InGameConsoleGetFontStyle() }, lineBuffer.c_str()); screenCoords.y += lineHeight; } @@ -336,13 +338,13 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const if (_consoleCaretTicks < CONSOLE_CARET_FLASH_THRESHOLD) { auto caret = screenCoords + ScreenCoordsXY{ _caretScreenPosX, lineHeight }; - uint8_t caretColour = ColourMapA[BASE_COLOUR(textColour)].lightest; + uint8_t caretColour = ColourMapA[textColour.colour].lightest; GfxFillRect(dpi, { caret, caret + ScreenCoordsXY{ CONSOLE_CARET_WIDTH, 1 } }, caretColour); } // What about border colours? - uint8_t borderColour1 = ColourMapA[BASE_COLOUR(backgroundColour)].light; - uint8_t borderColour2 = ColourMapA[BASE_COLOUR(backgroundColour)].mid_dark; + uint8_t borderColour1 = ColourMapA[backgroundColour.colour].light; + uint8_t borderColour2 = ColourMapA[backgroundColour.colour].mid_dark; // Input area top border GfxFillRect( diff --git a/src/openrct2-ui/interface/Objective.cpp b/src/openrct2-ui/interface/Objective.cpp index 0e48b81c95..76c12071d5 100644 --- a/src/openrct2-ui/interface/Objective.cpp +++ b/src/openrct2-ui/interface/Objective.cpp @@ -10,8 +10,8 @@ #include "Objective.h" #include +#include #include -#include #include #include #include diff --git a/src/openrct2-ui/interface/Theme.cpp b/src/openrct2-ui/interface/Theme.cpp index c57bfa333a..13c66211c4 100644 --- a/src/openrct2-ui/interface/Theme.cpp +++ b/src/openrct2-ui/interface/Theme.cpp @@ -11,6 +11,7 @@ #include "Theme.h" +#include "../UiStringIds.h" #include "Window.h" #include @@ -33,6 +34,8 @@ using namespace OpenRCT2; +static constexpr uint8_t kCurrentThemeVersion = 1; + struct WindowThemeDesc; /** @@ -40,7 +43,7 @@ struct WindowThemeDesc; */ struct WindowTheme { - colour_t Colours[6]; + ColourWithFlags Colours[6]; }; /** @@ -55,7 +58,7 @@ struct UIThemeWindowEntry /** * @note json is deliberately left non-const: json_t behaviour changes when const */ - static UIThemeWindowEntry FromJson(const WindowThemeDesc* wtDesc, json_t& json); + static UIThemeWindowEntry FromJson(const WindowThemeDesc* wtDesc, json_t& json, uint8_t version); }; /** @@ -114,74 +117,84 @@ struct WindowThemeDesc #define TWINDOW(window_class, window_name, window_string_id, theme) { window_class, window_name, window_string_id, theme } +static constexpr ColourWithFlags opaque(colour_t colour) +{ + return ColourWithFlags{ colour }; +} +static constexpr ColourWithFlags translucent(colour_t colour) +{ + return ColourWithFlags{ colour, EnumToFlag(ColourFlag::translucent) }; +} + static constexpr WindowThemeDesc WindowThemeDescriptors[] = { // WindowClass WindowClassSZ WindowName NumColours, DefaultTheme - { WindowClass::TopToolbar, "WC_TOP_TOOLBAR", STR_THEMES_WINDOW_TOP_TOOLBAR, COLOURS_4(COLOUR_LIGHT_BLUE, COLOUR_DARK_GREEN, COLOUR_DARK_BROWN, COLOUR_GREY ) }, - { WindowClass::BottomToolbar, "WC_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR, COLOURS_4(TRANSLUCENT(COLOUR_DARK_GREEN), TRANSLUCENT(COLOUR_DARK_GREEN), COLOUR_BLACK, COLOUR_BRIGHT_GREEN ) }, - { WindowClass::Ride, "WC_RIDE", STR_THEMES_WINDOW_RIDE, COLOURS_3(COLOUR_GREY, COLOUR_BORDEAUX_RED, COLOUR_SATURATED_GREEN ) }, - { WindowClass::RideConstruction, "WC_RIDE_CONSTRUCTION", STR_THEMES_WINDOW_RIDE_CONSTRUCTION, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::RideList, "WC_RIDE_LIST", STR_THEMES_WINDOW_RIDE_LIST, COLOURS_3(COLOUR_GREY, COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED ) }, - { WindowClass::SavePrompt, "WC_SAVE_PROMPT", STR_THEMES_WINDOW_SAVE_PROMPT, COLOURS_1(TRANSLUCENT(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::ConstructRide, "WC_CONSTRUCT_RIDE", STR_THEMES_WINDOW_CONSTRUCT_RIDE, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED ) }, - { WindowClass::DemolishRidePrompt, "WC_DEMOLISH_RIDE_PROMPT", STR_THEMES_WINDOW_DEMOLISH_RIDE_PROMPT, COLOURS_1(TRANSLUCENT(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::Scenery, "WC_SCENERY", STR_THEMES_WINDOW_SCENERY, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_GREEN, COLOUR_DARK_GREEN ) }, - { WindowClass::SceneryScatter, "WC_SCENERY_SCATTER", STR_THEMES_WINDOW_SCENERY_SCATTER, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_GREEN, COLOUR_DARK_GREEN ) }, - { WindowClass::Options, "WC_OPTIONS", STR_THEMES_WINDOW_OPTIONS, COLOURS_3(COLOUR_GREY, COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::AssetPacks, "WC_ASSET_PACKS", STR_ASSET_PACKS, COLOURS_3(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::Footpath, "WC_FOOTPATH", STR_THEMES_WINDOW_FOOTPATH, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::Land, "WC_LAND", STR_THEMES_WINDOW_LAND, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::Water, "WC_WATER", STR_THEMES_WINDOW_WATER, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::Peep, "WC_PEEP", STR_THEMES_WINDOW_PEEP, COLOURS_3(COLOUR_GREY, COLOUR_OLIVE_GREEN, COLOUR_OLIVE_GREEN ) }, - { WindowClass::GuestList, "WC_GUEST_LIST", STR_THEMES_WINDOW_GUEST_LIST, COLOURS_3(COLOUR_GREY, COLOUR_OLIVE_GREEN, COLOUR_OLIVE_GREEN ) }, - { WindowClass::StaffList, "WC_STAFF_LIST", STR_THEMES_WINDOW_STAFF_LIST, COLOURS_3(COLOUR_GREY, COLOUR_LIGHT_PURPLE, COLOUR_LIGHT_PURPLE ) }, - { WindowClass::FirePrompt, "WC_FIRE_PROMPT", STR_THEMES_WINDOW_FIRE_PROMPT, COLOURS_1(TRANSLUCENT(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::ParkInformation, "WC_PARK_INFORMATION", STR_THEMES_WINDOW_PARK_INFORMATION, COLOURS_3(COLOUR_GREY, COLOUR_DARK_YELLOW, COLOUR_DARK_YELLOW ) }, - { WindowClass::Finances, "WC_FINANCES", STR_THEMES_WINDOW_FINANCES, COLOURS_3(COLOUR_GREY, COLOUR_DARK_YELLOW, COLOUR_DARK_YELLOW ) }, - { WindowClass::TitleMenu, "WC_TITLE_MENU", STR_THEMES_WINDOW_TITLE_MENU_BUTTONS, COLOURS_3(TRANSLUCENT(COLOUR_DARK_GREEN), TRANSLUCENT(COLOUR_DARK_GREEN), TRANSLUCENT(COLOUR_DARK_GREEN) ) }, - { WindowClass::TitleExit, "WC_TITLE_EXIT", STR_THEMES_WINDOW_TITLE_MENU_EXIT, COLOURS_3(TRANSLUCENT(COLOUR_DARK_GREEN), TRANSLUCENT(COLOUR_DARK_GREEN), TRANSLUCENT(COLOUR_DARK_GREEN) ) }, - { WindowClass::RecentNews, "WC_RECENT_NEWS", STR_THEMES_WINDOW_RECENT_NEWS, COLOURS_3(COLOUR_GREY, COLOUR_GREY, COLOUR_BLACK ) }, - { WindowClass::ScenarioSelect, "WC_SCENARIO_SELECT", STR_THEMES_WINDOW_TITLE_MENU_SCENARIO_SELECTION, COLOURS_3(COLOUR_GREY, COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED ) }, - { WindowClass::TrackDesignList, "WC_TRACK_DESIGN_LIST", STR_THEMES_WINDOW_TRACK_DESIGN_LIST, COLOURS_3(COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED ) }, - { WindowClass::TrackDesignPlace, "WC_TRACK_DESIGN_PLACE", STR_THEMES_WINDOW_TRACK_DESIGN_PLACE, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::NewCampaign, "WC_NEW_CAMPAIGN", STR_THEMES_WINDOW_NEW_CAMPAIGN, COLOURS_3(COLOUR_DARK_YELLOW, COLOUR_DARK_YELLOW, COLOUR_DARK_YELLOW ) }, - { WindowClass::KeyboardShortcutList, "WC_KEYBOARD_SHORTCUT_LIST", STR_THEMES_WINDOW_KEYBOARD_SHORTCUT_LIST, COLOURS_3(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::ChangeKeyboardShortcut, "WC_CHANGE_KEYBOARD_SHORTCUT", STR_THEMES_WINDOW_CHANGE_KEYBOARD_SHORTCUT, COLOURS_3(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::ResetShortcutKeysPrompt, "WC_RESET_SHORTCUT_KEYS_PROMPT", STR_SHORTCUT_ACTION_RESET, COLOURS_1(TRANSLUCENT(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::Map, "WC_MAP", STR_THEMES_WINDOW_MAP, COLOURS_2(COLOUR_DARK_GREEN, COLOUR_DARK_BROWN ) }, - { WindowClass::Banner, "WC_BANNER", STR_THEMES_WINDOW_BANNER, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::EditorObjectSelection, "WC_EDITOR_OBJECT_SELECTION", STR_THEMES_WINDOW_EDITOR_OBJECT_SELECTION, COLOURS_3(COLOUR_LIGHT_PURPLE, COLOUR_GREY, COLOUR_GREY ) }, - { WindowClass::EditorInventionList, "WC_EDITOR_INVENTION_LIST", STR_THEMES_WINDOW_EDITOR_INVENTION_LIST, COLOURS_3(COLOUR_LIGHT_PURPLE, COLOUR_GREY, COLOUR_GREY ) }, - { WindowClass::EditorScenarioOptions, "WC_EDITOR_SCENARIO_OPTIONS", STR_THEMES_WINDOW_EDITOR_SCENARIO_OPTIONS, COLOURS_3(COLOUR_LIGHT_PURPLE, COLOUR_GREY, COLOUR_GREY ) }, - { WindowClass::EditorObjectiveOptions, "WC_EDITOR_OBJECTIVE_OPTIONS", STR_THEMES_WINDOW_EDTIOR_OBJECTIVE_OPTIONS, COLOURS_3(COLOUR_LIGHT_PURPLE, COLOUR_GREY, COLOUR_GREY ) }, - { WindowClass::ManageTrackDesign, "WC_MANAGE_TRACK_DESIGN", STR_THEMES_WINDOW_MANAGE_TRACK_DESIGN, COLOURS_3(COLOUR_GREY, COLOUR_GREY, COLOUR_GREY ) }, - { WindowClass::TrackDeletePrompt, "WC_TRACK_DELETE_PROMPT", STR_THEMES_WINDOW_TRACK_DELETE_PROMPT, COLOURS_3(COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED ) }, - { WindowClass::InstallTrack, "WC_INSTALL_TRACK", STR_THEMES_WINDOW_INSTALL_TRACK, COLOURS_3(COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED ) }, - { WindowClass::ClearScenery, "WC_CLEAR_SCENERY", STR_THEMES_WINDOW_CLEAR_SCENERY, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::Cheats, "WC_CHEATS", STR_CHEAT_TITLE, COLOURS_2(COLOUR_GREY, COLOUR_DARK_YELLOW ) }, - { WindowClass::Research, "WC_RESEARCH", STR_THEMES_WINDOW_RESEARCH, COLOURS_3(COLOUR_GREY, COLOUR_DARK_YELLOW, COLOUR_DARK_YELLOW ) }, - { WindowClass::Viewport, "WC_VIEWPORT", STR_THEMES_WINDOW_VIEWPORT, COLOURS_3(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::Mapgen, "WC_MAPGEN", STR_THEMES_WINDOW_MAPGEN, COLOURS_3(COLOUR_DARK_GREEN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN ) }, - { WindowClass::Loadsave, "WC_LOADSAVE", STR_THEMES_WINDOW_LOADSAVE, COLOURS_3(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { 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(COLOUR_DARK_YELLOW, COLOUR_DARK_YELLOW, COLOUR_DARK_YELLOW ) }, - { WindowClass::Themes, "WC_THEMES", STR_THEMES_WINDOW_THEMES, COLOURS_3(COLOUR_GREY, COLOUR_DARK_GREEN, COLOUR_DARK_GREEN ) }, - { WindowClass::Staff, "WC_STAFF", STR_THEMES_WINDOW_STAFF, COLOURS_3(COLOUR_GREY, COLOUR_LIGHT_PURPLE, COLOUR_LIGHT_PURPLE ) }, - { WindowClass::EditorTrackBottomToolbar, "WC_EDITOR_TRACK_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR_TRACK_EDITOR, COLOURS_3(TRANSLUCENT(COLOUR_LIGHT_BLUE), TRANSLUCENT(COLOUR_LIGHT_BLUE), TRANSLUCENT(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::EditorScenarioBottomToolbar, "WC_EDITOR_SCENARIO_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR_SCENARIO_EDITOR, COLOURS_3(TRANSLUCENT(COLOUR_LIGHT_BROWN), TRANSLUCENT(COLOUR_LIGHT_BROWN), TRANSLUCENT(COLOUR_MOSS_GREEN) ) }, - { WindowClass::TileInspector, "WC_TILE_INSPECTOR", STR_TILE_INSPECTOR_TITLE, COLOURS_2(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::ViewClipping, "WC_VIEW_CLIPPING", STR_VIEW_CLIPPING_TITLE, COLOURS_1(COLOUR_DARK_GREEN ) }, - { WindowClass::PatrolArea, "WC_PATROL_AREA", STR_SET_PATROL_AREA, COLOURS_3(COLOUR_LIGHT_PURPLE, COLOUR_LIGHT_PURPLE, COLOUR_LIGHT_PURPLE ) }, - { WindowClass::Transparency, "WC_TRANSPARENCY", STR_TRANSPARENCY_OPTIONS_TITLE, COLOURS_3(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::About, "WC_ABOUT", STR_ABOUT, COLOURS_2(COLOUR_GREY, COLOUR_LIGHT_BLUE ) }, - { WindowClass::Changelog, "WC_CHANGELOG", STR_CHANGELOG_TITLE, COLOURS_2(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::Multiplayer, "WC_MULTIPLAYER", STR_MULTIPLAYER, COLOURS_3(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::Player, "WC_PLAYER", STR_THEMES_WINDOW_PLAYER, COLOURS_3(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::NetworkStatus, "WC_NETWORK_STATUS", STR_THEMES_WINDOW_NETWORK_STATUS, COLOURS_1(COLOUR_LIGHT_BLUE ) }, - { WindowClass::ServerList, "WC_SERVER_LIST", STR_SERVER_LIST, COLOURS_2(COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE ) }, - { WindowClass::Chat, "WC_CHAT", STR_CHAT, COLOURS_1(TRANSLUCENT(COLOUR_GREY) ) }, - { WindowClass::Console, "WC_CONSOLE", STR_CONSOLE, COLOURS_2(TRANSLUCENT(COLOUR_LIGHT_BLUE), COLOUR_WHITE ) }, + { WindowClass::TopToolbar, "WC_TOP_TOOLBAR", STR_THEMES_WINDOW_TOP_TOOLBAR, COLOURS_4(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_GREY) ) }, + { WindowClass::BottomToolbar, "WC_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR, COLOURS_4(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), opaque(COLOUR_BLACK), opaque(COLOUR_BRIGHT_GREEN) ) }, + { WindowClass::Ride, "WC_RIDE", STR_THEMES_WINDOW_RIDE, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_SATURATED_GREEN) ) }, + { WindowClass::RideConstruction, "WC_RIDE_CONSTRUCTION", STR_THEMES_WINDOW_RIDE_CONSTRUCTION, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::RideList, "WC_RIDE_LIST", STR_THEMES_WINDOW_RIDE_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::SavePrompt, "WC_SAVE_PROMPT", STR_THEMES_WINDOW_SAVE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::ConstructRide, "WC_CONSTRUCT_RIDE", STR_THEMES_WINDOW_CONSTRUCT_RIDE, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::DemolishRidePrompt, "WC_DEMOLISH_RIDE_PROMPT", STR_THEMES_WINDOW_DEMOLISH_RIDE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::Scenery, "WC_SCENERY", STR_THEMES_WINDOW_SCENERY, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::SceneryScatter, "WC_SCENERY_SCATTER", STR_THEMES_WINDOW_SCENERY_SCATTER, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::Options, "WC_OPTIONS", STR_THEMES_WINDOW_OPTIONS, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::AssetPacks, "WC_ASSET_PACKS", STR_ASSET_PACKS, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::Footpath, "WC_FOOTPATH", STR_THEMES_WINDOW_FOOTPATH, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::Land, "WC_LAND", STR_THEMES_WINDOW_LAND, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::Water, "WC_WATER", STR_THEMES_WINDOW_WATER, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::Peep, "WC_PEEP", STR_THEMES_WINDOW_PEEP, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_OLIVE_GREEN), opaque(COLOUR_OLIVE_GREEN) ) }, + { WindowClass::GuestList, "WC_GUEST_LIST", STR_THEMES_WINDOW_GUEST_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_OLIVE_GREEN), opaque(COLOUR_OLIVE_GREEN) ) }, + { WindowClass::StaffList, "WC_STAFF_LIST", STR_THEMES_WINDOW_STAFF_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, + { WindowClass::FirePrompt, "WC_FIRE_PROMPT", STR_THEMES_WINDOW_FIRE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::ParkInformation, "WC_PARK_INFORMATION", STR_THEMES_WINDOW_PARK_INFORMATION, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::Finances, "WC_FINANCES", STR_THEMES_WINDOW_FINANCES, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::TitleMenu, "WC_TITLE_MENU", STR_THEMES_WINDOW_TITLE_MENU_BUTTONS, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, + { WindowClass::TitleExit, "WC_TITLE_EXIT", STR_THEMES_WINDOW_TITLE_MENU_EXIT, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, + { WindowClass::RecentNews, "WC_RECENT_NEWS", STR_THEMES_WINDOW_RECENT_NEWS, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK) ) }, + { WindowClass::ScenarioSelect, "WC_SCENARIO_SELECT", STR_THEMES_WINDOW_TITLE_MENU_SCENARIO_SELECTION, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::TrackDesignList, "WC_TRACK_DESIGN_LIST", STR_THEMES_WINDOW_TRACK_DESIGN_LIST, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::TrackDesignPlace, "WC_TRACK_DESIGN_PLACE", STR_THEMES_WINDOW_TRACK_DESIGN_PLACE, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::NewCampaign, "WC_NEW_CAMPAIGN", STR_THEMES_WINDOW_NEW_CAMPAIGN, COLOURS_3(opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::KeyboardShortcutList, "WC_KEYBOARD_SHORTCUT_LIST", STR_THEMES_WINDOW_KEYBOARD_SHORTCUT_LIST, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::ChangeKeyboardShortcut, "WC_CHANGE_KEYBOARD_SHORTCUT", STR_THEMES_WINDOW_CHANGE_KEYBOARD_SHORTCUT, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::ResetShortcutKeysPrompt, "WC_RESET_SHORTCUT_KEYS_PROMPT", STR_SHORTCUT_ACTION_RESET, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::Map, "WC_MAP", STR_THEMES_WINDOW_MAP, COLOURS_2(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::Banner, "WC_BANNER", STR_THEMES_WINDOW_BANNER, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::EditorObjectSelection, "WC_EDITOR_OBJECT_SELECTION", STR_THEMES_WINDOW_EDITOR_OBJECT_SELECTION, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::EditorInventionList, "WC_EDITOR_INVENTION_LIST", STR_THEMES_WINDOW_EDITOR_INVENTION_LIST, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::EditorScenarioOptions, "WC_EDITOR_SCENARIO_OPTIONS", STR_THEMES_WINDOW_EDITOR_SCENARIO_OPTIONS, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::EditorObjectiveOptions, "WC_EDITOR_OBJECTIVE_OPTIONS", STR_THEMES_WINDOW_EDTIOR_OBJECTIVE_OPTIONS, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::ManageTrackDesign, "WC_MANAGE_TRACK_DESIGN", STR_THEMES_WINDOW_MANAGE_TRACK_DESIGN, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::TrackDeletePrompt, "WC_TRACK_DELETE_PROMPT", STR_THEMES_WINDOW_TRACK_DELETE_PROMPT, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::InstallTrack, "WC_INSTALL_TRACK", STR_THEMES_WINDOW_INSTALL_TRACK, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::ClearScenery, "WC_CLEAR_SCENERY", STR_THEMES_WINDOW_CLEAR_SCENERY, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::Cheats, "WC_CHEATS", STR_CHEAT_TITLE, COLOURS_2(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW) ) }, + { 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::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) ) }, + { WindowClass::Themes, "WC_THEMES", STR_THEMES_WINDOW_THEMES, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::Staff, "WC_STAFF", STR_THEMES_WINDOW_STAFF, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, + { WindowClass::EditorTrackBottomToolbar, "WC_EDITOR_TRACK_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR_TRACK_EDITOR, COLOURS_3(translucent(COLOUR_LIGHT_BLUE), translucent(COLOUR_LIGHT_BLUE), translucent(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::EditorScenarioBottomToolbar, "WC_EDITOR_SCENARIO_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR_SCENARIO_EDITOR, COLOURS_3(translucent(COLOUR_LIGHT_BROWN), translucent(COLOUR_LIGHT_BROWN), translucent(COLOUR_MOSS_GREEN) ) }, + { WindowClass::TileInspector, "WC_TILE_INSPECTOR", STR_TILE_INSPECTOR_TITLE, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::ViewClipping, "WC_VIEW_CLIPPING", STR_VIEW_CLIPPING_TITLE, COLOURS_1(opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::PatrolArea, "WC_PATROL_AREA", STR_SET_PATROL_AREA, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, + { WindowClass::Transparency, "WC_TRANSPARENCY", STR_TRANSPARENCY_OPTIONS_TITLE, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::About, "WC_ABOUT", STR_ABOUT, COLOURS_2(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::Changelog, "WC_CHANGELOG", STR_CHANGELOG_TITLE, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::Multiplayer, "WC_MULTIPLAYER", STR_MULTIPLAYER, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::Player, "WC_PLAYER", STR_THEMES_WINDOW_PLAYER, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::NetworkStatus, "WC_NETWORK_STATUS", STR_THEMES_WINDOW_NETWORK_STATUS, COLOURS_1(opaque(COLOUR_BLACK) ) }, + { WindowClass::ServerList, "WC_SERVER_LIST", STR_SERVER_LIST, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::Chat, "WC_CHAT", STR_CHAT, COLOURS_1(translucent(COLOUR_GREY) ) }, + { WindowClass::Console, "WC_CONSOLE", STR_CONSOLE, COLOURS_2(translucent(COLOUR_LIGHT_BLUE), opaque(COLOUR_WHITE) ) }, + { WindowClass::ProgressWindow, "WC_PROGRESS_WINDOW", STR_THEME_LOADING_WINDOW, COLOURS_1(opaque(COLOUR_BLACK) ) }, }; #pragma endregion @@ -192,28 +205,28 @@ static constexpr WindowThemeDesc WindowThemeDescriptors[] = static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = { - { WindowClass::TopToolbar, COLOURS_RCT1(COLOUR_GREY, COLOUR_GREY, COLOUR_GREY, COLOUR_GREY, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::BottomToolbar, COLOURS_RCT1(TRANSLUCENT(COLOUR_GREY), TRANSLUCENT(COLOUR_GREY), COLOUR_BLACK, COLOUR_YELLOW, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::Ride, COLOURS_RCT1(COLOUR_BORDEAUX_RED, COLOUR_GREY, COLOUR_SATURATED_GREEN, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::RideList, COLOURS_RCT1(COLOUR_BORDEAUX_RED, COLOUR_GREY, COLOUR_GREY, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::ConstructRide, COLOURS_RCT1(COLOUR_BORDEAUX_RED, COLOUR_GREY, COLOUR_GREY, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::Peep, COLOURS_RCT1(COLOUR_LIGHT_BROWN, COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::GuestList, COLOURS_RCT1(COLOUR_LIGHT_BROWN, COLOUR_BORDEAUX_RED, COLOUR_BORDEAUX_RED, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::StaffList, COLOURS_RCT1(COLOUR_DARK_GREEN, COLOUR_LIGHT_PURPLE, COLOUR_LIGHT_PURPLE, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::Finances, COLOURS_RCT1(COLOUR_LIGHT_PURPLE, COLOUR_GREY, COLOUR_GREY, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::TitleMenu, COLOURS_RCT1(TRANSLUCENT(COLOUR_GREY), TRANSLUCENT(COLOUR_GREY), TRANSLUCENT(COLOUR_GREY), COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::TitleExit, COLOURS_RCT1(TRANSLUCENT(COLOUR_GREY), TRANSLUCENT(COLOUR_GREY), TRANSLUCENT(COLOUR_GREY), COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::NewCampaign, COLOURS_RCT1(COLOUR_LIGHT_PURPLE, COLOUR_LIGHT_PURPLE, COLOUR_GREY, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::TitleOptions, COLOURS_RCT1(TRANSLUCENT(COLOUR_GREY), TRANSLUCENT(COLOUR_GREY), TRANSLUCENT(COLOUR_GREY), COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::Staff, COLOURS_RCT1(COLOUR_DARK_GREEN, COLOUR_LIGHT_PURPLE, COLOUR_LIGHT_PURPLE, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::Options, COLOURS_RCT1(COLOUR_GREY, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::AssetPacks, COLOURS_RCT1(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::KeyboardShortcutList, COLOURS_RCT1(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::ChangeKeyboardShortcut, COLOURS_RCT1(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::TrackDesignList, COLOURS_RCT1(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::Map, COLOURS_RCT1(COLOUR_DARK_BROWN, COLOUR_GREY, COLOUR_GREY, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::About, COLOURS_RCT1(COLOUR_GREY, COLOUR_DARK_BROWN, COLOUR_WHITE, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, - { WindowClass::Changelog, COLOURS_RCT1(COLOUR_DARK_BROWN, COLOUR_DARK_BROWN, COLOUR_WHITE, COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK) }, + { WindowClass::TopToolbar, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::BottomToolbar, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_YELLOW), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::Ride, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_SATURATED_GREEN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::RideList, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::ConstructRide, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::Peep, COLOURS_RCT1(opaque(COLOUR_LIGHT_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::GuestList, COLOURS_RCT1(opaque(COLOUR_LIGHT_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::StaffList, COLOURS_RCT1(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::Finances, COLOURS_RCT1(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::TitleMenu, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::TitleExit, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::NewCampaign, COLOURS_RCT1(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::TitleOptions, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::Staff, COLOURS_RCT1(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::Options, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::AssetPacks, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::KeyboardShortcutList, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::ChangeKeyboardShortcut, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::TrackDesignList, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::Map, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::About, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_WHITE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::Changelog, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_WHITE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, THEME_DEF_END, }; // clang-format on @@ -284,18 +297,20 @@ json_t UIThemeWindowEntry::ToJson() const json_t jsonColours = json_t::array(); for (uint8_t i = 0; i < wtDesc->NumColours; i++) { - colour_t colour = Theme.Colours[i]; - jsonColours.emplace_back(colour); + json_t jsonEntry = { { "colour", Colour::ToString(Theme.Colours[i].colour) }, + { "translucent", Theme.Colours[i].hasFlag(ColourFlag::translucent) } }; + + jsonColours.emplace_back(jsonEntry); } - json_t jsonEntry = { + json_t colourSettingsEntry = { { "colours", jsonColours }, }; - return jsonEntry; + return colourSettingsEntry; } -UIThemeWindowEntry UIThemeWindowEntry::FromJson(const WindowThemeDesc* wtDesc, json_t& jsonData) +UIThemeWindowEntry UIThemeWindowEntry::FromJson(const WindowThemeDesc* wtDesc, json_t& jsonData, uint8_t version) { Guard::Assert(jsonData.is_object(), "UIThemeWindowEntry::FromJson expects parameter jsonData to be object"); @@ -315,7 +330,20 @@ UIThemeWindowEntry UIThemeWindowEntry::FromJson(const WindowThemeDesc* wtDesc, j for (size_t i = 0; i < colourCount; i++) { - result.Theme.Colours[i] = Json::GetNumber(jsonColours[i]); + if (version == 0) + { + auto number = Json::GetNumber(jsonColours[i]); + result.Theme.Colours[i] = ColourWithFlags::fromLegacy(number); + } + else + { + auto colourObject = Json::AsObject(jsonColours[i]); + auto colour = Colour::FromString(Json::GetString(colourObject["colour"]), COLOUR_BLACK); + auto isTranslucent = Json::GetBoolean(colourObject["translucent"], false); + uint8_t flags = isTranslucent ? EnumToFlag(ColourFlag::translucent) : 0; + + result.Theme.Colours[i] = { colour, flags }; + } } return result; @@ -383,6 +411,7 @@ json_t UITheme::ToJson() const // Create theme object json_t jsonTheme = { { "name", Name }, + { "version", kCurrentThemeVersion }, { "entries", jsonEntries }, { "useLightsRide", (Flags & UITHEME_FLAG_USE_LIGHTS_RIDE) != 0 }, { "useLightsPark", (Flags & UITHEME_FLAG_USE_LIGHTS_PARK) != 0 }, @@ -420,6 +449,7 @@ UITheme* UITheme::FromJson(json_t& jsonObj) { ThrowThemeLoadException(); } + auto version = Json::GetNumber(jsonObj["version"], 0); json_t jsonEntries = jsonObj["entries"]; @@ -449,7 +479,7 @@ UITheme* UITheme::FromJson(json_t& jsonObj) continue; } - UIThemeWindowEntry entry = UIThemeWindowEntry::FromJson(wtDesc, jsonValue); + UIThemeWindowEntry entry = UIThemeWindowEntry::FromJson(wtDesc, jsonValue, version); result->SetEntry(&entry); } } @@ -617,9 +647,9 @@ namespace ThemeManager ActiveAvailableThemeIndex = 1; bool configValid = false; - if (!gConfigInterface.CurrentThemePreset.empty()) + if (!Config::Get().interface.CurrentThemePreset.empty()) { - if (LoadThemeByConfigName(gConfigInterface.CurrentThemePreset.c_str())) + if (LoadThemeByConfigName(Config::Get().interface.CurrentThemePreset.c_str())) { configValid = true; } @@ -627,7 +657,7 @@ namespace ThemeManager if (!configValid) { - gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); + Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); } } @@ -709,7 +739,7 @@ void ThemeManagerSetActiveAvailableTheme(size_t index) } } ThemeManager::ActiveAvailableThemeIndex = index; - gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(index); + Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(index); ColourSchemeUpdateAll(); } @@ -728,7 +758,7 @@ size_t ThemeGetIndexForName(const utf8* name) return SIZE_MAX; } -uint8_t ThemeGetColour(WindowClass wc, uint8_t index) +ColourWithFlags ThemeGetColour(WindowClass wc, uint8_t index) { const UIThemeWindowEntry* entry = ThemeManager::CurrentTheme->GetEntry(wc); if (entry == nullptr) @@ -736,7 +766,7 @@ uint8_t ThemeGetColour(WindowClass wc, uint8_t index) const WindowThemeDesc* desc = GetWindowThemeDescriptor(wc); if (desc == nullptr) { - return 0; + return {}; } return desc->DefaultTheme.Colours[index]; } @@ -744,7 +774,7 @@ uint8_t ThemeGetColour(WindowClass wc, uint8_t index) return entry->Theme.Colours[index]; } -void ThemeSetColour(WindowClass wc, uint8_t index, colour_t colour) +void ThemeSetColour(WindowClass wc, uint8_t index, ColourWithFlags colour) { UIThemeWindowEntry entry{}; entry.Class = wc; @@ -770,55 +800,6 @@ void ThemeSetColour(WindowClass wc, uint8_t index, colour_t colour) ThemeSave(); } -// Quick and dirty mapping for new colours to original colours, until flags are extracted from colour upper bits -colour_t ThemeOverrideExtendedColour(colour_t inputColour) -{ - switch (inputColour) - { - case COLOUR_DARK_OLIVE_DARK: - case COLOUR_DARK_OLIVE_LIGHT: - return COLOUR_DARK_OLIVE_GREEN; - case COLOUR_SATURATED_BROWN_LIGHT: - return COLOUR_LIGHT_BROWN; - case COLOUR_BORDEAUX_RED_DARK: - case COLOUR_BORDEAUX_RED_LIGHT: - return COLOUR_BORDEAUX_RED; - case COLOUR_GRASS_GREEN_DARK: - case COLOUR_GRASS_GREEN_LIGHT: - return COLOUR_MOSS_GREEN; - case COLOUR_OLIVE_DARK: - case COLOUR_OLIVE_LIGHT: - return COLOUR_OLIVE_GREEN; - case COLOUR_SATURATED_GREEN_LIGHT: - return COLOUR_BRIGHT_GREEN; - case COLOUR_TAN_DARK: - case COLOUR_TAN_LIGHT: - return COLOUR_SALMON_PINK; - case COLOUR_DULL_PURPLE_LIGHT: - return COLOUR_LIGHT_PURPLE; - case COLOUR_DULL_GREEN_DARK: - case COLOUR_DULL_GREEN_LIGHT: - return COLOUR_DARK_GREEN; - case COLOUR_SATURATED_PURPLE_DARK: - case COLOUR_SATURATED_PURPLE_LIGHT: - return COLOUR_BRIGHT_PURPLE; - case COLOUR_ORANGE_LIGHT: - return COLOUR_LIGHT_ORANGE; - case COLOUR_AQUA_DARK: - return COLOUR_AQUAMARINE; - case COLOUR_MAGENTA_LIGHT: - return COLOUR_BRIGHT_PINK; - case COLOUR_DULL_BROWN_DARK: - case COLOUR_DULL_BROWN_LIGHT: - return COLOUR_DARK_BROWN; - case COLOUR_INVISIBLE: - case COLOUR_VOID: - return COLOUR_BLACK; - default: - return inputColour; - } -} - uint8_t ThemeGetFlags() { return ThemeManager::CurrentTheme->Flags; @@ -854,7 +835,7 @@ void ThemeRename(const utf8* name) if (Path::Equals(newPath, ThemeManager::AvailableThemes[i].Path)) { ThemeManager::ActiveAvailableThemeIndex = i; - gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); + Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); break; } } @@ -879,7 +860,7 @@ void ThemeDuplicate(const utf8* name) if (Path::Equals(newPath, ThemeManager::AvailableThemes[i].Path)) { ThemeManager::ActiveAvailableThemeIndex = i; - gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(i); + Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(i); break; } } @@ -890,7 +871,7 @@ void ThemeDelete() File::Delete(ThemeManager::CurrentThemePath); ThemeManager::LoadTheme(const_cast(&PredefinedThemeRCT2)); ThemeManager::ActiveAvailableThemeIndex = 1; - gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); + Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); } void ThemeManagerInitialise() diff --git a/src/openrct2-ui/interface/Theme.h b/src/openrct2-ui/interface/Theme.h index 2d6399d699..8c5bf8d6f5 100644 --- a/src/openrct2-ui/interface/Theme.h +++ b/src/openrct2-ui/interface/Theme.h @@ -10,6 +10,7 @@ #pragma once #include +#include #include enum @@ -35,9 +36,8 @@ size_t ThemeManagerGetAvailableThemeIndex(); void ThemeManagerSetActiveAvailableTheme(size_t index); size_t ThemeGetIndexForName(const utf8* name); -colour_t ThemeGetColour(WindowClass wc, uint8_t index); -void ThemeSetColour(WindowClass wc, uint8_t index, colour_t colour); -colour_t ThemeOverrideExtendedColour(colour_t inputColour); +ColourWithFlags ThemeGetColour(WindowClass wc, uint8_t index); +void ThemeSetColour(WindowClass wc, uint8_t index, ColourWithFlags colour); uint8_t ThemeGetFlags(); void ThemeSetFlags(uint8_t flags); void ThemeSave(); diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index b11b6b54ea..471c8df2fd 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" #include "../windows/Window.h" #include "Viewport.h" #include "Window.h" diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 1860570802..3a98d5a490 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -9,19 +9,20 @@ #include "Widget.h" -#include "Window.h" - #include #include +#include #include #include -#include +#include #include #include #include #include #include +using namespace OpenRCT2; + static void WidgetFrameDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); static void WidgetResizeDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); static void WidgetButtonDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); @@ -32,15 +33,16 @@ static void WidgetTextCentred(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wid static void WidgetText(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); 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 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); static void WidgetCloseboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); static void WidgetScrollDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); static void WidgetHScrollbarDraw( - DrawPixelInfo& dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour); + DrawPixelInfo& dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, ColourWithFlags colour); static void WidgetVScrollbarDraw( - DrawPixelInfo& dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour); + DrawPixelInfo& dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, ColourWithFlags colour); static void WidgetDrawImage(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); /** @@ -108,6 +110,9 @@ void WidgetDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex) case WindowWidgetType::TextBox: WidgetTextBoxDraw(dpi, w, widgetIndex); break; + case WindowWidgetType::ProgressBar: + WidgetProgressBarDraw(dpi, w, widgetIndex); + break; default: break; } @@ -130,8 +135,7 @@ static void WidgetFrameDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widge // uint8_t press = ((w.flags & WF_10) ? INSET_RECT_FLAG_FILL_MID_LIGHT : 0); - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; // Draw the frame GfxFillRectInset(dpi, { leftTop, { r, b } }, colour, press); @@ -144,7 +148,7 @@ static void WidgetFrameDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widge // Draw the resize sprite at the bottom right corner leftTop = w.windowPos + ScreenCoordsXY{ widget.right - 18, widget.bottom - 18 }; - GfxDrawSprite(dpi, ImageId(SPR_RESIZE, colour & 0x7F), leftTop); + GfxDrawSprite(dpi, ImageId(SPR_RESIZE, colour.colour), leftTop); } /** @@ -161,8 +165,7 @@ static void WidgetResizeDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widg int32_t r = w.windowPos.x + widget.right; int32_t b = w.windowPos.y + widget.bottom; - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; // Draw the panel GfxFillRectInset(dpi, { leftTop, { r, b } }, colour, 0); @@ -175,7 +178,7 @@ static void WidgetResizeDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widg // Draw the resize sprite at the bottom right corner leftTop = w.windowPos + ScreenCoordsXY{ widget.right - 18, widget.bottom - 18 }; - GfxDrawSprite(dpi, ImageId(SPR_RESIZE, colour & 0x7F), leftTop); + GfxDrawSprite(dpi, ImageId(SPR_RESIZE, colour.colour), leftTop); } /** @@ -194,8 +197,7 @@ static void WidgetButtonDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widg // Check if the button is pressed down uint8_t press = WidgetIsPressed(w, widgetIndex) || WidgetIsActiveTool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; if (static_cast(widget.image.ToUInt32()) == -2) { @@ -251,7 +253,7 @@ static void WidgetTabDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetI auto leftTop = w.windowPos + ScreenCoordsXY{ widget.left, widget.top }; // Get the colour and disabled image - auto colour = w.colours[widget.colour] & 0x7F; + auto colour = w.colours[widget.colour].colour; const auto newIndex = widget.image.GetIndex() + 2; auto image = widget.image.WithIndex(newIndex).WithPrimary(colour); @@ -278,8 +280,7 @@ static void WidgetFlatButtonDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex ScreenRect rect{ w.windowPos + ScreenCoordsXY{ widget.left, widget.top }, w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom } }; - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; // Check if the button is pressed down if (WidgetIsPressed(w, widgetIndex) || WidgetIsActiveTool(w, widgetIndex)) @@ -312,8 +313,7 @@ static void WidgetTextButton(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widg ScreenRect rect{ w.windowPos + ScreenCoordsXY{ widget.left, widget.top }, w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom } }; - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; // Border uint8_t press = WidgetIsPressed(w, widgetIndex) || WidgetIsActiveTool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; @@ -342,11 +342,10 @@ static void WidgetTextCentred(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wid if (widget.text == STR_NONE) return; - // Get the colour - colour_t colour = w.colours[widget.colour]; - colour &= ~(COLOUR_FLAG_TRANSLUCENT); + auto colour = w.colours[widget.colour]; + colour.setFlag(ColourFlag::translucent, false); if (WidgetIsDisabled(w, widgetIndex)) - colour |= COLOUR_FLAG_INSET; + colour.setFlag(ColourFlag::inset, true); // Resolve the absolute ltrb auto topLeft = w.windowPos + ScreenCoordsXY{ widget.left, 0 }; @@ -385,13 +384,12 @@ static void WidgetText(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetInde // Get the widget const auto& widget = w.widgets[widgetIndex]; - if (widget.text == STR_NONE || widget.text == STR_VIEWPORT) + if (widget.text == STR_NONE || widget.content == kWidgetContentEmpty) return; - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; if (WidgetIsDisabled(w, widgetIndex)) - colour |= COLOUR_FLAG_INSET; + colour.setFlag(ColourFlag::inset, true); // Resolve the absolute ltrb int32_t l = w.windowPos.x + widget.left; @@ -438,8 +436,7 @@ static void WidgetTextInset(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widge ScreenRect rect{ w.windowPos + ScreenCoordsXY{ widget.left, widget.top }, w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom } }; - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; GfxFillRectInset(dpi, rect, colour, INSET_RECT_F_60); WidgetText(dpi, w, widgetIndex); @@ -483,9 +480,9 @@ static void WidgetGroupboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wi auto [stringId, formatArgs] = WidgetGetStringidAndArgs(widget); if (stringId != STR_NONE) { - uint8_t colour = w.colours[widget.colour] & 0x7F; + auto colour = w.colours[widget.colour].withFlag(ColourFlag::translucent, false); if (WidgetIsDisabled(w, widgetIndex)) - colour |= COLOUR_FLAG_INSET; + colour.setFlag(ColourFlag::inset, true); utf8 buffer[512] = { 0 }; OpenRCT2::FormatStringLegacy(buffer, sizeof(buffer), stringId, formatArgs); @@ -502,8 +499,7 @@ static void WidgetGroupboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wi const auto r = w.windowPos.x + widget.right; const auto b = w.windowPos.y + widget.bottom; - // Get the colour - uint8_t colour = w.colours[widget.colour] & 0x7F; + uint8_t colour = w.colours[widget.colour].colour; // Border left of text GfxFillRect(dpi, { { l, t }, { l + 4, t } }, ColourMapA[colour].mid_dark); @@ -539,8 +535,7 @@ static void WidgetCaptionDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wid auto topLeft = w.windowPos + ScreenCoordsXY{ widget->left, widget->top }; auto bottomRight = w.windowPos + ScreenCoordsXY{ widget->right, widget->bottom }; - // Get the colour - uint8_t colour = w.colours[widget->colour]; + auto colour = w.colours[widget->colour]; uint8_t press = INSET_RECT_F_60; if (w.flags & WF_10) @@ -549,9 +544,10 @@ static void WidgetCaptionDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wid GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, press); // Black caption bars look slightly green, this fixes that - if (colour == 0) + if (colour.colour == COLOUR_BLACK) GfxFillRect( - dpi, { { topLeft + ScreenCoordsXY{ 1, 1 } }, { bottomRight - ScreenCoordsXY{ 1, 1 } } }, ColourMapA[colour].dark); + dpi, { { topLeft + ScreenCoordsXY{ 1, 1 } }, { bottomRight - ScreenCoordsXY{ 1, 1 } } }, + ColourMapA[colour.colour].dark); else GfxFilterRect( dpi, { { topLeft + ScreenCoordsXY{ 1, 1 } }, { bottomRight - ScreenCoordsXY{ 1, 1 } } }, @@ -565,17 +561,17 @@ static void WidgetCaptionDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wid int32_t width = widget->width() - 4; if ((widget + 1)->type == WindowWidgetType::CloseBox) { - width -= CloseButtonWidth; + width -= kCloseButtonWidth; if ((widget + 2)->type == WindowWidgetType::CloseBox) - width -= CloseButtonWidth; + width -= kCloseButtonWidth; } topLeft.x += width / 2; - if (gConfigInterface.WindowButtonsOnTheLeft) - topLeft.x += CloseButtonWidth; + if (Config::Get().interface.WindowButtonsOnTheLeft) + topLeft.x += kCloseButtonWidth; DrawTextEllipsised( dpi, topLeft, width, widget->text, Formatter::Common(), - { COLOUR_WHITE | static_cast(COLOUR_FLAG_OUTLINE), TextAlignment::CENTRE }); + { ColourWithFlags{ COLOUR_WHITE }.withFlag(ColourFlag::withOutline, true), TextAlignment::CENTRE }); } /** @@ -598,8 +594,7 @@ static void WidgetCloseboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wi if (WidgetIsPressed(w, widgetIndex) || WidgetIsActiveTool(w, widgetIndex)) press |= INSET_RECT_FLAG_BORDER_INSET; - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; // Draw the button GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, press); @@ -610,7 +605,8 @@ static void WidgetCloseboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wi topLeft = w.windowPos + ScreenCoordsXY{ widget.midX() - 1, std::max(widget.top, widget.midY() - 5) }; if (WidgetIsDisabled(w, widgetIndex)) - colour |= COLOUR_FLAG_INSET; + colour.setFlag(ColourFlag::inset, true); + ; DrawTextEllipsised(dpi, topLeft, widget.width() - 2, widget.text, Formatter::Common(), { colour, TextAlignment::CENTRE }); } @@ -629,23 +625,22 @@ static void WidgetCheckboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wi ScreenCoordsXY bottomRight = w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom }; ScreenCoordsXY midLeft = { topLeft.x, (topLeft.y + bottomRight.y) / 2 }; - // Get the colour - colour_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; // checkbox GfxFillRectInset(dpi, { midLeft - ScreenCoordsXY{ 0, 5 }, midLeft + ScreenCoordsXY{ 9, 4 } }, colour, INSET_RECT_F_60); if (WidgetIsDisabled(w, widgetIndex)) { - colour |= COLOUR_FLAG_INSET; + colour.setFlag(ColourFlag::inset, true); } // fill it when checkbox is pressed if (WidgetIsPressed(w, widgetIndex)) { - GfxDrawString( - dpi, { midLeft - ScreenCoordsXY{ 0, 5 } }, static_cast(CheckBoxMarkString), - { static_cast(NOT_TRANSLUCENT(colour)) }); + DrawText( + dpi, { midLeft - ScreenCoordsXY{ 0, 5 } }, { colour.withFlag(ColourFlag::translucent, false) }, + static_cast(CheckBoxMarkString)); } // draw the text @@ -671,8 +666,7 @@ static void WidgetScrollDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widg ScreenCoordsXY topLeft = w.windowPos + ScreenCoordsXY{ widget.left, widget.top }; ScreenCoordsXY bottomRight = w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom }; - // Get the colour - uint8_t colour = w.colours[widget.colour]; + auto colour = w.colours[widget.colour]; // Draw the border GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, INSET_RECT_F_60); @@ -729,23 +723,25 @@ static void WidgetScrollDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widg } static void WidgetHScrollbarDraw( - DrawPixelInfo& dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour) + DrawPixelInfo& dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, ColourWithFlags colour) { - colour &= 0x7F; + colour.setFlag(ColourFlag::translucent, false); + // Trough - GfxFillRect(dpi, { { l + kScrollBarWidth, t }, { r - kScrollBarWidth, b } }, ColourMapA[colour].lighter); - GfxFillRect(dpi, { { l + kScrollBarWidth, t }, { r - kScrollBarWidth, b } }, 0x1000000 | ColourMapA[colour].mid_dark); - GfxFillRect(dpi, { { l + kScrollBarWidth, t + 2 }, { r - kScrollBarWidth, t + 2 } }, ColourMapA[colour].mid_dark); - GfxFillRect(dpi, { { l + kScrollBarWidth, t + 3 }, { r - kScrollBarWidth, t + 3 } }, ColourMapA[colour].lighter); - GfxFillRect(dpi, { { l + kScrollBarWidth, t + 7 }, { r - kScrollBarWidth, t + 7 } }, ColourMapA[colour].mid_dark); - GfxFillRect(dpi, { { l + kScrollBarWidth, t + 8 }, { r - kScrollBarWidth, t + 8 } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l + kScrollBarWidth, t }, { r - kScrollBarWidth, b } }, ColourMapA[colour.colour].lighter); + GfxFillRect( + dpi, { { l + kScrollBarWidth, t }, { r - kScrollBarWidth, b } }, 0x1000000 | ColourMapA[colour.colour].mid_dark); + GfxFillRect(dpi, { { l + kScrollBarWidth, t + 2 }, { r - kScrollBarWidth, t + 2 } }, ColourMapA[colour.colour].mid_dark); + GfxFillRect(dpi, { { l + kScrollBarWidth, t + 3 }, { r - kScrollBarWidth, t + 3 } }, ColourMapA[colour.colour].lighter); + GfxFillRect(dpi, { { l + kScrollBarWidth, t + 7 }, { r - kScrollBarWidth, t + 7 } }, ColourMapA[colour.colour].mid_dark); + GfxFillRect(dpi, { { l + kScrollBarWidth, t + 8 }, { r - kScrollBarWidth, t + 8 } }, ColourMapA[colour.colour].lighter); // Left button { uint8_t flags = (scroll.flags & HSCROLLBAR_LEFT_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0; GfxFillRectInset(dpi, { { l, t }, { l + (kScrollBarWidth - 1), b } }, colour, flags); - GfxDrawString(dpi, { l + 1, t }, static_cast(BlackLeftArrowString), {}); + DrawText(dpi, { l + 1, t }, {}, static_cast(BlackLeftArrowString)); } // Thumb @@ -762,40 +758,42 @@ static void WidgetHScrollbarDraw( uint8_t flags = (scroll.flags & HSCROLLBAR_RIGHT_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0; GfxFillRectInset(dpi, { { r - (kScrollBarWidth - 1), t }, { r, b } }, colour, flags); - GfxDrawString(dpi, { r - 6, t }, static_cast(BlackRightArrowString), {}); + DrawText(dpi, { r - 6, t }, {}, static_cast(BlackRightArrowString)); } } static void WidgetVScrollbarDraw( - DrawPixelInfo& dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour) + DrawPixelInfo& dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, ColourWithFlags colour) { - colour &= 0x7F; + colour.setFlag(ColourFlag::translucent, false); + // Trough - GfxFillRect(dpi, { { l, t + kScrollBarWidth }, { r, b - kScrollBarWidth } }, ColourMapA[colour].lighter); - GfxFillRect(dpi, { { l, t + kScrollBarWidth }, { r, b - kScrollBarWidth } }, 0x1000000 | ColourMapA[colour].mid_dark); - GfxFillRect(dpi, { { l + 2, t + kScrollBarWidth }, { l + 2, b - kScrollBarWidth } }, ColourMapA[colour].mid_dark); - GfxFillRect(dpi, { { l + 3, t + kScrollBarWidth }, { l + 3, b - kScrollBarWidth } }, ColourMapA[colour].lighter); - GfxFillRect(dpi, { { l + 7, t + kScrollBarWidth }, { l + 7, b - kScrollBarWidth } }, ColourMapA[colour].mid_dark); - GfxFillRect(dpi, { { l + 8, t + kScrollBarWidth }, { l + 8, b - kScrollBarWidth } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l, t + kScrollBarWidth }, { r, b - kScrollBarWidth } }, ColourMapA[colour.colour].lighter); + GfxFillRect( + dpi, { { l, t + kScrollBarWidth }, { r, b - kScrollBarWidth } }, 0x1000000 | ColourMapA[colour.colour].mid_dark); + GfxFillRect(dpi, { { l + 2, t + kScrollBarWidth }, { l + 2, b - kScrollBarWidth } }, ColourMapA[colour.colour].mid_dark); + GfxFillRect(dpi, { { l + 3, t + kScrollBarWidth }, { l + 3, b - kScrollBarWidth } }, ColourMapA[colour.colour].lighter); + GfxFillRect(dpi, { { l + 7, t + kScrollBarWidth }, { l + 7, b - kScrollBarWidth } }, ColourMapA[colour.colour].mid_dark); + GfxFillRect(dpi, { { l + 8, t + kScrollBarWidth }, { l + 8, b - kScrollBarWidth } }, ColourMapA[colour.colour].lighter); // Up button GfxFillRectInset( dpi, { { l, t }, { r, t + (kScrollBarWidth - 1) } }, colour, ((scroll.flags & VSCROLLBAR_UP_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0)); - GfxDrawString(dpi, { l + 1, t - 1 }, static_cast(BlackUpArrowString), {}); + DrawText(dpi, { l + 1, t - 1 }, {}, static_cast(BlackUpArrowString)); // Thumb GfxFillRectInset( dpi, { { l, std::max(t + kScrollBarWidth, t + scroll.v_thumb_top - 1) }, { r, std::min(b - kScrollBarWidth, t + scroll.v_thumb_bottom - 1) } }, - colour, ((scroll.flags & VSCROLLBAR_THUMB_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0)); + { colour }, ((scroll.flags & VSCROLLBAR_THUMB_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0)); // Down button GfxFillRectInset( dpi, { { l, b - (kScrollBarWidth - 1) }, { r, b } }, colour, ((scroll.flags & VSCROLLBAR_DOWN_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0)); - GfxDrawString(dpi, { l + 1, b - (kScrollBarWidth - 1) }, static_cast(BlackDownArrowString), {}); + DrawText(dpi, { l + 1, b - (kScrollBarWidth - 1) }, {}, static_cast(BlackDownArrowString)); } /** @@ -815,25 +813,21 @@ static void WidgetDrawImage(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widge // Resolve the absolute ltrb auto screenCoords = w.windowPos + ScreenCoordsXY{ widget.left, widget.top }; - // Get the colour - uint8_t colour = NOT_TRANSLUCENT(w.colours[widget.colour]); - if (widget.type == WindowWidgetType::ColourBtn || widget.type == WindowWidgetType::TrnBtn || widget.type == WindowWidgetType::Tab) if (WidgetIsPressed(w, widgetIndex) || WidgetIsActiveTool(w, widgetIndex)) image = image.WithIndexOffset(1); + const auto colour = w.colours[widget.colour].colour; if (WidgetIsDisabled(w, widgetIndex)) { // Draw greyed out (light border bottom right shadow) - colour = w.colours[widget.colour]; - colour = ColourMapA[NOT_TRANSLUCENT(colour)].lighter; - GfxDrawSpriteSolid(dpi, image, screenCoords + ScreenCoordsXY{ 1, 1 }, colour); + auto mappedColour = ColourMapA[colour].lighter; + GfxDrawSpriteSolid(dpi, image, screenCoords + ScreenCoordsXY{ 1, 1 }, mappedColour); // Draw greyed out (dark) - colour = w.colours[widget.colour]; - colour = ColourMapA[NOT_TRANSLUCENT(colour)].mid_light; - GfxDrawSpriteSolid(dpi, image, screenCoords, colour); + mappedColour = ColourMapA[colour].mid_light; + GfxDrawSpriteSolid(dpi, image, screenCoords, mappedColour); } else { @@ -1133,15 +1127,12 @@ static void WidgetTextBoxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wid ScreenCoordsXY topLeft{ w.windowPos + ScreenCoordsXY{ widget.left, widget.top } }; ScreenCoordsXY bottomRight{ w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom } }; - // Get the colour - uint8_t colour = w.colours[widget.colour]; - auto& tbIdent = OpenRCT2::Ui::Windows::GetCurrentTextBox(); bool active = w.classification == tbIdent.window.classification && w.number == tbIdent.window.number && widgetIndex == tbIdent.widget_index; // GfxFillRectInset(dpi, l, t, r, b, colour, 0x20 | (!active ? 0x40 : 0x00)); - GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, INSET_RECT_F_60); + GfxFillRectInset(dpi, { topLeft, bottomRight }, w.colours[widget.colour], INSET_RECT_F_60); // Figure out where the text should be positioned vertically. topLeft.y = w.windowPos.y + widget.textTop(); @@ -1178,17 +1169,49 @@ static void WidgetTextBoxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wid // Make a new 1 character wide string for measuring the width // of the character that the cursor is under. (NOTE: this is broken for multi byte utf8 codepoints) width = std::max( - GfxGetStringWidthNoFormatting(u8string{ textInput->Buffer[textInput->SelectionStart] }, FontStyle::Medium) - 2, 4); + GfxGetStringWidthNoFormatting(u8string{ (*textInput->Buffer)[textInput->SelectionStart] }, FontStyle::Medium) - 2, + 4); } if (OpenRCT2::Ui::Windows::TextBoxCaretIsFlashed()) { - colour = ColourMapA[w.colours[1]].mid_light; + auto colour = ColourMapA[w.colours[1].colour].mid_light; auto y = topLeft.y + (widget.height() - 1); GfxFillRect(dpi, { { curX, y }, { curX + width, y } }, colour + 5); } } +static void WidgetProgressBarDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex) +{ + const auto& widget = w.widgets[widgetIndex]; + + ScreenCoordsXY topLeft{ w.windowPos + ScreenCoordsXY{ widget.left, widget.top } }; + ScreenCoordsXY bottomRight{ w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom } }; + + auto percentage = widget.content & 0xFF; + auto lowerBlinkBounds = (widget.content >> 8) & 0xFF; + auto upperBlinkBounds = (widget.content >> 16) & 0xFF; + + auto isBlinking = (lowerBlinkBounds != upperBlinkBounds) && (percentage >= lowerBlinkBounds) + && (percentage <= upperBlinkBounds); + + GfxFillRectInset(dpi, { topLeft, bottomRight }, w.colours[1], INSET_RECT_F_30); + if (isBlinking) + { + if (GameIsNotPaused() && (gCurrentRealTimeTicks & 8)) + return; + } + + const auto barWidth = widget.width() - 2; + const int32_t fillSize = (barWidth * percentage) / 100; + if (fillSize > 0) + { + GfxFillRectInset( + dpi, { topLeft + ScreenCoordsXY{ 1, 1 }, topLeft + ScreenCoordsXY{ fillSize + 1, widget.height() - 1 } }, + { widget.colour }, 0); + } +} + ImageId GetColourButtonImage(colour_t colour) { if (colour == COLOUR_INVISIBLE) @@ -1200,3 +1223,9 @@ ImageId GetColourButtonImage(colour_t colour) return ImageId(SPR_PALETTE_BTN, colour).WithBlended(true); } } + +void WidgetProgressBarSetNewPercentage(Widget& widget, uint8_t newPercentage) +{ + widget.content &= ~0xFF; + widget.content |= newPercentage; +} diff --git a/src/openrct2-ui/interface/Widget.h b/src/openrct2-ui/interface/Widget.h index 8273375012..dafa430e49 100644 --- a/src/openrct2-ui/interface/Widget.h +++ b/src/openrct2-ui/interface/Widget.h @@ -13,13 +13,18 @@ #include #include + +// TODO: only because of STR_NONE. We can do better. #include ImageId GetColourButtonImage(colour_t colour); Widget* GetWidgetByIndex(const WindowBase& w, WidgetIndex widgetIndex); constexpr auto kWidgetsEnd = Widget{ WindowWidgetType::Last, 0, 0, 0, 0, 0, 0, 0 }; +constexpr uint32_t kWidgetContentEmpty = 0xFFFFFFFF; constexpr auto kBarBlink = (1u << 31); +constexpr uint8_t kScrollBarWidth = 10; +constexpr ScreenSize kTabSize = { 31, 27 }; enum class WindowColour : uint8_t { @@ -29,13 +34,9 @@ enum class WindowColour : uint8_t Quaternary, }; -constexpr uint8_t kScrollBarWidth = 10; - -constexpr ScreenSize kTabSize = { 31, 27 }; - constexpr Widget MakeWidget( const ScreenCoordsXY& origin, const ScreenSize& size, WindowWidgetType type, WindowColour colour, - uint32_t content = 0xFFFFFFFF, StringId tooltip = STR_NONE) + uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE) { Widget out = {}; out.left = origin.x; @@ -84,6 +85,23 @@ constexpr Widget MakeTab(const ScreenCoordsXY& origin, StringId tooltip = STR_NO return MakeWidget(origin, size, type, colour, content, tooltip); } +constexpr Widget MakeProgressBar( + const ScreenCoordsXY& origin, const ScreenSize& size, colour_t colour, uint8_t lowerBlinkBound = 0, + uint8_t upperBlinkBound = 0) +{ + Widget out = {}; + out.left = origin.x; + out.right = origin.x + size.width - 1; + out.top = origin.y; + out.bottom = origin.y + size.height - 1; + out.type = WindowWidgetType::ProgressBar; + out.colour = colour; + out.content = 0 | (lowerBlinkBound << 8) | (upperBlinkBound << 16); + out.tooltip = STR_NONE; + + return out; +} + // NOLINTBEGIN #define MakeSpinnerWidgets(...) \ MakeWidget(__VA_ARGS__), MakeSpinnerIncreaseWidget(__VA_ARGS__), MakeSpinnerDecreaseWidget(__VA_ARGS__) @@ -91,7 +109,7 @@ constexpr Widget MakeTab(const ScreenCoordsXY& origin, StringId tooltip = STR_NO constexpr Widget MakeSpinnerDecreaseWidget( const ScreenCoordsXY& origin, const ScreenSize& size, [[maybe_unused]] WindowWidgetType type, WindowColour colour, - [[maybe_unused]] uint32_t content = 0xFFFFFFFF, StringId tooltip = STR_NONE) + [[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE) { const int16_t xPos = origin.x + size.width - 26; const int16_t yPos = origin.y + 1; @@ -103,7 +121,7 @@ constexpr Widget MakeSpinnerDecreaseWidget( constexpr Widget MakeSpinnerIncreaseWidget( const ScreenCoordsXY& origin, const ScreenSize& size, [[maybe_unused]] WindowWidgetType type, WindowColour colour, - [[maybe_unused]] uint32_t content = 0xFFFFFFFF, StringId tooltip = STR_NONE) + [[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE) { const int16_t xPos = origin.x + size.width - 13; const int16_t yPos = origin.y + 1; @@ -118,14 +136,14 @@ constexpr Widget MakeSpinnerIncreaseWidget( constexpr Widget MakeDropdownBoxWidget( const ScreenCoordsXY& origin, const ScreenSize& size, [[maybe_unused]] WindowWidgetType type, WindowColour colour, - [[maybe_unused]] uint32_t content = 0xFFFFFFFF, StringId tooltip = STR_NONE) + [[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE) { return MakeWidget(origin, size, type, colour, content); } constexpr Widget MakeDropdownButtonWidget( const ScreenCoordsXY& origin, const ScreenSize& size, [[maybe_unused]] WindowWidgetType type, WindowColour colour, - [[maybe_unused]] uint32_t content = 0xFFFFFFFF, StringId tooltip = STR_NONE) + [[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE) { const int16_t xPos = origin.x + size.width - 11; const int16_t yPos = origin.y + 1; @@ -153,3 +171,5 @@ void WidgetSetHoldable(WindowBase& w, WidgetIndex widgetIndex, bool value); void WidgetSetVisible(WindowBase& w, WidgetIndex widgetIndex, bool value); void WidgetSetPressed(WindowBase& w, WidgetIndex widgetIndex, bool value); void WidgetSetCheckboxValue(WindowBase& w, WidgetIndex widgetIndex, bool value); + +void WidgetProgressBarSetNewPercentage(Widget& widget, uint8_t newPercentage); diff --git a/src/openrct2-ui/interface/Window.cpp b/src/openrct2-ui/interface/Window.cpp index edb04c2542..452cf4381f 100644 --- a/src/openrct2-ui/interface/Window.cpp +++ b/src/openrct2-ui/interface/Window.cpp @@ -9,9 +9,9 @@ #include "Window.h" +#include "../UiStringIds.h" #include "Theme.h" #include "Widget.h" -#include "openrct2/world/Location.hpp" #include #include @@ -24,9 +24,9 @@ #include #include #include -#include #include #include +#include using namespace OpenRCT2; @@ -224,7 +224,7 @@ WindowBase* WindowCreate( // Check if there are any window slots left // include kWindowLimitReserved for items such as the main viewport and toolbars to not appear to be counted. - if (g_window_list.size() >= static_cast(gConfigGeneral.WindowLimit + kWindowLimitReserved)) + if (g_window_list.size() >= static_cast(Config::Get().general.WindowLimit + kWindowLimitReserved)) { // Close least recently used window for (auto& w : g_window_list) @@ -410,101 +410,96 @@ static void WindowViewportWheelInput(WindowBase& w, int32_t wheel) WindowZoomOut(w, true); } +static bool isSpinnerGroup(WindowBase& w, WidgetIndex index, WindowWidgetType buttonType) +{ + const auto& widgets = w.widgets; + + if (widgets[index].type != WindowWidgetType::Spinner && widgets[index].type != WindowWidgetType::ImgBtn) + return false; + + if (widgets[index + 1].type != buttonType) + return false; + + if (widgets[index + 2].type != buttonType) + return false; + + return true; +} + +static std::optional getSpinnerGroupWidgetIndex(WindowBase& w, WidgetIndex startIndex) +{ + // We only iterate 3 times as we might be at the spinner or one of its buttons. + for (WidgetIndex index = 0; index < 3; index++) + { + const auto reverseIndex = startIndex - index; + if (reverseIndex < 0) + { + break; + } + + if (isSpinnerGroup(w, reverseIndex, WindowWidgetType::TrnBtn)) + { + return reverseIndex; + } + + if (isSpinnerGroup(w, reverseIndex, WindowWidgetType::Button)) + { + return reverseIndex; + } + } + + return std::nullopt; +} + +// Allow mouse wheel scrolling to manipulate spinner widgets and tool sizes static bool WindowOtherWheelInput(WindowBase& w, WidgetIndex widgetIndex, int32_t wheel) { // HACK: Until we have a new window system that allows us to add new events like mouse wheel easily, // this selective approach will have to do. - // Allow mouse wheel scrolling to increment or decrement the land tool size for various windows - auto widgetType = w.widgets[widgetIndex].type; - - // Lower widgetIndex once or twice we got a type that matches, to allow scrolling on the increase/decrease buttons too - int32_t attempts = 0; - while (widgetType != WindowWidgetType::ImgBtn && widgetType != WindowWidgetType::Spinner && widgetIndex > 0) - { - switch (widgetType) - { - case WindowWidgetType::TrnBtn: // + and - for preview widget - case WindowWidgetType::Button: // + and - for spinner widget - { - if (attempts > 0) - { - // Verify that the previous button was of the same type - auto previousType = w.widgets[widgetIndex + 1].type; - if (previousType != widgetType) - { - return false; - } - } - break; - } - default: - // The widget type is not an increment or decrement button - return false; - } - - attempts++; - if (attempts > 2) - { - // We're 2 buttons up, and no preview or spinner widget was found - return false; - } - - widgetIndex--; - widgetType = w.widgets[widgetIndex].type; - } - - WidgetIndex buttonWidgetIndex; - WindowWidgetType expectedType; - - switch (widgetType) - { - case WindowWidgetType::ImgBtn: - { - auto expectedContent1 = ImageId(SPR_LAND_TOOL_DECREASE, FilterPaletteID::PaletteNull); - auto expectedContent2 = ImageId(SPR_LAND_TOOL_INCREASE, FilterPaletteID::PaletteNull); - - auto button1Image = w.widgets[widgetIndex + 1].image; - auto button2Image = w.widgets[widgetIndex + 2].image; - if (button1Image != expectedContent1 || button2Image != expectedContent2) - { - return false; - } - - buttonWidgetIndex = wheel < 0 ? widgetIndex + 2 : widgetIndex + 1; - expectedType = WindowWidgetType::TrnBtn; - break; - } - case WindowWidgetType::Spinner: - { - auto button1StringID = w.widgets[widgetIndex + 1].text; - auto button2StringID = w.widgets[widgetIndex + 2].text; - if (button1StringID != STR_NUMERIC_UP || button2StringID != STR_NUMERIC_DOWN) - { - return false; - } - - buttonWidgetIndex = wheel < 0 ? widgetIndex + 1 : widgetIndex + 2; - expectedType = WindowWidgetType::Button; - break; - } - default: - return false; - } - - if (WidgetIsDisabled(w, buttonWidgetIndex)) + const auto spinnerGroupIndex = getSpinnerGroupWidgetIndex(w, widgetIndex); + if (!spinnerGroupIndex.has_value()) { return false; } - auto button1Type = w.widgets[widgetIndex + 1].type; - auto button2Type = w.widgets[widgetIndex + 2].type; - if (button1Type != expectedType || button2Type != expectedType) + const auto entryWidgetType = w.widgets[*spinnerGroupIndex].type; + auto targetWidgetIndex = *spinnerGroupIndex; + + if (entryWidgetType == WindowWidgetType::ImgBtn) + { + auto expectedContent1 = ImageId(SPR_LAND_TOOL_DECREASE, FilterPaletteID::PaletteNull); + auto expectedContent2 = ImageId(SPR_LAND_TOOL_INCREASE, FilterPaletteID::PaletteNull); + + auto button1Image = w.widgets[*spinnerGroupIndex + 1].image; + auto button2Image = w.widgets[*spinnerGroupIndex + 2].image; + if (button1Image != expectedContent1 || button2Image != expectedContent2) + { + return false; + } + + // Expected widget order: decrease, increase + targetWidgetIndex += wheel < 0 ? 2 : 1; + } + else if (entryWidgetType == WindowWidgetType::Spinner) + { + auto button1StringId = w.widgets[*spinnerGroupIndex + 1].text; + auto button2StringId = w.widgets[*spinnerGroupIndex + 2].text; + if (button1StringId != STR_NUMERIC_UP || button2StringId != STR_NUMERIC_DOWN) + { + return false; + } + + // Expected widget order: increase, decrease + targetWidgetIndex += wheel < 0 ? 1 : 2; + } + + if (WidgetIsDisabled(w, targetWidgetIndex)) { return false; } - w.OnMouseDown(buttonWidgetIndex); + w.OnMouseDown(targetWidgetIndex); return true; } @@ -570,7 +565,7 @@ void WindowAllWheelInput() void ApplyScreenSaverLockSetting() { - gConfigGeneral.DisableScreensaver ? SDL_DisableScreenSaver() : SDL_EnableScreenSaver(); + Config::Get().general.DisableScreensaver ? SDL_DisableScreenSaver() : SDL_EnableScreenSaver(); } /** @@ -649,7 +644,7 @@ void WindowDrawWidgets(WindowBase& w, DrawPixelInfo& dpi) if (w.flags & WF_WHITE_BORDER_MASK) { GfxFillRectInset( - dpi, { w.windowPos, w.windowPos + ScreenCoordsXY{ w.width - 1, w.height - 1 } }, COLOUR_WHITE, + dpi, { w.windowPos, w.windowPos + ScreenCoordsXY{ w.width - 1, w.height - 1 } }, { COLOUR_WHITE }, INSET_RECT_FLAG_FILL_NONE); } } @@ -828,7 +823,7 @@ void WindowAlignTabs(WindowBase* w, WidgetIndex start_tab_id, WidgetIndex end_ta ScreenCoordsXY WindowGetViewportSoundIconPos(WindowBase& w) { - const uint8_t buttonOffset = (gConfigInterface.WindowButtonsOnTheLeft) ? CloseButtonWidth + 2 : 0; + const uint8_t buttonOffset = (Config::Get().interface.WindowButtonsOnTheLeft) ? kCloseButtonWidth + 2 : 0; return w.windowPos + ScreenCoordsXY{ 2 + buttonOffset, 2 }; } diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index 986e72712f..9c6aeaafc4 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -94,6 +94,7 @@ + @@ -192,6 +193,7 @@ + diff --git a/src/openrct2-ui/ride/Construction.h b/src/openrct2-ui/ride/Construction.h index db19d93dea..f8149a79ef 100644 --- a/src/openrct2-ui/ride/Construction.h +++ b/src/openrct2-ui/ride/Construction.h @@ -143,7 +143,7 @@ static_assert(TrackElemType::Count == 339, "Reminder to add new track element to constexpr bool TrackPieceDirectionIsDiagonal(const uint8_t direction) { - return direction >= NumOrthogonalDirections; + return direction >= kNumOrthogonalDirections; } struct SpecialElement diff --git a/src/openrct2-ui/scripting/CustomListView.cpp b/src/openrct2-ui/scripting/CustomListView.cpp index c2546453b5..ff08ff2694 100644 --- a/src/openrct2-ui/scripting/CustomListView.cpp +++ b/src/openrct2-ui/scripting/CustomListView.cpp @@ -551,7 +551,7 @@ void CustomListView::MouseUp(const ScreenCoordsXY& pos) void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* scroll) const { - auto paletteIndex = ColourMapA[w->colours[1]].mid_light; + auto paletteIndex = ColourMapA[w->colours[1].colour].mid_light; GfxFillRect(dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width, dpi.y + dpi.height } }, paletteIndex); int32_t y = ShowColumnHeaders ? COLUMN_HEADER_HEIGHT : 0; @@ -596,7 +596,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s { GfxFillRect( dpi, { { dpi.x, y }, { dpi.x + dpi.width, y + (kListRowHeight - 1) } }, - ColourMapA[w->colours[1]].lighter | 0x1000000); + ColourMapA[w->colours[1].colour].lighter | 0x1000000); } // Columns @@ -640,7 +640,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s { y = scroll->v_top; - auto bgColour = ColourMapA[w->colours[1]].mid_light; + auto bgColour = ColourMapA[w->colours[1].colour].mid_light; GfxFillRect(dpi, { { dpi.x, y }, { dpi.x + dpi.width, y + 12 } }, bgColour); int32_t x = 0; @@ -704,8 +704,8 @@ void CustomListView::PaintSeperator( auto lineY1 = lineY0 + 1; auto baseColour = ParentWindow->colours[1]; - auto lightColour = ColourMapA[baseColour].lighter; - auto darkColour = ColourMapA[baseColour].mid_dark; + auto lightColour = ColourMapA[baseColour.colour].lighter; + auto darkColour = ColourMapA[baseColour.colour].mid_dark; if (hasText) { diff --git a/src/openrct2-ui/scripting/CustomWindow.cpp b/src/openrct2-ui/scripting/CustomWindow.cpp index e0b8589bad..26f3038585 100644 --- a/src/openrct2-ui/scripting/CustomWindow.cpp +++ b/src/openrct2-ui/scripting/CustomWindow.cpp @@ -10,6 +10,7 @@ #ifdef ENABLE_SCRIPTING # include "../UiContext.h" +# include "../UiStringIds.h" # include "../interface/Dropdown.h" # include "../interface/Widget.h" # include "../scripting/ScGraphicsContext.hpp" @@ -25,7 +26,6 @@ # include # include # include -# include # include # include # include @@ -215,7 +215,7 @@ namespace OpenRCT2::Ui::Windows } else if (dukImage.type() == DukValue::Type::OBJECT) { - result.imageFrameBase = ImageId::FromUInt32(static_cast(dukImage["frameBase"].as_int())); + result.imageFrameBase = ImageId::FromUInt32(dukImage["frameBase"].as_uint()); result.imageFrameCount = AsOrDefault(dukImage["frameCount"], 0); result.imageFrameDuration = AsOrDefault(dukImage["frameDuration"], 0); @@ -250,7 +250,7 @@ namespace OpenRCT2::Ui::Windows std::string Title; std::optional Id; std::vector Widgets; - std::vector Colours; + std::vector Colours; std::vector Tabs; std::optional TabIndex; @@ -302,14 +302,13 @@ namespace OpenRCT2::Ui::Windows { auto dukColours = desc["colours"].as_array(); std::transform(dukColours.begin(), dukColours.end(), std::back_inserter(result.Colours), [](const DukValue& w) { - colour_t c = COLOUR_BLACK; + ColourWithFlags c = { COLOUR_BLACK }; if (w.type() == DukValue::Type::NUMBER) { - c = std::clamp(BASE_COLOUR(w.as_int()), COLOUR_BLACK, COLOUR_COUNT - 1); - if (w.as_int() & COLOUR_FLAG_TRANSLUCENT) - { - c = TRANSLUCENT(c); - } + colour_t colour = w.as_uint() & ~kLegacyColourFlagTranslucent; + auto isTranslucent = (w.as_uint() & kLegacyColourFlagTranslucent); + c.colour = std::clamp(colour, COLOUR_BLACK, COLOUR_COUNT - 1); + c.flags = (isTranslucent ? EnumToFlag(ColourFlag::translucent) : 0); } return c; }); @@ -476,7 +475,7 @@ namespace OpenRCT2::Ui::Windows // This has to be called to ensure the window frame is correctly initialised - not doing this will // cause an assertion to be hit. ResizeFrameWithPage(); - widgets[WIDX_CLOSE].text = (colours[0] & COLOUR_FLAG_TRANSLUCENT) ? STR_CLOSE_X_WHITE : STR_CLOSE_X; + widgets[WIDX_CLOSE].text = colours[0].hasFlag(ColourFlag::translucent) ? STR_CLOSE_X_WHITE : STR_CLOSE_X; // 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 @@ -631,8 +630,10 @@ namespace OpenRCT2::Ui::Windows const auto numItems = std::min(items.size(), Dropdown::ItemsMaxSize); for (size_t i = 0; i < numItems; i++) { - gDropdownItems[i].Format = selectedIndex == static_cast(i) ? STR_OPTIONS_DROPDOWN_ITEM_SELECTED - : STR_OPTIONS_DROPDOWN_ITEM; + gDropdownItems[i].Format = STR_OPTIONS_DROPDOWN_ITEM; + if (selectedIndex == static_cast(i)) + gDropdownItems[i].Format = STR_OPTIONS_DROPDOWN_ITEM_SELECTED; + auto sz = items[i].c_str(); std::memcpy(&gDropdownItems[i].Args, &sz, sizeof(const char*)); } @@ -907,8 +908,8 @@ namespace OpenRCT2::Ui::Windows : _info.Desc.Tabs[page].Widgets[widgetDescIndex - tabWidgetsOffset]; auto preWidgetSize = widgetList.size(); CreateWidget(widgetList, widgetDesc); - auto numWidetsAdded = widgetList.size() - preWidgetSize; - for (size_t i = 0; i < numWidetsAdded; i++) + auto numWidgetsAdded = widgetList.size() - preWidgetSize; + for (size_t i = 0; i < numWidgetsAdded; i++) { _info.WidgetIndexMap.push_back(widgetDescIndex); } @@ -1060,25 +1061,25 @@ namespace OpenRCT2::Ui::Windows widget.flags |= WIDGET_FLAGS::TEXT_IS_STRING; widgetList.push_back(widget); - // Add the decrement button + // Add the increment button widget = {}; widget.type = WindowWidgetType::Button; widget.colour = 1; - widget.left = desc.X + desc.Width - 26; - widget.right = widget.left + 12; + widget.left = desc.X + desc.Width - 13; + widget.right = widget.left + 11; widget.top = desc.Y + 1; widget.bottom = desc.Y + desc.Height - 2; - widget.text = STR_NUMERIC_DOWN; + widget.text = STR_NUMERIC_UP; widget.tooltip = STR_NONE; if (desc.IsDisabled) widget.flags |= WIDGET_FLAGS::IS_DISABLED; widget.flags |= WIDGET_FLAGS::IS_HOLDABLE; widgetList.push_back(widget); - // Add the increment button - widget.left = desc.X + desc.Width - 13; - widget.right = widget.left + 11; - widget.text = STR_NUMERIC_UP; + // Add the decrement button + widget.left = desc.X + desc.Width - 26; + widget.right = widget.left + 12; + widget.text = STR_NUMERIC_DOWN; widgetList.push_back(widget); } else if (desc.Type == "textbox") diff --git a/src/openrct2-ui/scripting/ScGraphicsContext.hpp b/src/openrct2-ui/scripting/ScGraphicsContext.hpp index 9115d1033c..ad1ec00091 100644 --- a/src/openrct2-ui/scripting/ScGraphicsContext.hpp +++ b/src/openrct2-ui/scripting/ScGraphicsContext.hpp @@ -13,7 +13,7 @@ # include "CustomImages.h" -# include +# include # include namespace OpenRCT2::Scripting @@ -75,7 +75,7 @@ namespace OpenRCT2::Scripting void colour_set(DukValue value) { if (value.type() == DukValue::NUMBER) - _colour = static_cast(value.as_int()); + _colour = static_cast(value.as_uint()); else _colour = {}; } @@ -88,7 +88,7 @@ namespace OpenRCT2::Scripting void secondaryColour_set(DukValue value) { if (value.type() == DukValue::NUMBER) - _secondaryColour = static_cast(value.as_int()); + _secondaryColour = static_cast(value.as_uint()); else _secondaryColour = {}; } @@ -101,7 +101,7 @@ namespace OpenRCT2::Scripting void tertiaryColour_set(DukValue value) { if (value.type() == DukValue::NUMBER) - _tertiaryColour = static_cast(value.as_int()); + _tertiaryColour = static_cast(value.as_uint()); else _tertiaryColour = {}; } @@ -114,7 +114,7 @@ namespace OpenRCT2::Scripting void paletteId_set(DukValue value) { if (value.type() == DukValue::NUMBER) - _paletteId = static_cast(value.as_int()); + _paletteId = static_cast(value.as_uint()); else _paletteId = {}; } @@ -163,13 +163,13 @@ namespace OpenRCT2::Scripting void box(int32_t x, int32_t y, int32_t width, int32_t height) { - GfxFillRectInset(_dpi, { x, y, x + width - 1, y + height - 1 }, _colour.value_or(0), 0); + GfxFillRectInset(_dpi, { x, y, x + width - 1, y + height - 1 }, { _colour.value_or(0) }, 0); } void well(int32_t x, int32_t y, int32_t width, int32_t height) { GfxFillRectInset( - _dpi, { x, y, x + width - 1, y + height - 1 }, _colour.value_or(0), + _dpi, { x, y, x + width - 1, y + height - 1 }, { _colour.value_or(0) }, INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_DONT_LIGHTEN); } @@ -235,7 +235,7 @@ namespace OpenRCT2::Scripting void text(const std::string& text, int32_t x, int32_t y) { - GfxDrawString(_dpi, { x, y }, text.c_str(), { _colour.value_or(0) }); + DrawText(_dpi, { x, y }, { _colour.value_or(0) }, text.c_str()); } }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2-ui/scripting/ScImageManager.hpp b/src/openrct2-ui/scripting/ScImageManager.hpp index ec83ff822e..296c47dc6c 100644 --- a/src/openrct2-ui/scripting/ScImageManager.hpp +++ b/src/openrct2-ui/scripting/ScImageManager.hpp @@ -93,8 +93,8 @@ namespace OpenRCT2::Scripting void free(const DukValue& dukRange) { - auto start = dukRange["start"].as_int(); - auto count = dukRange["count"].as_int(); + auto start = dukRange["start"].as_uint(); + auto count = dukRange["count"].as_uint(); ImageList range(start, count); diff --git a/src/openrct2-ui/scripting/ScTitleSequence.hpp b/src/openrct2-ui/scripting/ScTitleSequence.hpp index fdbffea92f..d9e8a8b0d3 100644 --- a/src/openrct2-ui/scripting/ScTitleSequence.hpp +++ b/src/openrct2-ui/scripting/ScTitleSequence.hpp @@ -130,26 +130,26 @@ namespace OpenRCT2::Scripting switch (type) { case TitleScript::Load: - command = LoadParkCommand{ static_cast(value["index"].as_int()) }; + command = LoadParkCommand{ static_cast(value["index"].as_uint()) }; break; case TitleScript::Location: command = SetLocationCommand{ - static_cast(value["x"].as_int()), - static_cast(value["y"].as_int()), + static_cast(value["x"].as_uint()), + static_cast(value["y"].as_uint()), }; break; case TitleScript::Rotate: - command = RotateViewCommand{ static_cast(value["rotations"].as_int()) }; + command = RotateViewCommand{ static_cast(value["rotations"].as_uint()) }; break; case TitleScript::Zoom: - command = SetZoomCommand{ static_cast(value["zoom"].as_int()) }; + command = SetZoomCommand{ static_cast(value["zoom"].as_uint()) }; break; case TitleScript::Follow: { auto dukId = value["id"]; if (dukId.type() == DukValue::Type::NUMBER) { - command = FollowEntityCommand{ EntityId::FromUnderlying(dukId.as_int()) }; + command = FollowEntityCommand{ EntityId::FromUnderlying(dukId.as_uint()) }; } else { @@ -158,10 +158,10 @@ namespace OpenRCT2::Scripting break; } case TitleScript::Speed: - command = SetSpeedCommand{ static_cast(value["speed"].as_int()) }; + command = SetSpeedCommand{ static_cast(value["speed"].as_uint()) }; break; case TitleScript::Wait: - command = WaitCommand{ static_cast(value["duration"].as_int()) }; + command = WaitCommand{ static_cast(value["duration"].as_uint()) }; break; case TitleScript::LoadSc: { diff --git a/src/openrct2-ui/scripting/ScUi.hpp b/src/openrct2-ui/scripting/ScUi.hpp index 7e736914bc..2b3356de01 100644 --- a/src/openrct2-ui/scripting/ScUi.hpp +++ b/src/openrct2-ui/scripting/ScUi.hpp @@ -187,7 +187,7 @@ namespace OpenRCT2::Scripting { if (id.type() == DukValue::Type::NUMBER) { - WindowCloseByNumber(cls, id.as_int()); + WindowCloseByNumber(cls, id.as_uint()); } else { @@ -205,8 +205,8 @@ namespace OpenRCT2::Scripting { if (a.type() == DukValue::Type::NUMBER) { - auto index = a.as_int(); - auto i = 0; + auto index = a.as_uint(); + size_t i = 0; for (const auto& w : g_window_list) { if (i == index) diff --git a/src/openrct2-ui/scripting/ScWidget.hpp b/src/openrct2-ui/scripting/ScWidget.hpp index 80759bd781..a7082df10e 100644 --- a/src/openrct2-ui/scripting/ScWidget.hpp +++ b/src/openrct2-ui/scripting/ScWidget.hpp @@ -112,6 +112,8 @@ namespace OpenRCT2::Scripting return "empty"; case WindowWidgetType::Placeholder: return "placeholder"; + case WindowWidgetType::ProgressBar: + return "progress_bar"; case WindowWidgetType::Custom: return "custom"; case WindowWidgetType::Last: @@ -502,7 +504,7 @@ namespace OpenRCT2::Scripting uint32_t image_get() const { auto widget = GetWidget(); - if (widget != nullptr && widget->type == WindowWidgetType::FlatBtn) + if (widget != nullptr && (widget->type == WindowWidgetType::FlatBtn || widget->type == WindowWidgetType::ImgBtn)) { if (GetTargetAPIVersion() <= API_VERSION_63_G2_REORDER) { @@ -516,7 +518,7 @@ namespace OpenRCT2::Scripting void image_set(DukValue value) { auto widget = GetWidget(); - if (widget != nullptr && widget->type == WindowWidgetType::FlatBtn) + if (widget != nullptr && (widget->type == WindowWidgetType::FlatBtn || widget->type == WindowWidgetType::ImgBtn)) { widget->image = ImageId(ImageFromDuk(value)); Invalidate(); diff --git a/src/openrct2-ui/scripting/ScWindow.hpp b/src/openrct2-ui/scripting/ScWindow.hpp index 1c57f3e26b..c24803b167 100644 --- a/src/openrct2-ui/scripting/ScWindow.hpp +++ b/src/openrct2-ui/scripting/ScWindow.hpp @@ -238,7 +238,10 @@ namespace OpenRCT2::Scripting result.reserve(std::size(w->colours)); for (auto c : w->colours) { - result.push_back(c); + auto colour = c.colour; + if (c.hasFlag(ColourFlag::translucent)) + colour |= kLegacyColourFlagTranslucent; + result.push_back(colour); } } return result; @@ -250,14 +253,13 @@ namespace OpenRCT2::Scripting { for (size_t i = 0; i < std::size(w->colours); i++) { - int32_t c = COLOUR_BLACK; + auto c = ColourWithFlags{ COLOUR_BLACK }; if (i < colours.size()) { - c = std::clamp(BASE_COLOUR(colours[i]), COLOUR_BLACK, COLOUR_COUNT - 1); - if (colours[i] & COLOUR_FLAG_TRANSLUCENT) - { - c = TRANSLUCENT(c); - } + colour_t colour = colours[i] & ~kLegacyColourFlagTranslucent; + auto isTranslucent = (colours[i] & kLegacyColourFlagTranslucent); + c.colour = std::clamp(colour, COLOUR_BLACK, COLOUR_COUNT - 1); + c.flags = (isTranslucent ? EnumToFlag(ColourFlag::translucent) : 0); } w->colours[i] = c; } diff --git a/src/openrct2-ui/windows/About.cpp b/src/openrct2-ui/windows/About.cpp index aa6f6ec439..dda4b6f2db 100644 --- a/src/openrct2-ui/windows/About.cpp +++ b/src/openrct2-ui/windows/About.cpp @@ -6,6 +6,9 @@ * * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ + +#include "../UiStringIds.h" + #include #include #include @@ -14,8 +17,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/openrct2-ui/windows/AssetPacks.cpp b/src/openrct2-ui/windows/AssetPacks.cpp index 2c425e8172..fafe057c39 100644 --- a/src/openrct2-ui/windows/AssetPacks.cpp +++ b/src/openrct2-ui/windows/AssetPacks.cpp @@ -7,6 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include @@ -52,7 +54,7 @@ static Widget WindowAssetPacksWidgets[] = { class AssetPacksWindow final : public Window { private: - static constexpr int32_t ItemHeight = SCROLLABLE_ROW_HEIGHT + 1; + static constexpr int32_t ItemHeight = kScrollableRowHeight + 1; static constexpr int32_t ItemCheckBoxSize = ItemHeight - 3; std::optional _highlightedIndex; std::optional _selectedIndex; @@ -194,7 +196,7 @@ static Widget WindowAssetPacksWidgets[] = { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; GfxFillRect( dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, - ColourMapA[colours[1]].mid_light); + ColourMapA[colours[1].colour].mid_light); auto assetPackManager = GetContext()->GetAssetPackManager(); if (assetPackManager == nullptr) @@ -236,17 +238,17 @@ static Widget WindowAssetPacksWidgets[] = { private: void PaintItem(DrawPixelInfo& dpi, int32_t y, Formatter& ft, bool isChecked, bool isSelected, bool isHighlighted) { - auto listWidth = dpi.width - 1; + auto listWidth = widgets[WIDX_LIST].right - widgets[WIDX_LIST].left; auto stringId = STR_BLACK_STRING; auto fillRectangle = ScreenRect{ { 0, y }, { listWidth, y + ItemHeight - 1 } }; if (isSelected) { - GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); + GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1].colour].mid_dark); stringId = STR_WINDOW_COLOUR_2_STRINGID; } else if (isHighlighted) { - GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); + GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1].colour].mid_dark); } DrawTextEllipsised(dpi, { 16, y + 1 }, listWidth, stringId, ft); diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index c454f7c4d6..1647ccd409 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -7,6 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include @@ -22,6 +24,7 @@ #include #include #include + namespace OpenRCT2::Ui::Windows { static constexpr int32_t WW = 113; @@ -86,7 +89,7 @@ static Widget window_banner_widgets[] = { (viewportWidget->width()) - 1, (viewportWidget->height()) - 1, Focus(_bannerViewPos)); if (viewport != nullptr) - viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; + viewport->flags = Config::Get().general.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; Invalidate(); } @@ -157,7 +160,7 @@ static Widget window_banner_widgets[] = { switch (widgetIndex) { case WIDX_MAIN_COLOUR: - WindowDropdownShowColour(this, widget, TRANSLUCENT(colours[1]), banner->colour); + WindowDropdownShowColour(this, widget, colours[1].withFlag(ColourFlag::translucent, true), banner->colour); break; case WIDX_TEXT_COLOUR_DROPDOWN_BUTTON: diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index 2dc3ea20d6..e4160c0c65 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -202,7 +202,7 @@ static Widget _windowChangelogWidgets[] = { if (screenCoords.y + lineHeight < dpi.y || screenCoords.y >= dpi.y + dpi.height) continue; - GfxDrawString(dpi, screenCoords, line.c_str(), { colours[0] }); + DrawText(dpi, screenCoords, { colours[0] }, line.c_str()); } } diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index 4b5e9e881b..74978cdcc1 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -7,6 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include @@ -17,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -359,7 +360,7 @@ static StringId window_cheats_page_titles[] = { class CheatsWindow final : public Window { private: - char _moneySpinnerText[MONEY_STRING_MAXLENGTH]{}; + char _moneySpinnerText[kMoneyStringMaxlength]{}; money64 _moneySpinnerValue = CHEATS_MONEY_DEFAULT; int32_t _parkRatingSpinnerValue{}; int32_t _yearSpinnerValue = 1; @@ -479,8 +480,10 @@ static StringId window_cheats_page_titles[] = { break; } case WINDOW_CHEATS_PAGE_MISC: - widgets[WIDX_OPEN_CLOSE_PARK].text = (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) ? STR_CHEAT_CLOSE_PARK - : STR_CHEAT_OPEN_PARK; + widgets[WIDX_OPEN_CLOSE_PARK].text = STR_CHEAT_OPEN_PARK; + 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_FREEZE_WEATHER, gameState.Cheats.FreezeWeather); SetCheckboxValue(WIDX_NEVERENDING_MARKETING, gameState.Cheats.NeverendingMarketing); @@ -537,7 +540,7 @@ static StringId window_cheats_page_titles[] = { ft.Add(_moneySpinnerValue); if (IsWidgetDisabled(WIDX_MONEY_SPINNER)) { - colour |= COLOUR_FLAG_INSET; + colour.setFlag(ColourFlag::inset, true); } int32_t actual_month = _monthSpinnerValue - 1; DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 93 }, STR_BOTTOM_TOOLBAR_CASH, ft, { colour }); @@ -710,13 +713,13 @@ static StringId window_cheats_page_titles[] = { switch (widgetIndex) { case WIDX_MONEY_SPINNER_INCREMENT: - _moneySpinnerValue = AddClamp_money64( + _moneySpinnerValue = AddClamp( CHEATS_MONEY_INCREMENT_DIV * (_moneySpinnerValue / CHEATS_MONEY_INCREMENT_DIV), CHEATS_MONEY_INCREMENT_DIV); InvalidateWidget(WIDX_MONEY_SPINNER); break; case WIDX_MONEY_SPINNER_DECREMENT: - _moneySpinnerValue = AddClamp_money64( + _moneySpinnerValue = AddClamp( CHEATS_MONEY_INCREMENT_DIV * (_moneySpinnerValue / CHEATS_MONEY_INCREMENT_DIV), -CHEATS_MONEY_INCREMENT_DIV); InvalidateWidget(WIDX_MONEY_SPINNER); @@ -790,10 +793,10 @@ static StringId window_cheats_page_titles[] = { CheatsSet(CheatType::NoMoney, GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY ? 0 : 1); break; case WIDX_MONEY_SPINNER: - MoneyToString(_moneySpinnerValue, _moneySpinnerText, MONEY_STRING_MAXLENGTH, false); + MoneyToString(_moneySpinnerValue, _moneySpinnerText, kMoneyStringMaxlength, false); WindowTextInputRawOpen( this, WIDX_MONEY_SPINNER, STR_ENTER_NEW_VALUE, STR_ENTER_NEW_VALUE, {}, _moneySpinnerText, - MONEY_STRING_MAXLENGTH); + kMoneyStringMaxlength); break; case WIDX_SET_MONEY: CheatsSet(CheatType::SetMoney, _moneySpinnerValue); diff --git a/src/openrct2-ui/windows/CustomCurrency.cpp b/src/openrct2-ui/windows/CustomCurrency.cpp index 25960fc494..e0201b9f70 100644 --- a/src/openrct2-ui/windows/CustomCurrency.cpp +++ b/src/openrct2-ui/windows/CustomCurrency.cpp @@ -12,8 +12,9 @@ #include #include #include -#include +#include #include +#include #include #include #include @@ -72,16 +73,16 @@ static Widget window_custom_currency_widgets[] = { break; case WIDX_RATE_UP: CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate += 1; - gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; - ConfigSaveDefault(); + Config::Get().general.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; + Config::Save(); WindowInvalidateAll(); break; case WIDX_RATE_DOWN: if (CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate > 1) { CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate -= 1; - gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; - ConfigSaveDefault(); + Config::Get().general.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; + Config::Save(); WindowInvalidateAll(); } break; @@ -109,7 +110,7 @@ static Widget window_custom_currency_widgets[] = { case WIDX_SYMBOL_TEXT: WindowTextInputRawOpen( this, WIDX_SYMBOL_TEXT, STR_CUSTOM_CURRENCY_SYMBOL_INPUT_TITLE, STR_CUSTOM_CURRENCY_SYMBOL_INPUT_DESC, - {}, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, CURRENCY_SYMBOL_MAX_SIZE); + {}, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, kCurrencySymbolMaxSize); break; } } @@ -122,7 +123,7 @@ static Widget window_custom_currency_widgets[] = { WindowTextInputOpen( this, WIDX_RATE, STR_RATE_INPUT_TITLE, STR_RATE_INPUT_DESC, {}, STR_FORMAT_INTEGER, static_cast(CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate), - CURRENCY_RATE_MAX_NUM_DIGITS); + kCurrencyRateMaxNumDigits); break; } } @@ -145,8 +146,8 @@ static Widget window_custom_currency_widgets[] = { CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = CurrencyAffix::Suffix; } - gConfigGeneral.CustomCurrencyAffix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode; - ConfigSaveDefault(); + Config::Get().general.CustomCurrencyAffix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode; + Config::Save(); WindowInvalidateAll(); } @@ -164,11 +165,12 @@ static Widget window_custom_currency_widgets[] = { case WIDX_SYMBOL_TEXT: SafeStrCpy( CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, std::string(text).c_str(), - CURRENCY_SYMBOL_MAX_SIZE); + kCurrencySymbolMaxSize); - gConfigGeneral.CustomCurrencySymbol = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode; + Config::Get().general.CustomCurrencySymbol = CurrencyDescriptors[EnumValue(CurrencyType::Custom)] + .symbol_unicode; - ConfigSaveDefault(); + Config::Save(); WindowInvalidateAll(); break; @@ -178,8 +180,8 @@ static Widget window_custom_currency_widgets[] = { { rate = res.value(); CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = rate; - gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; - ConfigSaveDefault(); + Config::Get().general.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; + Config::Save(); WindowInvalidateAll(); } break; @@ -210,8 +212,7 @@ static Widget window_custom_currency_widgets[] = { + ScreenCoordsXY{ window_custom_currency_widgets[WIDX_SYMBOL_TEXT].left + 1, window_custom_currency_widgets[WIDX_SYMBOL_TEXT].top }; - GfxDrawString( - dpi, screenCoords, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, { colours[1] }); + DrawText(dpi, screenCoords, { colours[1] }, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode); auto drawPos = windowPos + ScreenCoordsXY{ window_custom_currency_widgets[WIDX_AFFIX_DROPDOWN].left + 1, diff --git a/src/openrct2-ui/windows/DebugPaint.cpp b/src/openrct2-ui/windows/DebugPaint.cpp index b408cfc2e9..1a7fce280d 100644 --- a/src/openrct2-ui/windows/DebugPaint.cpp +++ b/src/openrct2-ui/windows/DebugPaint.cpp @@ -58,7 +58,7 @@ static Widget window_debug_paint_widgets[] = { InitScrollWidgets(); WindowPushOthersBelow(*this); - colours[0] = TRANSLUCENT(COLOUR_BLACK); + colours[0] = ColourWithFlags{ COLOUR_BLACK }.withFlag(ColourFlag::translucent, true); colours[1] = COLOUR_GREY; ResizeLanguage = LANGUAGE_UNDEFINED; diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 2c42f47436..1cac231070 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -23,10 +25,8 @@ namespace OpenRCT2::Ui::Windows { - // The maximum number of rows to list before items overflow into new columns - constexpr int32_t DROPDOWN_TEXT_MAX_ROWS = 32; - constexpr int32_t DROPDOWN_ITEM_HEIGHT = 12; + constexpr int32_t DROPDOWN_ITEM_HEIGHT_TOUCH = 24; static constexpr std::array _appropriateImageDropdownItemsPerRow = { 1, 1, 1, 1, 2, 2, 3, 3, 4, 3, // 10 @@ -86,6 +86,16 @@ namespace OpenRCT2::Ui::Windows InputSetState(InputState::DropdownActive); } + static int32_t GetDefaultRowHeight() + { + return Config::Get().interface.EnlargedUi ? DROPDOWN_ITEM_HEIGHT_TOUCH : DROPDOWN_ITEM_HEIGHT; + } + + static int32_t GetAdditionalRowPadding() + { + return Config::Get().interface.EnlargedUi ? 6 : 0; + } + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -108,17 +118,18 @@ namespace OpenRCT2::Ui::Windows const ScreenCoordsXY rightBottom = leftTop + ScreenCoordsXY{ ItemWidth - 1, 0 }; const ScreenCoordsXY shadowOffset{ 0, 1 }; - if (colours[0] & COLOUR_FLAG_TRANSLUCENT) + if (colours[0].hasFlag(ColourFlag::translucent)) { - TranslucentWindowPalette palette = TranslucentWindowPalettes[BASE_COLOUR(colours[0])]; + TranslucentWindowPalette palette = TranslucentWindowPalettes[colours[0].colour]; GfxFilterRect(dpi, { leftTop, rightBottom }, palette.highlight); GfxFilterRect(dpi, { leftTop + shadowOffset, rightBottom + shadowOffset }, palette.shadow); } else { - GfxFillRect(dpi, { leftTop, rightBottom }, ColourMapA[colours[0]].mid_dark); + GfxFillRect(dpi, { leftTop, rightBottom }, ColourMapA[colours[0].colour].mid_dark); GfxFillRect( - dpi, { leftTop + shadowOffset, rightBottom + shadowOffset }, ColourMapA[colours[0]].lightest); + dpi, { leftTop + shadowOffset, rightBottom + shadowOffset }, + ColourMapA[colours[0].colour].lightest); } } else @@ -147,52 +158,64 @@ namespace OpenRCT2::Ui::Windows item++; // Calculate colour - colour_t colour = NOT_TRANSLUCENT(colours[0]); + ColourWithFlags colour = { colours[0].colour }; if (i == highlightedIndex) - colour = COLOUR_WHITE; + colour.colour = COLOUR_WHITE; if (i < Dropdown::ItemsMaxSize && Dropdown::IsDisabled(i)) - colour = NOT_TRANSLUCENT(colours[0]) | COLOUR_FLAG_INSET; + colour = { colours[0].colour, EnumToFlag(ColourFlag::inset) }; // Draw item string + auto yOffset = GetAdditionalRowPadding(); Formatter ft(reinterpret_cast(&gDropdownItems[i].Args)); - DrawTextEllipsised(dpi, screenCoords, width - 5, item, ft, { colour }); + DrawTextEllipsised(dpi, { screenCoords.x, screenCoords.y + yOffset }, width - 5, item, ft, { colour }); } } } } + static int32_t getSpaceUntilBottom(const ScreenCoordsXY& screenPos, int32_t dropdownButtonHeight) + { + auto* mainWindow = WindowGetMain(); + if (mainWindow == nullptr) + return 400; + + return std::max(1, mainWindow->height - (screenPos.y + dropdownButtonHeight + 5)); + } + void SetTextItems( - const ScreenCoordsXY& screenPos, int32_t extraY, uint8_t colour, uint8_t customHeight, uint8_t txtFlags, + const ScreenCoordsXY& screenPos, int32_t extraY, ColourWithFlags colour, uint8_t customHeight, uint8_t txtFlags, size_t numItems, int32_t itemWidth) { // Set and calculate num items, rows and columns - ItemWidth = itemWidth; - ItemHeight = (txtFlags & Dropdown::Flag::CustomHeight) ? customHeight : DROPDOWN_ITEM_HEIGHT; + ItemHeight = (txtFlags & Dropdown::Flag::CustomHeight) ? customHeight : GetDefaultRowHeight(); gDropdownNumItems = static_cast(numItems); // There must always be at least one column to prevent dividing by zero - if (gDropdownNumItems == 0) + if (gDropdownNumItems <= 1) { - NumColumns = 1; NumRows = 1; + NumColumns = 1; } else { - NumColumns = (gDropdownNumItems + DROPDOWN_TEXT_MAX_ROWS - 1) / DROPDOWN_TEXT_MAX_ROWS; - NumRows = (gDropdownNumItems + NumColumns - 1) / NumColumns; + const int32_t numAvailableRows = std::max(1, getSpaceUntilBottom(screenPos, extraY) / ItemHeight); + NumRows = std::min(numAvailableRows, gDropdownNumItems); + NumColumns = (gDropdownNumItems + NumRows - 1) / NumRows; } + ItemWidth = itemWidth; + // Text dropdowns are listed horizontally ListVertically = true; UpdateSizeAndPosition(screenPos, extraY); - if (colour & COLOUR_FLAG_TRANSLUCENT) + if (colour.hasFlag(ColourFlag::translucent)) flags |= WF_TRANSPARENT; colours[0] = colour; } void SetImageItems( - const ScreenCoordsXY& screenPos, int32_t extraY, uint8_t colour, int32_t numItems, int32_t itemWidth, + const ScreenCoordsXY& screenPos, int32_t extraY, ColourWithFlags colour, int32_t numItems, int32_t itemWidth, int32_t itemHeight, int32_t numColumns) { UseImages = _dropdownPrepareUseImages; @@ -221,7 +244,7 @@ namespace OpenRCT2::Ui::Windows UpdateSizeAndPosition(screenPos, extraY); - if (colour & COLOUR_FLAG_TRANSLUCENT) + if (colour.hasFlag(ColourFlag::translucent)) flags |= WF_TRANSPARENT; colours[0] = colour; } @@ -296,7 +319,7 @@ namespace OpenRCT2::Ui::Windows * @param colour (al) */ void WindowDropdownShowText( - const ScreenCoordsXY& screenPos, int32_t extray, uint8_t colour, uint8_t flags, size_t num_items) + const ScreenCoordsXY& screenPos, int32_t extray, ColourWithFlags colour, uint8_t flags, size_t num_items) { int32_t string_width, max_string_width; char buffer[256]; @@ -326,11 +349,11 @@ namespace OpenRCT2::Ui::Windows * @param custom_height (ah) requires flag set as well */ void WindowDropdownShowTextCustomWidth( - const ScreenCoordsXY& screenPos, int32_t extray, uint8_t colour, uint8_t custom_height, uint8_t flags, size_t num_items, - int32_t width) + const ScreenCoordsXY& screenPos, int32_t extray, ColourWithFlags colour, uint8_t custom_height, uint8_t flags, + size_t num_items, int32_t width) { InputSetFlag(static_cast(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP), false); - if (flags & Dropdown::Flag::StayOpen) + if (flags & Dropdown::Flag::StayOpen || Config::Get().interface.TouchEnhancements) InputSetFlag(INPUT_FLAG_DROPDOWN_STAY_OPEN, true); WindowDropdownClose(); @@ -358,11 +381,11 @@ namespace OpenRCT2::Ui::Windows * @param numColumns (bl) */ void WindowDropdownShowImage( - int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t flags, int32_t numItems, int32_t itemWidth, + 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); - if (flags & Dropdown::Flag::StayOpen) + if (flags & Dropdown::Flag::StayOpen || Config::Get().interface.TouchEnhancements) InputSetFlag(INPUT_FLAG_DROPDOWN_STAY_OPEN, true); // Close existing dropdown @@ -471,12 +494,13 @@ static constexpr colour_t kColoursDropdownOrder[] = { /** * rct2: 0x006ED43D */ - void WindowDropdownShowColour(WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour) + void WindowDropdownShowColour( + WindowBase* w, Widget* widget, ColourWithFlags dropdownColour, colour_t selectedColour, bool alwaysHideSpecialColours) { int32_t defaultIndex = -1; - auto numColours = (GetGameState().Cheats.AllowSpecialColourSchemes) ? static_cast(COLOUR_COUNT) - : COLOUR_NUM_NORMAL; + const bool specialColoursEnabled = !alwaysHideSpecialColours && GetGameState().Cheats.AllowSpecialColourSchemes; + auto numColours = specialColoursEnabled ? static_cast(COLOUR_COUNT) : COLOUR_NUM_NORMAL; // Set items for (uint64_t i = 0; i < numColours; i++) { @@ -493,9 +517,10 @@ static constexpr colour_t kColoursDropdownOrder[] = { } // Show dropdown + auto squareSize = DropdownWindow::GetDefaultRowHeight(); WindowDropdownShowImage( w->windowPos.x + widget->left, w->windowPos.y + widget->top, widget->height() + 1, dropdownColour, - Dropdown::Flag::StayOpen, numColours, 12, 12, + Dropdown::Flag::StayOpen, numColours, squareSize, squareSize, DropdownGetAppropriateImageDropdownItemsPerRow(static_cast(numColours))); gDropdownIsColour = true; @@ -509,11 +534,6 @@ static constexpr colour_t kColoursDropdownOrder[] = { return _appropriateImageDropdownItemsPerRow[std::min( numItems, static_cast(std::size(_appropriateImageDropdownItemsPerRow) - 1))]; } - - bool WindowDropDownHasMultipleColumns(size_t numItems) - { - return numItems > DROPDOWN_TEXT_MAX_ROWS; - } } // namespace OpenRCT2::Ui::Windows using namespace OpenRCT2::Ui::Windows; diff --git a/src/openrct2-ui/windows/EditorBottomToolbar.cpp b/src/openrct2-ui/windows/EditorBottomToolbar.cpp index 2fe2cda019..f275ac0594 100644 --- a/src/openrct2-ui/windows/EditorBottomToolbar.cpp +++ b/src/openrct2-ui/windows/EditorBottomToolbar.cpp @@ -285,7 +285,7 @@ static Widget _editorBottomToolbarWidgets[] = { dpi, ImageId(SPR_PREVIOUS), windowPos + ScreenCoordsXY{ widgets[WIDX_PREVIOUS_IMAGE].left + 6, widgets[WIDX_PREVIOUS_IMAGE].top + 6 }); - colour_t textColour = NOT_TRANSLUCENT(colours[1]); + colour_t textColour = colours[1].colour; if (gHoverWidget.window_classification == WindowClass::BottomToolbar && gHoverWidget.widget_index == WIDX_PREVIOUS_STEP_BUTTON) { @@ -323,7 +323,7 @@ static Widget _editorBottomToolbarWidgets[] = { dpi, ImageId(SPR_NEXT), windowPos + ScreenCoordsXY{ widgets[WIDX_NEXT_IMAGE].right - 29, widgets[WIDX_NEXT_IMAGE].top + 6 }); - colour_t textColour = NOT_TRANSLUCENT(colours[1]); + colour_t textColour = colours[1].colour; if (gHoverWidget.window_classification == WindowClass::BottomToolbar && gHoverWidget.widget_index == WIDX_NEXT_STEP_BUTTON) @@ -346,9 +346,10 @@ static Widget _editorBottomToolbarWidgets[] = { { int16_t stateX = (widgets[WIDX_PREVIOUS_IMAGE].right + widgets[WIDX_NEXT_IMAGE].left) / 2 + windowPos.x; int16_t stateY = height - 0x0C + windowPos.y; + auto colour = colours[2].withFlag(ColourFlag::translucent, false).withFlag(ColourFlag::withOutline, true); DrawTextBasic( dpi, { stateX, stateY }, _editorStepNames[EnumValue(GetGameState().EditorStep)], {}, - { static_cast(NOT_TRANSLUCENT(colours[2]) | COLOUR_FLAG_OUTLINE), TextAlignment::CENTRE }); + { colour, TextAlignment::CENTRE }); } static constexpr FuncPtr _previousButtonMouseUp[] = { diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index 5fde66cf74..374cef426d 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -230,11 +230,11 @@ static Widget _inventionListDragWidgets[] = { ScreenSize size{}; if (scrollIndex == 0) { - size.height = static_cast(gameState.ResearchItemsInvented.size()) * SCROLLABLE_ROW_HEIGHT; + size.height = static_cast(gameState.ResearchItemsInvented.size()) * kScrollableRowHeight; } else { - size.height = static_cast(gameState.ResearchItemsUninvented.size()) * SCROLLABLE_ROW_HEIGHT; + size.height = static_cast(gameState.ResearchItemsUninvented.size()) * kScrollableRowHeight; } return size; } @@ -275,18 +275,18 @@ static Widget _inventionListDragWidgets[] = { const auto& gameState = GetGameState(); // Draw background - uint8_t paletteIndex = ColourMapA[colours[1]].mid_light; + uint8_t paletteIndex = ColourMapA[colours[1].colour].mid_light; GfxClear(dpi, paletteIndex); int16_t boxWidth = widgets[WIDX_RESEARCH_ORDER_SCROLL].width(); - int32_t itemY = -SCROLLABLE_ROW_HEIGHT; + int32_t itemY = -kScrollableRowHeight; auto* dragItem = WindowEditorInventionsListDragGetItem(); const auto& researchList = scrollIndex == 0 ? gameState.ResearchItemsInvented : gameState.ResearchItemsUninvented; for (const auto& researchItem : researchList) { - itemY += SCROLLABLE_ROW_HEIGHT; - if (itemY + SCROLLABLE_ROW_HEIGHT < dpi.y || itemY >= dpi.y + dpi.height) + itemY += kScrollableRowHeight; + if (itemY + kScrollableRowHeight < dpi.y || itemY >= dpi.y + dpi.height) continue; if (_selectedResearchItem == &researchItem) @@ -296,7 +296,7 @@ static Widget _inventionListDragWidgets[] = { { // Highlight top = itemY; - bottom = itemY + SCROLLABLE_ROW_HEIGHT - 1; + bottom = itemY + kScrollableRowHeight - 1; } else { @@ -313,7 +313,7 @@ static Widget _inventionListDragWidgets[] = { // TODO: this parameter by itself produces very light text. // It needs a {BLACK} token in the string to work properly. - colour_t colour = COLOUR_BLACK; + ColourWithFlags colour = { COLOUR_BLACK }; FontStyle fontStyle = FontStyle::Medium; auto darkness = TextDarkness::Regular; @@ -323,7 +323,7 @@ static Widget _inventionListDragWidgets[] = { darkness = TextDarkness::ExtraDark; else darkness = TextDarkness::Dark; - colour = colours[1] | COLOUR_FLAG_INSET; + colour = colours[1].withFlag(ColourFlag::inset, true); } DrawResearchItem(dpi, researchItem, boxWidth, { 1, itemY }, STR_BLACK_STRING, { colour, fontStyle, darkness }); @@ -379,7 +379,7 @@ static Widget _inventionListDragWidgets[] = { dpi, { windowPos + ScreenCoordsXY{ bkWidget.left + 1, bkWidget.top + 1 }, windowPos + ScreenCoordsXY{ bkWidget.right - 1, bkWidget.bottom - 1 } }, - ColourMapA[colours[1]].darkest); + ColourMapA[colours[1].colour].darkest); auto* researchItem = WindowEditorInventionsListDragGetItem(); if (researchItem == nullptr || researchItem->IsNull()) @@ -559,7 +559,7 @@ static Widget _inventionListDragWidgets[] = { auto& researchList = isInvented ? gameState.ResearchItemsInvented : gameState.ResearchItemsUninvented; for (auto& researchItem : researchList) { - y -= SCROLLABLE_ROW_HEIGHT; + y -= kScrollableRowHeight; if (y < 0) { return &researchItem; @@ -575,7 +575,7 @@ static Widget _inventionListDragWidgets[] = { auto& researchList = isInvented ? gameState.ResearchItemsInvented : gameState.ResearchItemsUninvented; for (auto& researchItem : researchList) { - y -= SCROLLABLE_ROW_HEIGHT; + y -= kScrollableRowHeight; if (y < 0) { return &researchItem; @@ -658,7 +658,7 @@ static Widget _inventionListDragWidgets[] = { DrawResearchItem( dpi, _draggedItem, width, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, - { COLOUR_BLACK | static_cast(COLOUR_FLAG_OUTLINE) }); + { ColourWithFlags{ COLOUR_BLACK }.withFlag(ColourFlag::withOutline, true) }); } void Init(ResearchItem& researchItem, const ScreenCoordsXY& editorPos, int objectSelectionScrollWidth) diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index b2c945d4f8..0971266c0c 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -272,7 +272,7 @@ static std::vector _window_editor_object_selection_widgets = { widgets[WIDX_FILTER_TEXT_BOX].string = _filter_string; - _filter_flags = gConfigInterface.ObjectSelectionFilterFlags; + _filter_flags = Config::Get().interface.ObjectSelectionFilterFlags; std::fill_n(_filter_string, sizeof(_filter_string), 0x00); WindowInitScrollWidgets(*this); @@ -374,8 +374,8 @@ static std::vector _window_editor_object_selection_widgets = { break; case WIDX_FILTER_RIDE_TAB_ALL: _filter_flags |= FILTER_RIDES; - gConfigInterface.ObjectSelectionFilterFlags = _filter_flags; - ConfigSaveDefault(); + Config::Get().interface.ObjectSelectionFilterFlags = _filter_flags; + Config::Save(); FilterUpdateCounts(); VisibleListRefresh(); @@ -392,8 +392,8 @@ static std::vector _window_editor_object_selection_widgets = { case WIDX_FILTER_RIDE_TAB_STALL: _filter_flags &= ~FILTER_RIDES; _filter_flags |= (1 << (widgetIndex - WIDX_FILTER_RIDE_TAB_TRANSPORT + _numSourceGameItems)); - gConfigInterface.ObjectSelectionFilterFlags = _filter_flags; - ConfigSaveDefault(); + Config::Get().interface.ObjectSelectionFilterFlags = _filter_flags; + Config::Save(); FilterUpdateCounts(); VisibleListRefresh(); @@ -566,8 +566,8 @@ static std::vector _window_editor_object_selection_widgets = { { _filter_flags ^= (1 << dropdownIndex); } - gConfigInterface.ObjectSelectionFilterFlags = _filter_flags; - ConfigSaveDefault(); + Config::Get().interface.ObjectSelectionFilterFlags = _filter_flags; + Config::Save(); FilterUpdateCounts(); scrolls->v_top = 0; @@ -584,7 +584,7 @@ static std::vector _window_editor_object_selection_widgets = { */ ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - const auto newHeight = static_cast(_listItems.size() * SCROLLABLE_ROW_HEIGHT); + const auto newHeight = static_cast(_listItems.size() * kScrollableRowHeight); return { 0, newHeight }; } @@ -722,14 +722,14 @@ static std::vector _window_editor_object_selection_widgets = { ScreenCoordsXY screenCoords; bool ridePage = (GetSelectedObjectType() == ObjectType::Ride); - uint8_t paletteIndex = ColourMapA[colours[1]].mid_light; + uint8_t paletteIndex = ColourMapA[colours[1].colour].mid_light; GfxClear(dpi, paletteIndex); screenCoords.y = 0; for (size_t i = 0; i < _listItems.size(); i++) { const auto& listItem = _listItems[i]; - if (screenCoords.y + SCROLLABLE_ROW_HEIGHT >= dpi.y && screenCoords.y <= dpi.y + dpi.height) + if (screenCoords.y + kScrollableRowHeight >= dpi.y && screenCoords.y <= dpi.y + dpi.height) { // Draw checkbox if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && !(*listItem.flags & 0x20)) @@ -741,7 +741,7 @@ static std::vector _window_editor_object_selection_widgets = { && !(*listItem.flags & ObjectSelectionFlags::Flag6); if (highlighted) { - auto bottom = screenCoords.y + (SCROLLABLE_ROW_HEIGHT - 1); + auto bottom = screenCoords.y + (kScrollableRowHeight - 1); GfxFilterRect(dpi, { 0, screenCoords.y, width, bottom }, FilterPaletteID::PaletteDarken1); } @@ -750,13 +750,13 @@ static std::vector _window_editor_object_selection_widgets = { { screenCoords.x = 2; auto darkness = highlighted ? TextDarkness::ExtraDark : TextDarkness::Dark; - colour_t colour2 = NOT_TRANSLUCENT(colours[1]); + auto colour2 = colours[1].withFlag(ColourFlag::translucent, false); if (*listItem.flags & (ObjectSelectionFlags::InUse | ObjectSelectionFlags::AlwaysRequired)) - colour2 |= COLOUR_FLAG_INSET; + colour2.setFlag(ColourFlag::inset, true); - GfxDrawString( - dpi, screenCoords, static_cast(CheckBoxMarkString), - { static_cast(colour2), FontStyle::Medium, darkness }); + DrawText( + dpi, screenCoords, { colour2, FontStyle::Medium, darkness }, + static_cast(CheckBoxMarkString)); } screenCoords.x = gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 15; @@ -768,7 +768,7 @@ static std::vector _window_editor_object_selection_widgets = { auto darkness = TextDarkness::Regular; if (*listItem.flags & ObjectSelectionFlags::Flag6) { - colour = colours[1] & 0x7F; + colour = colours[1].colour; darkness = TextDarkness::Dark; } @@ -800,7 +800,7 @@ static std::vector _window_editor_object_selection_widgets = { ft.Add(gCommonStringFormatBuffer); DrawTextEllipsised(dpi, screenCoords, width_limit, STR_STRING, ft, { colour, FontStyle::Medium, darkness }); } - screenCoords.y += SCROLLABLE_ROW_HEIGHT; + screenCoords.y += kScrollableRowHeight; } } @@ -906,7 +906,7 @@ static std::vector _window_editor_object_selection_widgets = { } } - if (gConfigGeneral.DebuggingTools) + if (Config::Get().general.DebuggingTools) widgets[WIDX_RELOAD_OBJECT].type = WindowWidgetType::ImgBtn; else widgets[WIDX_RELOAD_OBJECT].type = WindowWidgetType::Empty; @@ -1032,7 +1032,7 @@ static std::vector _window_editor_object_selection_widgets = { spriteIndex += (i == 4 ? ThrillRidesTabAnimationSequence[frame] : frame); auto screenPos = windowPos + ScreenCoordsXY{ widget.left, widget.top }; - GfxDrawSprite(dpi, ImageId(spriteIndex, colours[1]), screenPos); + GfxDrawSprite(dpi, ImageId(spriteIndex, colours[1].colour), screenPos); } } @@ -1042,7 +1042,7 @@ static std::vector _window_editor_object_selection_widgets = { dpi, { windowPos + ScreenCoordsXY{ previewWidget.left + 1, previewWidget.top + 1 }, windowPos + ScreenCoordsXY{ previewWidget.right - 1, previewWidget.bottom - 1 } }, - ColourMapA[colours[1]].darkest); + ColourMapA[colours[1].colour].darkest); // Draw number of selected items if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) @@ -1538,7 +1538,7 @@ static std::vector _window_editor_object_selection_widgets = { */ int32_t GetObjectFromObjectSelection(ObjectType object_type, int32_t y) { - int32_t listItemIndex = y / SCROLLABLE_ROW_HEIGHT; + int32_t listItemIndex = y / kScrollableRowHeight; if (listItemIndex < 0 || static_cast(listItemIndex) >= _listItems.size()) return -1; diff --git a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp index 4d59238c87..a94967d25f 100644 --- a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp +++ b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" #include "../interface/Dropdown.h" #include "../interface/Widget.h" #include "../interface/Window.h" @@ -16,13 +17,12 @@ #include #include #include -#include #include +#include #include #include #include #include -#include #include #include #include @@ -949,7 +949,7 @@ static uint64_t window_editor_objective_options_page_hold_down_widgets[] = { ft.Add(gameState.ScenarioObjective.Currency); break; } - DrawTextBasic(dpi, screenCoords, stringId, ft, COLOUR_BLACK); + DrawTextBasic(dpi, screenCoords, stringId, ft, { COLOUR_BLACK }); } if (widgets[WIDX_OBJECTIVE_ARG_2].type != WindowWidgetType::Empty) @@ -1142,7 +1142,7 @@ static uint64_t window_editor_objective_options_page_hold_down_widgets[] = { */ void OnScrollDrawRides(DrawPixelInfo& dpi, int32_t scrollIndex) { - int32_t colour = ColourMapA[colours[1]].mid_light; + int32_t colour = ColourMapA[colours[1].colour].mid_light; GfxFillRect(dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, colour); for (int32_t i = 0; i < static_cast(_rideableRides.size()); i++) @@ -1170,9 +1170,9 @@ static uint64_t window_editor_objective_options_page_hold_down_widgets[] = { if (currentRide->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE) { auto darkness = stringId == STR_WINDOW_COLOUR_2_STRINGID ? TextDarkness::ExtraDark : TextDarkness::Dark; - GfxDrawString( - dpi, { 2, y }, static_cast(CheckBoxMarkString), - { static_cast(colours[1] & 0x7F), FontStyle::Medium, darkness }); + DrawText( + dpi, { 2, y }, { colours[1].withFlag(ColourFlag::translucent, false), FontStyle::Medium, darkness }, + static_cast(CheckBoxMarkString)); } // Ride name diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index ef42cfa3c1..0940a74a26 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" #include "../interface/Dropdown.h" #include "../interface/Widget.h" #include "../interface/Window.h" @@ -23,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/openrct2-ui/windows/Error.cpp b/src/openrct2-ui/windows/Error.cpp index fb6273f752..c835b619b2 100644 --- a/src/openrct2-ui/windows/Error.cpp +++ b/src/openrct2-ui/windows/Error.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include #include #include @@ -36,11 +38,13 @@ static Widget window_error_widgets[] = { std::string _text; uint16_t _numLines; uint8_t _staleCount; + bool _autoClose; public: - ErrorWindow(std::string text, uint16_t numLines) + ErrorWindow(std::string text, uint16_t numLines, bool autoClose) : _text(std::move(text)) , _numLines(numLines) + , _autoClose(autoClose) { } @@ -108,9 +112,18 @@ static Widget window_error_widgets[] = { Close(); } } + + void OnUpdate() override + { + // Automatically close previous screenshot messages before new screenshot is taken + if (_autoClose && gScreenshotCountdown > 0) + { + Close(); + } + } }; - WindowBase* ErrorOpen(std::string_view title, std::string_view message) + WindowBase* ErrorOpen(std::string_view title, std::string_view message, bool autoClose) { std::string buffer = "{BLACK}"; buffer.append(title); @@ -159,16 +172,16 @@ static Widget window_error_widgets[] = { windowPosition.y = std::min(windowPosition.y - height - 40, maxY); } - auto errorWindow = std::make_unique(std::move(buffer), numLines); + auto errorWindow = std::make_unique(std::move(buffer), numLines, autoClose); return WindowCreate( std::move(errorWindow), WindowClass::Error, windowPosition, width, height, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_RESIZABLE); } - WindowBase* ErrorOpen(StringId title, StringId message, const Formatter& args) + WindowBase* ErrorOpen(StringId title, StringId message, const Formatter& args, bool autoClose) { auto titlez = FormatStringIDLegacy(title, args.Data()); auto messagez = FormatStringIDLegacy(message, args.Data()); - return ErrorOpen(titlez, messagez); + return ErrorOpen(titlez, messagez, autoClose); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Finances.cpp b/src/openrct2-ui/windows/Finances.cpp index a35712ceb7..2cccab1b92 100644 --- a/src/openrct2-ui/windows/Finances.cpp +++ b/src/openrct2-ui/windows/Finances.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -381,7 +380,7 @@ static Widget _windowFinancesResearchWidgets[] = dpi, { screenCoords - ScreenCoordsXY{ 0, 1 }, screenCoords + ScreenCoordsXY{ row_width, (kTableCellHeight - 2) } }, - ColourMapA[colours[1]].lighter | 0x1000000); + ColourMapA[colours[1].colour].lighter | 0x1000000); screenCoords.y += kTableCellHeight; } @@ -554,7 +553,7 @@ static Widget _windowFinancesResearchWidgets[] = GfxFillRect( dpi, { screenCoords - ScreenCoordsXY{ 0, 1 }, screenCoords + ScreenCoordsXY{ 121, (kTableCellHeight - 2) } }, - ColourMapA[colours[1]].lighter | 0x1000000); + ColourMapA[colours[1].colour].lighter | 0x1000000); DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, _windowFinancesSummaryRowLabels[i]); screenCoords.y += kTableCellHeight; @@ -604,7 +603,7 @@ static Widget _windowFinancesResearchWidgets[] = uint16_t SummaryMaxAvailableMonth() { - return std::min(GetDate().GetMonthsElapsed(), EXPENDITURE_TABLE_MONTH_COUNT - 1); + return std::min(GetDate().GetMonthsElapsed(), kExpenditureTableMonthCount - 1); } #pragma endregion @@ -806,7 +805,7 @@ static Widget _windowFinancesResearchWidgets[] = void OnPrepareDrawMarketing() { // Count number of active campaigns - int32_t numActiveCampaigns = static_cast(gMarketingCampaigns.size()); + int32_t numActiveCampaigns = static_cast(GetGameState().MarketingCampaigns.size()); int32_t y = std::max(1, numActiveCampaigns) * kListRowHeight + 92; // Update group box positions diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index df62fb269a..a679d10314 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -33,6 +33,7 @@ #include #include #include +#include namespace OpenRCT2::Ui::Windows { @@ -446,11 +447,11 @@ static constexpr uint8_t ConstructionPreviewImages[][4] = { uint8_t slope = 0; if (gFootpathConstructSlope == 2) { - slope = TILE_ELEMENT_SLOPE_N_CORNER_UP; + slope = kTileSlopeNCornerUp; } else if (gFootpathConstructSlope == 6) { - slope = TILE_ELEMENT_SLOPE_E_CORNER_UP; + slope = kTileSlopeECornerUp; } std::optional baseImage; @@ -817,7 +818,7 @@ static constexpr uint8_t ConstructionPreviewImages[][4] = { auto surfaceElement = info.Element->AsSurface(); if (surfaceElement != nullptr) { - slope = DefaultPathSlope[surfaceElement->GetSlope() & kTileElementSurfaceRaisedCornersMask]; + slope = DefaultPathSlope[surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask]; } break; } @@ -882,11 +883,11 @@ static constexpr uint8_t ConstructionPreviewImages[][4] = { if (tileElement->GetType() == TileElementType::Surface) { uint8_t slope = tileElement->AsSurface()->GetSlope(); - if (slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + if (slope & kTileSlopeRaisedCornersMask) { z += PATH_HEIGHT_STEP; } // Add 2 for a slope - if (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (slope & kTileSlopeDiagonalFlag) z += PATH_HEIGHT_STEP; // Add another 2 for a steep slope } @@ -922,7 +923,7 @@ static constexpr uint8_t ConstructionPreviewImages[][4] = { switch (info.SpriteType) { case ViewportInteractionItem::Terrain: - slope = DefaultPathSlope[info.Element->AsSurface()->GetSlope() & kTileElementSurfaceRaisedCornersMask]; + slope = DefaultPathSlope[info.Element->AsSurface()->GetSlope() & kTileSlopeRaisedCornersMask]; break; case ViewportInteractionItem::Footpath: slope = info.Element->AsPath()->GetSlopeDirection(); @@ -985,12 +986,12 @@ static constexpr uint8_t ConstructionPreviewImages[][4] = { // expect the path to be slightly raised as well. uint8_t slope = tileElement->AsSurface()->GetSlope(); z = tileElement->GetBaseZ(); - if (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (slope & kTileSlopeDiagonalFlag) { // Steep diagonal slope z += 2 * PATH_HEIGHT_STEP; } - else if (slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + else if (slope & kTileSlopeRaisedCornersMask) { // Normal slope z += PATH_HEIGHT_STEP; @@ -1237,11 +1238,11 @@ static constexpr uint8_t ConstructionPreviewImages[][4] = { // Set pressed slope widget int32_t slope = gFootpathConstructSlope; - if (slope == TILE_ELEMENT_SLOPE_SE_SIDE_UP) + if (slope == kTileSlopeSESideUp) { pressedWidgets |= (1uLL << WIDX_SLOPEDOWN); } - else if (slope == TILE_ELEMENT_SLOPE_FLAT) + else if (slope == kTileSlopeFlat) { pressedWidgets |= (1uLL << WIDX_LEVEL); } @@ -1289,14 +1290,14 @@ static constexpr uint8_t ConstructionPreviewImages[][4] = { { *type = gFootpathSelection.GetSelectedSurface(); } - *slope = TILE_ELEMENT_SLOPE_FLAT; + *slope = kTileSlopeFlat; if (gFootpathConstructSlope != 0) { - *slope = _footpathConstructDirection | TILE_ELEMENT_SLOPE_S_CORNER_UP; + *slope = _footpathConstructDirection | kTileSlopeSCornerUp; if (gFootpathConstructSlope != 2) { footpathLoc.z -= PATH_HEIGHT_STEP; - *slope ^= TILE_ELEMENT_SLOPE_E_CORNER_UP; + *slope ^= kTileSlopeECornerUp; } } } diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index 6b76cc1708..f4f48dbe88 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -75,6 +76,14 @@ static Widget window_game_bottom_toolbar_widgets[] = class GameBottomToolbar final : public Window { private: + colour_t GetHoverWidgetColour(WidgetIndex index) + { + return ( + gHoverWidget.window_classification == WindowClass::BottomToolbar && gHoverWidget.widget_index == index + ? static_cast(COLOUR_WHITE) + : colours[0].colour); + } + void DrawLeftPanel(DrawPixelInfo& dpi) { const auto topLeft = windowPos @@ -98,11 +107,7 @@ static Widget window_game_bottom_toolbar_widgets[] = auto screenCoords = ScreenCoordsXY{ windowPos.x + widget.midX(), windowPos.y + widget.midY() - (line_height == 10 ? 5 : 6) }; - colour_t colour - = (gHoverWidget.window_classification == WindowClass::BottomToolbar - && gHoverWidget.widget_index == WIDX_MONEY - ? COLOUR_WHITE - : NOT_TRANSLUCENT(colours[0])); + auto colour = GetHoverWidgetColour(WIDX_MONEY); StringId stringId = gameState.Cash < 0 ? STR_BOTTOM_TOOLBAR_CASH_NEGATIVE : STR_BOTTOM_TOOLBAR_CASH; auto ft = Formatter(); ft.Add(gameState.Cash); @@ -128,11 +133,7 @@ static Widget window_game_bottom_toolbar_widgets[] = StringId stringId = gameState.NumGuestsInPark == 1 ? _guestCountFormatsSingular[gameState.GuestChangeModifier] : _guestCountFormats[gameState.GuestChangeModifier]; - colour_t colour - = (gHoverWidget.window_classification == WindowClass::BottomToolbar - && gHoverWidget.widget_index == WIDX_GUESTS - ? COLOUR_WHITE - : NOT_TRANSLUCENT(colours[0])); + auto colour = GetHoverWidgetColour(WIDX_GUESTS); auto ft = Formatter(); ft.Add(gameState.NumGuestsInPark); DrawTextBasic(dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); @@ -143,7 +144,7 @@ static Widget window_game_bottom_toolbar_widgets[] = Widget widget = window_game_bottom_toolbar_widgets[WIDX_PARK_RATING]; auto screenCoords = windowPos + ScreenCoordsXY{ widget.left + 11, widget.midY() - 5 }; - DrawParkRating(dpi, colours[3], 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)); } } @@ -157,7 +158,8 @@ static Widget window_game_bottom_toolbar_widgets[] = if (bar_width > 2) { GfxFillRectInset( - dpi, { coords + ScreenCoordsXY{ 2, 2 }, coords + ScreenCoordsXY{ bar_width - 1, 8 } }, colour, 0); + dpi, { coords + ScreenCoordsXY{ 2, 2 }, coords + ScreenCoordsXY{ bar_width - 1, 8 } }, + ColourWithFlags{ static_cast(colour) }, 0); } } @@ -189,11 +191,8 @@ static Widget window_game_bottom_toolbar_widgets[] = int32_t month = date.GetMonth(); int32_t day = date.GetDay(); - colour_t colour - = (gHoverWidget.window_classification == WindowClass::BottomToolbar && gHoverWidget.widget_index == WIDX_DATE - ? COLOUR_WHITE - : NOT_TRANSLUCENT(colours[0])); - StringId stringId = DateFormatStringFormatIds[gConfigGeneral.DateFormat]; + auto colour = GetHoverWidgetColour(WIDX_DATE); + StringId stringId = DateFormatStringFormatIds[Config::Get().general.DateFormat]; auto ft = Formatter(); ft.Add(DateDayNames[day]); ft.Add(month); @@ -209,7 +208,7 @@ static Widget window_game_bottom_toolbar_widgets[] = int32_t temperature = OpenRCT2::GetGameState().ClimateCurrent.Temperature; StringId format = STR_CELSIUS_VALUE; - if (gConfigGeneral.TemperatureFormat == TemperatureUnit::Fahrenheit) + if (Config::Get().general.TemperatureFormat == TemperatureUnit::Fahrenheit) { temperature = ClimateCelsiusToFahrenheit(temperature); format = STR_FAHRENHEIT_VALUE; @@ -296,15 +295,18 @@ static Widget window_game_bottom_toolbar_widgets[] = auto* guest = peep->As(); if (guest != nullptr) { - if (image_id_base >= 0x2A1D && image_id_base < 0x2A3D) + if (image_id_base >= kPeepSpriteBalloonStateWatchRideId + && image_id_base < kPeepSpriteBalloonStateSittingIdleId + 4) { GfxDrawSprite(cliped_dpi, ImageId(image_id_base + 32, guest->BalloonColour), clipCoords); } - else if (image_id_base >= 0x2BBD && image_id_base < 0x2BDD) + if (image_id_base >= kPeepSpriteUmbrellaStateNoneId + && image_id_base < kPeepSpriteUmbrellaStateSittingIdleId + 4) { GfxDrawSprite(cliped_dpi, ImageId(image_id_base + 32, guest->UmbrellaColour), clipCoords); } - else if (image_id_base >= 0x29DD && image_id_base < 0x29FD) + if (image_id_base >= kPeepSpriteHatStateWatchRideId + && image_id_base < kPeepSpriteHatStateSittingIdleId + 4) { GfxDrawSprite(cliped_dpi, ImageId(image_id_base + 32, guest->HatColour), clipCoords); } diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index de6f83a9e6..62980189fd 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -69,7 +70,9 @@ namespace OpenRCT2::Ui::Windows WIDX_TAB_6, WIDX_TAB_7, - WIDX_MARQUEE = 11, + WIDX_TAB_CONTENT_START, + + WIDX_MARQUEE = WIDX_TAB_CONTENT_START, WIDX_VIEWPORT, WIDX_ACTION_LBL, WIDX_PICKUP, @@ -77,7 +80,14 @@ namespace OpenRCT2::Ui::Windows WIDX_LOCATE, WIDX_TRACK, - WIDX_RIDE_SCROLL = 11 + WIDX_HAPPINESS_BAR = WIDX_TAB_CONTENT_START, + WIDX_ENERGY_BAR, + WIDX_HUNGER_BAR, + WIDX_THIRST_BAR, + WIDX_NAUSEA_BAR, + WIDX_TOILET_BAR, + + WIDX_RIDE_SCROLL = WIDX_TAB_CONTENT_START, }; validate_global_widx(WC_PEEP, WIDX_PICKUP); @@ -111,6 +121,12 @@ static Widget _guestWindowWidgetsOverview[] = { static 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 kWidgetsEnd, }; @@ -473,7 +489,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT); { newDisabledWidgets |= (1uLL << WIDX_TAB_4); // Disable finance tab if no money } - if (!gConfigGeneral.DebuggingTools) + if (!Config::Get().general.DebuggingTools) { newDisabledWidgets |= (1uLL << WIDX_TAB_7); // Disable debug tab when debug tools not turned on } @@ -561,19 +577,21 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT); if (guest != nullptr) { // If holding a balloon - if (animationFrame >= 0x2A1D && animationFrame < 0x2A3D) + if (animationFrame >= kPeepSpriteBalloonStateWatchRideId + && animationFrame < kPeepSpriteBalloonStateSittingIdleId + 4) { GfxDrawSprite(clipDpi, ImageId(animationFrame + 32, guest->BalloonColour), screenCoords); } // If holding umbrella - if (animationFrame >= 0x2BBD && animationFrame < 0x2BDD) + if (animationFrame >= kPeepSpriteUmbrellaStateNoneId + && animationFrame < kPeepSpriteUmbrellaStateSittingIdleId + 4) { GfxDrawSprite(clipDpi, ImageId(animationFrame + 32, guest->UmbrellaColour), screenCoords); } // If wearing hat - if (animationFrame >= 0x29DD && animationFrame < 0x29FD) + if (animationFrame >= kPeepSpriteHatStateWatchRideId && animationFrame < kPeepSpriteHatStateSittingIdleId + 4) { GfxDrawSprite(clipDpi, ImageId(animationFrame + 32, guest->HatColour), screenCoords); } @@ -1033,38 +1051,14 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT); Invalidate(); } - void StatsBarsDraw(int32_t value, const ScreenCoordsXY& origCoords, DrawPixelInfo& dpi, int32_t colour, bool blinkFlag) - { - auto coords = origCoords; - if (FontGetLineHeight(FontStyle::Medium) > 10) - { - coords.y += 1; - } - - GfxFillRectInset( - dpi, { coords + ScreenCoordsXY{ 61, 1 }, coords + ScreenCoordsXY{ 61 + 121, 9 } }, colours[1], INSET_RECT_F_30); - - if (!blinkFlag || GameIsPaused() || (gCurrentRealTimeTicks & 8) == 0) - { - value *= 118; - value >>= 8; - - if (value <= 2) - return; - - GfxFillRectInset( - dpi, { coords + ScreenCoordsXY{ 63, 2 }, coords + ScreenCoordsXY{ 63 + value - 1, 8 } }, colour, 0); - } - } - /** - * Takes a guest stat value (scaled to currMax) and adjusts it to be scaled out of 255. - * Then clamp the value to between newMin and 255. + * Takes a guest stat value (scaled to currMax) and adjusts it to be scaled out of 100. + * Then clamp the value to between newMin and 100. */ int32_t NormalizeGuestStatValue(int32_t value, int32_t currMax, int32_t newMin) const { - int32_t newValue = (value * 255) / currMax; - return std::clamp(newValue, newMin, 255); + int32_t newValue = (value * 100) / currMax; + return std::clamp(newValue, newMin, 100); } void OnDrawStats(DrawPixelInfo& dpi) @@ -1093,57 +1087,46 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT); // Happiness DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_HAPPINESS_LABEL); - int32_t happiness = NormalizeGuestStatValue(peep->Happiness, kPeepMaxHappiness, 10); - int32_t barColour = COLOUR_BRIGHT_GREEN; - bool barBlink = happiness < 50; - StatsBarsDraw(happiness, screenCoords, dpi, barColour, barBlink); + int32_t happinessPercentage = NormalizeGuestStatValue(peep->Happiness, kPeepMaxHappiness, 10); + WidgetProgressBarSetNewPercentage(widgets[WIDX_HAPPINESS_BAR], happinessPercentage); // Energy screenCoords.y += kListRowHeight; DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_ENERGY_LABEL); - int32_t energy = NormalizeGuestStatValue(peep->Energy - kPeepMinEnergy, kPeepMaxEnergy - kPeepMinEnergy, 10); - barColour = COLOUR_BRIGHT_GREEN; - barBlink = energy < 50; - StatsBarsDraw(energy, screenCoords, dpi, barColour, barBlink); + int32_t energyPercentage = NormalizeGuestStatValue( + peep->Energy - kPeepMinEnergy, kPeepMaxEnergy - kPeepMinEnergy, 10); + WidgetProgressBarSetNewPercentage(widgets[WIDX_ENERGY_BAR], energyPercentage); // Hunger screenCoords.y += kListRowHeight; DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_HUNGER_LABEL); - int32_t hunger = NormalizeGuestStatValue(peep->Hunger - 32, 158, 0); - hunger = 255 - hunger; // the bar should be longer when peep->Hunger is low - barColour = COLOUR_BRIGHT_RED; - barBlink = hunger > 170; - StatsBarsDraw(hunger, screenCoords, dpi, barColour, barBlink); + int32_t hungerPercentage = NormalizeGuestStatValue(peep->Hunger - 32, 158, 0); + hungerPercentage = 100 - hungerPercentage; // the bar should be longer when peep->Hunger is low + WidgetProgressBarSetNewPercentage(widgets[WIDX_HUNGER_BAR], hungerPercentage); // Thirst screenCoords.y += kListRowHeight; DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_THIRST_LABEL); - int32_t thirst = NormalizeGuestStatValue(peep->Thirst - 32, 158, 0); - thirst = 255 - thirst; // the bar should be longer when peep->Thirst is low - barColour = COLOUR_BRIGHT_RED; - barBlink = thirst > 170; - StatsBarsDraw(thirst, screenCoords, dpi, barColour, barBlink); + int32_t thirstPercentage = NormalizeGuestStatValue(peep->Thirst - 32, 158, 0); + thirstPercentage = 100 - thirstPercentage; // the bar should be longer when peep->Thirst is low + WidgetProgressBarSetNewPercentage(widgets[WIDX_THIRST_BAR], thirstPercentage); // Nausea screenCoords.y += kListRowHeight; DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_NAUSEA_LABEL); - int32_t nausea = NormalizeGuestStatValue(peep->Nausea - 32, 223, 0); - barColour = COLOUR_BRIGHT_RED; - barBlink = nausea > 120; - StatsBarsDraw(nausea, screenCoords, dpi, barColour, barBlink); + int32_t nauseaPercentage = NormalizeGuestStatValue(peep->Nausea - 32, 223, 0); + WidgetProgressBarSetNewPercentage(widgets[WIDX_NAUSEA_BAR], nauseaPercentage); // Toilet screenCoords.y += kListRowHeight; DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TOILET_LABEL); - int32_t toilet = NormalizeGuestStatValue(peep->Toilet - 64, 178, 0); - barColour = COLOUR_BRIGHT_RED; - barBlink = toilet > 160; - StatsBarsDraw(toilet, screenCoords, dpi, barColour, barBlink); + int32_t toiletPercentage = NormalizeGuestStatValue(peep->Toilet - 64, 178, 0); + WidgetProgressBarSetNewPercentage(widgets[WIDX_TOILET_BAR], toiletPercentage); // Time in park screenCoords.y += kListRowHeight + 1; @@ -1353,7 +1336,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT); void OnScrollDrawRides(int32_t scrollIndex, DrawPixelInfo& dpi) { - auto colour = ColourMapA[colours[1]].mid_light; + auto colour = ColourMapA[colours[1].colour].mid_light; GfxFillRect(dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, colour); for (int32_t listIndex = 0; listIndex < static_cast(_riddenRides.size()); listIndex++) @@ -1862,7 +1845,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT); OpenRCT2::FormatStringLegacy(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SLOPE, ft2.Data()); SafeStrCat(buffer, buffer2, sizeof(buffer)); } - GfxDrawString(dpi, screenCoords, buffer, {}); + DrawText(dpi, screenCoords, {}, buffer); } screenCoords.y += kListRowHeight; { @@ -1921,7 +1904,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT); if (window == nullptr) { int32_t windowWidth = 192; - if (gConfigGeneral.DebuggingTools) + if (Config::Get().general.DebuggingTools) windowWidth += TabWidth; window = WindowCreate(WindowClass::Peep, windowWidth, 157, WF_RESIZABLE); diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 8770ed1210..f0086cfd8c 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -130,9 +129,9 @@ static Widget window_guest_list_widgets[] = { char Name[256]; }; - static constexpr uint8_t SUMMARISED_GUEST_ROW_HEIGHT = SCROLLABLE_ROW_HEIGHT + 11; + static constexpr uint8_t SUMMARISED_GUEST_ROW_HEIGHT = kScrollableRowHeight + 11; static constexpr auto GUESTS_PER_PAGE = 2000; - static constexpr const auto GUEST_PAGE_HEIGHT = GUESTS_PER_PAGE * SCROLLABLE_ROW_HEIGHT; + static constexpr const auto GUEST_PAGE_HEIGHT = GUESTS_PER_PAGE * kScrollableRowHeight; static constexpr size_t MaxGroups = 240; TabId _selectedTab{}; @@ -501,7 +500,7 @@ static Widget window_guest_list_widgets[] = { { case TabId::Individual: // Count the number of guests - y = static_cast(_guestList.size()) * SCROLLABLE_ROW_HEIGHT; + y = static_cast(_guestList.size()) * kScrollableRowHeight; _numPages = (_guestList.size() + GUESTS_PER_PAGE - 1) / GUESTS_PER_PAGE; if (_numPages == 0) _selectedPage = 0; @@ -540,7 +539,7 @@ static Widget window_guest_list_widgets[] = { void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - auto i = screenCoords.y / (_selectedTab == TabId::Individual ? SCROLLABLE_ROW_HEIGHT : SUMMARISED_GUEST_ROW_HEIGHT); + auto i = screenCoords.y / (_selectedTab == TabId::Individual ? kScrollableRowHeight : SUMMARISED_GUEST_ROW_HEIGHT); i += static_cast(_selectedPage * GUESTS_PER_PAGE); if (static_cast(i) != _highlightedIndex) { @@ -555,7 +554,7 @@ static Widget window_guest_list_widgets[] = { { case TabId::Individual: { - auto i = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + auto i = screenCoords.y / kScrollableRowHeight; i += static_cast(_selectedPage * GUESTS_PER_PAGE); for (const auto& guestItem : _guestList) { @@ -595,7 +594,8 @@ static Widget window_guest_list_widgets[] = { void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { GfxFillRect( - dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); + dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, + ColourMapA[colours[1].colour].mid_light); switch (_selectedTab) { case TabId::Individual: @@ -668,14 +668,14 @@ static Widget window_guest_list_widgets[] = { for (const auto& guestItem : _guestList) { // Check if y is beyond the scroll control - if (y + SCROLLABLE_ROW_HEIGHT + 1 >= -0x7FFF && y + SCROLLABLE_ROW_HEIGHT + 1 > dpi.y && y < 0x7FFF + if (y + kScrollableRowHeight + 1 >= -0x7FFF && y + kScrollableRowHeight + 1 > dpi.y && y < 0x7FFF && y < dpi.y + dpi.height) { // Highlight backcolour and text colour (format) StringId format = STR_BLACK_STRING; if (index == _highlightedIndex) { - GfxFilterRect(dpi, { 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(dpi, { 0, y, 800, y + kScrollableRowHeight - 1 }, FilterPaletteID::PaletteDarken1); format = STR_WINDOW_COLOUR_2_STRINGID; } @@ -723,7 +723,7 @@ static Widget window_guest_list_widgets[] = { break; } } - y += SCROLLABLE_ROW_HEIGHT; + y += kScrollableRowHeight; index++; } } diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index c6bc924b8e..ce5a8f1376 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -7,6 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include @@ -152,7 +154,7 @@ static Widget window_install_track_widgets[] = { // Track preview Widget* widget = &window_install_track_widgets[WIDX_TRACK_PREVIEW]; auto screenPos = windowPos + ScreenCoordsXY{ widget->left + 1, widget->top + 1 }; - int32_t colour = ColourMapA[colours[0]].darkest; + int32_t colour = ColourMapA[colours[0].colour].darkest; GfxFillRect(dpi, { screenPos, screenPos + ScreenCoordsXY{ 369, 216 } }, colour); G1Element g1temp = {}; @@ -167,8 +169,8 @@ static Widget window_install_track_widgets[] = { screenPos = windowPos + ScreenCoordsXY{ widget->midX(), widget->bottom - 12 }; // Warnings - const TrackDesign* td6 = _trackDesign.get(); - if (td6->track_flags & TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE) + const TrackDesign& td = *_trackDesign; + if (td.gameStateData.hasFlag(TrackDesignGameStateFlag::SceneryUnavailable)) { if (!gTrackDesignSceneryToggle) { @@ -196,17 +198,17 @@ static Widget window_install_track_widgets[] = { { auto ft = Formatter(); - const auto* objectEntry = ObjectManagerLoadObject(&td6->vehicle_object.Entry); + const auto* objectEntry = ObjectManagerLoadObject(&td.trackAndVehicle.vehicleObject.Entry); if (objectEntry != nullptr) { auto groupIndex = ObjectManagerGetLoadedObjectEntryIndex(objectEntry); - auto rideName = GetRideNaming(td6->type, *GetRideEntryByIndex(groupIndex)); + auto rideName = GetRideNaming(td.trackAndVehicle.rtdIndex, *GetRideEntryByIndex(groupIndex)); ft.Add(rideName.Name); } else { // Fall back on the technical track name if the vehicle object cannot be loaded - ft.Add(GetRideTypeDescriptor(td6->type).Naming.Name); + ft.Add(GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex).Naming.Name); } DrawTextBasic(dpi, screenPos, STR_TRACK_DESIGN_TYPE, ft); @@ -215,36 +217,35 @@ static Widget window_install_track_widgets[] = { // Stats { - fixed32_2dp rating = td6->excitement * 10; + fixed32_2dp rating = td.statistics.ratings.excitement; auto ft = Formatter(); ft.Add(rating); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); screenPos.y += kListRowHeight; } { - fixed32_2dp rating = td6->intensity * 10; + fixed32_2dp rating = td.statistics.ratings.intensity; auto ft = Formatter(); ft.Add(rating); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); screenPos.y += kListRowHeight; } { - fixed32_2dp rating = td6->nausea * 10; + fixed32_2dp rating = td.statistics.ratings.nausea; auto ft = Formatter(); ft.Add(rating); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); screenPos.y += kListRowHeight + 4; } - const auto& rtd = GetRideTypeDescriptor(td6->type); + const auto& rtd = GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex); if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - if (td6->type == RIDE_TYPE_MINI_GOLF) + if (td.trackAndVehicle.rtdIndex == RIDE_TYPE_MINI_GOLF) { // Holes - uint16_t holes = td6->holes & 0x1F; auto ft = Formatter(); - ft.Add(holes); + ft.Add(td.statistics.holes); DrawTextBasic(dpi, screenPos, STR_HOLES, ft); screenPos.y += kListRowHeight; } @@ -252,7 +253,7 @@ static Widget window_install_track_widgets[] = { { // Maximum speed { - uint16_t speed = ((td6->max_speed << 16) * 9) >> 18; + uint16_t speed = ((td.statistics.maxSpeed << 16) * 9) >> 18; auto ft = Formatter(); ft.Add(speed); DrawTextBasic(dpi, screenPos, STR_MAX_SPEED, ft); @@ -260,7 +261,7 @@ static Widget window_install_track_widgets[] = { } // Average speed { - uint16_t speed = ((td6->average_speed << 16) * 9) >> 18; + uint16_t speed = ((td.statistics.averageSpeed << 16) * 9) >> 18; auto ft = Formatter(); ft.Add(speed); DrawTextBasic(dpi, screenPos, STR_AVERAGE_SPEED, ft); @@ -271,16 +272,16 @@ static Widget window_install_track_widgets[] = { // Ride length auto ft = Formatter(); ft.Add(STR_RIDE_LENGTH_ENTRY); - ft.Add(td6->ride_length); + ft.Add(td.statistics.rideLength); DrawTextEllipsised(dpi, screenPos, 214, STR_TRACK_LIST_RIDE_LENGTH, ft); screenPos.y += kListRowHeight; } - if (GetRideTypeDescriptor(td6->type).HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES)) + if (GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex).HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES)) { // Maximum positive vertical Gs { - int32_t gForces = td6->max_positive_vertical_g * 32; + int32_t gForces = td.statistics.maxPositiveVerticalG; auto ft = Formatter(); ft.Add(gForces); DrawTextBasic(dpi, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); @@ -288,7 +289,7 @@ static Widget window_install_track_widgets[] = { } // Maximum negative vertical Gs { - int32_t gForces = td6->max_negative_vertical_g * 32; + int32_t gForces = td.statistics.maxNegativeVerticalG; auto ft = Formatter(); ft.Add(gForces); DrawTextBasic(dpi, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); @@ -296,16 +297,15 @@ static Widget window_install_track_widgets[] = { } // Maximum lateral Gs { - int32_t gForces = td6->max_lateral_g * 32; + int32_t gForces = td.statistics.maxLateralG; auto ft = Formatter(); ft.Add(gForces); DrawTextBasic(dpi, screenPos, STR_MAX_LATERAL_G, ft); screenPos.y += kListRowHeight; } - if (td6->total_air_time != 0) + if (td.statistics.totalAirTime != 0) { - // Total air time - int32_t airTime = td6->total_air_time * 25; + int32_t airTime = td.statistics.totalAirTime * 3; auto ft = Formatter(); ft.Add(airTime); DrawTextBasic(dpi, screenPos, STR_TOTAL_AIR_TIME, ft); @@ -313,12 +313,10 @@ static Widget window_install_track_widgets[] = { } } - if (GetRideTypeDescriptor(td6->type).HasFlag(RIDE_TYPE_FLAG_HAS_DROPS)) + if (GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex).HasFlag(RIDE_TYPE_FLAG_HAS_DROPS)) { - // Drops - uint16_t drops = td6->drops & 0x3F; auto ft = Formatter(); - ft.Add(drops); + ft.Add(td.statistics.drops); DrawTextBasic(dpi, screenPos, STR_DROPS, ft); screenPos.y += kListRowHeight; @@ -327,34 +325,31 @@ static Widget window_install_track_widgets[] = { screenPos.y += kListRowHeight; } - if (td6->type != RIDE_TYPE_MINI_GOLF) + if (td.statistics.inversions != 0) { - uint16_t inversions = td6->inversions & 0x1F; - if (inversions != 0) - { - // Inversions - auto ft = Formatter(); - ft.Add(inversions); - DrawTextBasic(dpi, screenPos, STR_INVERSIONS, ft); - screenPos.y += kListRowHeight; - } + // Inversions + auto ft = Formatter(); + ft.Add(td.statistics.inversions); + DrawTextBasic(dpi, screenPos, STR_INVERSIONS, ft); + screenPos.y += kListRowHeight; } + screenPos.y += 4; - if (td6->space_required_x != 0xFF) + if (!td.statistics.spaceRequired.IsNull()) { // Space required auto ft = Formatter(); - ft.Add(td6->space_required_x); - ft.Add(td6->space_required_y); + ft.Add(td.statistics.spaceRequired.x); + ft.Add(td.statistics.spaceRequired.y); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); screenPos.y += kListRowHeight; } - if (td6->cost != 0) + if (td.gameStateData.cost != 0) { auto ft = Formatter(); - ft.Add(td6->cost); + ft.Add(td.gameStateData.cost); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_COST_AROUND, ft); } } @@ -367,7 +362,7 @@ static Widget window_install_track_widgets[] = { private: void UpdatePreview() { - TrackDesignDrawPreview(_trackDesign.get(), _trackDesignPreviewPixels.data()); + TrackDesignDrawPreview(*_trackDesign, _trackDesignPreviewPixels.data()); } void InstallTrackDesign() @@ -415,12 +410,12 @@ static Widget window_install_track_widgets[] = { } ObjectManagerUnloadAllObjects(); - if (trackDesign->type == RIDE_TYPE_NULL) + if (trackDesign->trackAndVehicle.rtdIndex == RIDE_TYPE_NULL) { LOG_ERROR("Failed to load track (ride type null): %s", path); return nullptr; } - if (ObjectManagerLoadObject(&trackDesign->vehicle_object.Entry) == nullptr) + if (ObjectManagerLoadObject(&trackDesign->trackAndVehicle.vehicleObject.Entry) == nullptr) { LOG_ERROR("Failed to load track (vehicle load fail): %s", path); return nullptr; diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index 499bb913e4..a90cd486a0 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -17,7 +17,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -26,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -117,7 +120,7 @@ static Widget window_loadsave_widgets[] = if (a.type != b.type) return a.type - b.type < 0; - switch (gConfigGeneral.LoadSaveSort) + switch (Config::Get().general.LoadSaveSort) { case Sort::NameAscending: return StrLogicalCmp(a.name.c_str(), b.name.c_str()) < 0; @@ -134,7 +137,7 @@ static Widget window_loadsave_widgets[] = static void SetAndSaveConfigPath(u8string& config_str, u8string_view path) { config_str = Path::GetDirectory(path); - ConfigSaveDefault(); + Config::Save(); } static bool IsValidPath(const char* path) @@ -152,16 +155,16 @@ static Widget window_loadsave_widgets[] = switch (type & 0x0E) { case LOADSAVETYPE_GAME: - return gConfigGeneral.LastSaveGameDirectory; + return Config::Get().general.LastSaveGameDirectory; case LOADSAVETYPE_LANDSCAPE: - return gConfigGeneral.LastSaveLandscapeDirectory; + return Config::Get().general.LastSaveLandscapeDirectory; case LOADSAVETYPE_SCENARIO: - return gConfigGeneral.LastSaveScenarioDirectory; + return Config::Get().general.LastSaveScenarioDirectory; case LOADSAVETYPE_TRACK: - return gConfigGeneral.LastSaveTrackDirectory; + return Config::Get().general.LastSaveTrackDirectory; default: return u8string(); @@ -270,7 +273,7 @@ static Widget window_loadsave_widgets[] = switch (_type & 0x0F) { case (LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME): - SetAndSaveConfigPath(gConfigGeneral.LastSaveGameDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.LastSaveGameDirectory, pathBuffer); if (OpenRCT2::GetContext()->LoadParkFromFile(pathBuffer)) { InvokeCallback(MODAL_RESULT_OK, pathBuffer); @@ -286,8 +289,8 @@ static Widget window_loadsave_widgets[] = break; case (LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME): - SetAndSaveConfigPath(gConfigGeneral.LastSaveGameDirectory, pathBuffer); - if (ScenarioSave(gameState, pathBuffer, gConfigGeneral.SavePluginData ? 1 : 0)) + SetAndSaveConfigPath(Config::Get().general.LastSaveGameDirectory, pathBuffer); + if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 1 : 0)) { gScenarioSavePath = pathBuffer; gCurrentLoadedPath = pathBuffer; @@ -307,7 +310,7 @@ static Widget window_loadsave_widgets[] = break; case (LOADSAVETYPE_LOAD | LOADSAVETYPE_LANDSCAPE): - SetAndSaveConfigPath(gConfigGeneral.LastSaveLandscapeDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.LastSaveLandscapeDirectory, pathBuffer); if (Editor::LoadLandscape(pathBuffer)) { gCurrentLoadedPath = pathBuffer; @@ -323,9 +326,9 @@ static Widget window_loadsave_widgets[] = break; case (LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE): - SetAndSaveConfigPath(gConfigGeneral.LastSaveLandscapeDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.LastSaveLandscapeDirectory, pathBuffer); gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer))); - if (ScenarioSave(gameState, pathBuffer, gConfigGeneral.SavePluginData ? 3 : 2)) + if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2)) { gCurrentLoadedPath = pathBuffer; WindowCloseByClass(WindowClass::Loadsave); @@ -341,12 +344,12 @@ static Widget window_loadsave_widgets[] = case (LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO): { - SetAndSaveConfigPath(gConfigGeneral.LastSaveScenarioDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.LastSaveScenarioDirectory, pathBuffer); int32_t parkFlagsBackup = gameState.Park.Flags; gameState.Park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED; gameState.EditorStep = EditorStep::Invalid; gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer))); - int32_t success = ScenarioSave(gameState, pathBuffer, gConfigGeneral.SavePluginData ? 3 : 2); + int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2); gameState.Park.Flags = parkFlagsBackup; if (success) @@ -368,7 +371,7 @@ static Widget window_loadsave_widgets[] = case (LOADSAVETYPE_LOAD | LOADSAVETYPE_TRACK): { - SetAndSaveConfigPath(gConfigGeneral.LastSaveTrackDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); auto intent = Intent(WindowClass::InstallTrack); intent.PutExtra(INTENT_EXTRA_PATH, std::string{ pathBuffer }); ContextOpenIntent(&intent); @@ -379,12 +382,12 @@ static Widget window_loadsave_widgets[] = case (LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK): { - SetAndSaveConfigPath(gConfigGeneral.LastSaveTrackDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); const auto withExtension = Path::WithExtension(pathBuffer, ".td6"); String::Set(pathBuffer, sizeof(pathBuffer), withExtension.c_str()); - RCT2::T6Exporter t6Export{ _trackDesign }; + RCT2::T6Exporter t6Export{ *_trackDesign }; auto success = t6Export.SaveTrack(pathBuffer); @@ -676,6 +679,13 @@ static Widget window_loadsave_widgets[] = const bool isSave = (type & 0x01) == LOADSAVETYPE_SAVE; const auto path = GetDir(type); + // Pause the game if not on title scene, nor in network play. + if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && NetworkGetMode() == NETWORK_MODE_NONE) + { + gGamePaused |= GAME_PAUSED_MODAL; + Audio::StopAll(); + } + const char* pattern = GetFilterPatternByType(type, isSave); PopulateList(isSave, path, pattern); no_list_items = static_cast(_listItems.size()); @@ -693,6 +703,13 @@ static Widget window_loadsave_widgets[] = { _listItems.clear(); WindowCloseByClass(WindowClass::LoadsaveOverwritePrompt); + + // Unpause the game if not on title scene, nor in network play. + if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && NetworkGetMode() == NETWORK_MODE_NONE) + { + gGamePaused &= ~GAME_PAUSED_MODAL; + Audio::Resume(); + } } void OnResize() override @@ -748,9 +765,9 @@ static Widget window_loadsave_widgets[] = // Name button text StringId id = STR_NONE; - if (gConfigGeneral.LoadSaveSort == Sort::NameAscending) + if (Config::Get().general.LoadSaveSort == Sort::NameAscending) id = STR_UP; - else if (gConfigGeneral.LoadSaveSort == Sort::NameDescending) + else if (Config::Get().general.LoadSaveSort == Sort::NameDescending) id = STR_DOWN; // Draw name button indicator. @@ -762,9 +779,9 @@ static Widget window_loadsave_widgets[] = { COLOUR_GREY }); // Date button text - if (gConfigGeneral.LoadSaveSort == Sort::DateAscending) + if (Config::Get().general.LoadSaveSort == Sort::DateAscending) id = STR_UP; - else if (gConfigGeneral.LoadSaveSort == Sort::DateDescending) + else if (Config::Get().general.LoadSaveSort == Sort::DateDescending) id = STR_DOWN; else id = STR_NONE; @@ -820,29 +837,29 @@ static Widget window_loadsave_widgets[] = break; case WIDX_SORT_NAME: - if (gConfigGeneral.LoadSaveSort == Sort::NameAscending) + if (Config::Get().general.LoadSaveSort == Sort::NameAscending) { - gConfigGeneral.LoadSaveSort = Sort::NameDescending; + Config::Get().general.LoadSaveSort = Sort::NameDescending; } else { - gConfigGeneral.LoadSaveSort = Sort::NameAscending; + Config::Get().general.LoadSaveSort = Sort::NameAscending; } - ConfigSaveDefault(); + Config::Save(); SortList(); Invalidate(); break; case WIDX_SORT_DATE: - if (gConfigGeneral.LoadSaveSort == Sort::DateDescending) + if (Config::Get().general.LoadSaveSort == Sort::DateDescending) { - gConfigGeneral.LoadSaveSort = Sort::DateAscending; + Config::Get().general.LoadSaveSort = Sort::DateAscending; } else { - gConfigGeneral.LoadSaveSort = Sort::DateDescending; + Config::Get().general.LoadSaveSort = Sort::DateDescending; } - ConfigSaveDefault(); + Config::Save(); SortList(); Invalidate(); break; @@ -904,14 +921,14 @@ static Widget window_loadsave_widgets[] = ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - return { 0, no_list_items * SCROLLABLE_ROW_HEIGHT }; + return { 0, no_list_items * kScrollableRowHeight }; } void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { int32_t selectedItem; - selectedItem = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + selectedItem = screenCoords.y / kScrollableRowHeight; if (selectedItem >= no_list_items) return; @@ -924,7 +941,7 @@ static Widget window_loadsave_widgets[] = { int32_t selectedItem; - selectedItem = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + selectedItem = screenCoords.y / kScrollableRowHeight; if (selectedItem >= no_list_items) return; @@ -959,17 +976,18 @@ static Widget window_loadsave_widgets[] = void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { GfxFillRect( - dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); + dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, + ColourMapA[colours[1].colour].mid_light); const int32_t listWidth = widgets[WIDX_SCROLL].width(); const int32_t dateAnchor = widgets[WIDX_SORT_DATE].left + maxDateWidth + DATE_TIME_GAP; for (int32_t i = 0; i < no_list_items; i++) { - int32_t y = i * SCROLLABLE_ROW_HEIGHT; + int32_t y = i * kScrollableRowHeight; if (y > dpi.y + dpi.height) break; - if (y + SCROLLABLE_ROW_HEIGHT < dpi.y) + if (y + kScrollableRowHeight < dpi.y) continue; StringId stringId = STR_BLACK_STRING; @@ -978,7 +996,7 @@ static Widget window_loadsave_widgets[] = if (i == selected_list_item) { stringId = STR_WINDOW_COLOUR_2_STRINGID; - GfxFilterRect(dpi, { 0, y, listWidth, y + SCROLLABLE_ROW_HEIGHT }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(dpi, { 0, y, listWidth, y + kScrollableRowHeight }, FilterPaletteID::PaletteDarken1); } // display a marker next to the currently loaded game file if (_listItems[i].loaded) @@ -1027,7 +1045,7 @@ static Widget window_loadsave_widgets[] = // Bypass the lot? auto hasFilePicker = OpenRCT2::GetContext()->GetUiContext()->HasFilePicker(); - if (gConfigGeneral.UseNativeBrowseDialog && hasFilePicker) + if (Config::Get().general.UseNativeBrowseDialog && hasFilePicker) { const u8string path = OpenSystemFileBrowser(isSave); if (!path.empty()) diff --git a/src/openrct2-ui/windows/Main.cpp b/src/openrct2-ui/windows/Main.cpp index ad1a749eee..d452b384de 100644 --- a/src/openrct2-ui/windows/Main.cpp +++ b/src/openrct2-ui/windows/Main.cpp @@ -7,19 +7,20 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include #include #include -#include #include namespace OpenRCT2::Ui::Windows { // clang-format off static Widget _mainWidgets[] = { - MakeWidget({0, 0}, {0, 0}, WindowWidgetType::Viewport, WindowColour::Primary, STR_VIEWPORT), + MakeWidget({0, 0}, {0, 0}, WindowWidgetType::Viewport, WindowColour::Primary), kWidgetsEnd, }; // clang-format on @@ -47,6 +48,10 @@ static Widget _mainWidgets[] = { void OnDraw(DrawPixelInfo& dpi) override { + // Skip viewport render during preloader + if (GetContext()->GetActiveScene() == GetContext()->GetPreloaderScene()) + return; + ViewportRender(dpi, viewport, { { dpi.x, dpi.y }, { dpi.x + dpi.width, dpi.y + dpi.height } }); } @@ -54,17 +59,17 @@ static Widget _mainWidgets[] = { void SetViewportFlags() { viewport->flags |= VIEWPORT_FLAG_SOUND_ON; - if (gConfigGeneral.InvisibleRides) + if (Config::Get().general.InvisibleRides) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_RIDES; - if (gConfigGeneral.InvisibleVehicles) + if (Config::Get().general.InvisibleVehicles) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_VEHICLES; - if (gConfigGeneral.InvisibleTrees) + if (Config::Get().general.InvisibleTrees) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_VEGETATION; - if (gConfigGeneral.InvisibleScenery) + if (Config::Get().general.InvisibleScenery) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_SCENERY; - if (gConfigGeneral.InvisiblePaths) + if (Config::Get().general.InvisiblePaths) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_PATHS; - if (gConfigGeneral.InvisibleSupports) + if (Config::Get().general.InvisibleSupports) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_SUPPORTS; } }; diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index 37d98482ec..79c468faf4 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include namespace OpenRCT2::Ui::Windows @@ -53,13 +54,39 @@ namespace OpenRCT2::Ui::Windows { return MapColour2((colour & 0xFF00) >> 8, PALETTE_INDEX_10); } - - constexpr int32_t MAP_WINDOW_MAP_SIZE = kMaximumMapSizeTechnical * 2; + static int32_t getTechnicalMapSize() + { + // Take non-square maps into account + return std::max(GetGameState().MapSize.x, GetGameState().MapSize.y) - 2; + } + static int32_t getTechnicalMapSizeBig() + { + return getTechnicalMapSize() * COORDS_XY_STEP; + } + static int32_t getMaxTileStartXY() + { + return getTechnicalMapSizeBig() - COORDS_XY_STEP; + } + static int32_t getMiniMapWidth() + { + return getTechnicalMapSize() * 2; + } static constexpr StringId WINDOW_TITLE = STR_MAP_LABEL; static constexpr int32_t WH = 259; static constexpr int32_t WW = 245; + static constexpr uint16_t kReservedHSpace = 6; + static constexpr uint16_t kReservedTopSpace = 46; + static constexpr uint16_t kScenarioEditorReservedSpace = 72; + static constexpr uint16_t kRidesTabReservedSpace = 4 * kListRowHeight + 4; + static constexpr uint16_t kDefaultReservedSpace = 14; + + static int32_t getMapOffset(int16_t width) + { + return (width - getMiniMapWidth() - kReservedHSpace - SCROLLBAR_SIZE) / 2; + } + // Some functions manipulate coordinates on the map. These are the coordinates of the pixels in the // minimap. In order to distinguish those from actual coordinates, we use a separate name. using MapCoordsXY = TileCoordsXY; @@ -126,17 +153,18 @@ static Widget window_map_widgets[] = { MakeWidget ({110, 189}, {131, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_MAPGEN_WINDOW_TITLE, STR_MAP_GENERATOR_TIP ), kWidgetsEnd, }; - -// used in transforming viewport view coordinates to minimap coordinates -// rct2: 0x00981BBC -static constexpr ScreenCoordsXY MiniMapOffsets[] = { - { kMaximumMapSizeTechnical - 8, 0 }, - { 2 * kMaximumMapSizeTechnical - 8, kMaximumMapSizeTechnical }, - { kMaximumMapSizeTechnical - 8, 2 * kMaximumMapSizeTechnical }, - { 0 - 8, kMaximumMapSizeTechnical }, -}; // clang-format on + // These represent a coefficient for the map size to be multiplied + // Used in transforming viewport view coordinates to minimap coordinates + // rct2: 0x00981BBC (analogous) + static constexpr ScreenCoordsXY MiniMapOffsetFactors[] = { + { 1, 0 }, + { 2, 1 }, + { 1, 2 }, + { 0, 1 }, + }; + static constexpr StringId MapLabels[] = { STR_MAP_RIDE, STR_MAP_FOOD_STALL, STR_MAP_DRINK_STALL, STR_MAP_SOUVENIR_STALL, STR_MAP_INFO_KIOSK, STR_MAP_FIRST_AID, STR_MAP_CASH_MACHINE, STR_MAP_TOILET, @@ -209,11 +237,6 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { uint16_t _flashingFlags = 0; public: - MapWindow() - { - _mapImageData.resize(MAP_WINDOW_MAP_SIZE * MAP_WINDOW_MAP_SIZE); - } - void OnOpen() override { widgets = window_map_widgets; @@ -224,11 +247,11 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { flags |= WF_RESIZABLE; min_width = WW; - max_width = 800; min_height = WH; - max_height = 560; - ResizeMap(); + SetInitialWindowDimensions(); + ResetMaxWindowDimensions(); + ResizeMiniMap(); InitScrollWidgets(); CalculateTextLayout(); @@ -353,6 +376,7 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { selected_tab = widgetIndex; list_information_type = 0; _recalculateScrollbars = true; + ResetMaxWindowDimensions(); } } } @@ -561,10 +585,10 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { if (parkEntranceMapPosition.z == 0) { parkEntranceMapPosition.z = surfaceElement->GetBaseZ(); - if ((surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) != 0) + if ((surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) != 0) { parkEntranceMapPosition.z += 16; - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) { parkEntranceMapPosition.z += 16; } @@ -649,9 +673,9 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { int32_t mapZ = tileElement->GetBaseZ(); if (tileElement->GetType() == TileElementType::Surface) { - if ((tileElement->AsSurface()->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) != 0) + if ((tileElement->AsSurface()->GetSlope() & kTileSlopeRaisedCornersMask) != 0) mapZ += 16; - if (tileElement->AsSurface()->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (tileElement->AsSurface()->GetSlope() & kTileSlopeDiagonalFlag) mapZ += 16; } @@ -734,14 +758,22 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - return ScreenSize(MAP_WINDOW_MAP_SIZE, MAP_WINDOW_MAP_SIZE); + return ScreenSize(getMiniMapWidth(), getMiniMapWidth()); } void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - CoordsXY c = ScreenToMap(screenCoords); - auto mapCoords = CoordsXY{ std::clamp(c.x, 0, MAXIMUM_MAP_SIZE_BIG - 1), - std::clamp(c.y, 0, MAXIMUM_MAP_SIZE_BIG - 1) }; + // Adjust coordinates for any map offset to centre + auto adjCoords = screenCoords; + auto mapOffset = getMapOffset(width); + if (mapOffset > 0) + { + adjCoords -= ScreenCoordsXY(mapOffset, mapOffset - SCROLLBAR_SIZE / 2); + } + + CoordsXY c = ScreenToMap(adjCoords); + auto mapCoords = CoordsXY{ std::clamp(c.x, 0, getTechnicalMapSizeBig() - 1), + std::clamp(c.y, 0, getTechnicalMapSizeBig() - 1) }; auto mapZ = TileElementHeight(mapCoords); WindowBase* mainWindow = WindowGetMain(); @@ -801,25 +833,29 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { { GfxClear(dpi, PALETTE_INDEX_10); + // Ensure small maps are centred + auto screenOffset = ScreenCoordsXY(0, 0); + auto mapOffset = getMapOffset(width); + if (mapOffset > 0) + screenOffset += ScreenCoordsXY(mapOffset, mapOffset - SCROLLBAR_SIZE / 2); + G1Element g1temp = {}; g1temp.offset = _mapImageData.data(); - g1temp.width = MAP_WINDOW_MAP_SIZE; - g1temp.height = MAP_WINDOW_MAP_SIZE; - g1temp.x_offset = -8; - g1temp.y_offset = -8; + g1temp.width = getMiniMapWidth(); + g1temp.height = getMiniMapWidth(); GfxSetG1Element(SPR_TEMP, &g1temp); DrawingEngineInvalidateImage(SPR_TEMP); - GfxDrawSprite(dpi, ImageId(SPR_TEMP), { 0, 0 }); + GfxDrawSprite(dpi, ImageId(SPR_TEMP), screenOffset); if (selected_tab == PAGE_PEEPS) { - PaintPeepOverlay(dpi); + PaintPeepOverlay(dpi, screenOffset); } else { - PaintTrainOverlay(dpi); + PaintTrainOverlay(dpi, screenOffset); } - PaintHudRectangle(dpi); + PaintHudRectangle(dpi, screenOffset); } void OnPrepareDraw() override @@ -848,7 +884,7 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { // Resize widgets to window size ResizeFrameWithPage(); - ResizeMap(); + ResizeMiniMap(); widgets[WIDX_MAP_SIZE_SPINNER_Y].top = height - 15; widgets[WIDX_MAP_SIZE_SPINNER_Y].bottom = height - 4; @@ -1017,6 +1053,7 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { private: void InitMap() { + _mapImageData.resize(getMiniMapWidth() * getMiniMapWidth()); std::fill(_mapImageData.begin(), _mapImageData.end(), PALETTE_INDEX_10); _currentLine = 0; } @@ -1030,14 +1067,14 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { if (mainWindow == nullptr || mainWindow->viewport == nullptr) return; - auto offset = MiniMapOffsets[GetCurrentRotation()]; + auto offset = MiniMapOffsetFactors[GetCurrentRotation()]; // calculate centre view point of viewport and transform it to minimap coordinates cx = ((mainWindow->viewport->view_width >> 1) + mainWindow->viewport->viewPos.x) >> 5; dx = ((mainWindow->viewport->view_height >> 1) + mainWindow->viewport->viewPos.y) >> 4; - cx += offset.x; - dx += offset.y; + cx += offset.x * getTechnicalMapSize(); + dx += offset.y * getTechnicalMapSize(); // calculate width and height of minimap @@ -1093,9 +1130,9 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { { int32_t x = 0, y = 0, dx = 0, dy = 0; - int32_t pos = (_currentLine * (MAP_WINDOW_MAP_SIZE - 1)) + kMaximumMapSizeTechnical - 1; - auto destinationPosition = ScreenCoordsXY{ pos % MAP_WINDOW_MAP_SIZE, pos / MAP_WINDOW_MAP_SIZE }; - auto destination = _mapImageData.data() + (destinationPosition.y * MAP_WINDOW_MAP_SIZE) + destinationPosition.x; + int32_t pos = (_currentLine * (getMiniMapWidth() - 1)) + getTechnicalMapSize() - 1; + auto destinationPosition = ScreenCoordsXY{ pos % getMiniMapWidth(), pos / getMiniMapWidth() }; + auto destination = _mapImageData.data() + (destinationPosition.y * getMiniMapWidth()) + destinationPosition.x; switch (GetCurrentRotation()) { case 0: @@ -1105,26 +1142,26 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { dy = COORDS_XY_STEP; break; case 1: - x = MAXIMUM_TILE_START_XY; + x = getMaxTileStartXY(); y = _currentLine * COORDS_XY_STEP; dx = -COORDS_XY_STEP; dy = 0; break; case 2: - x = MAXIMUM_MAP_SIZE_BIG - ((_currentLine + 1) * COORDS_XY_STEP); - y = MAXIMUM_TILE_START_XY; + x = getTechnicalMapSizeBig() - ((_currentLine + 1) * COORDS_XY_STEP); + y = getMaxTileStartXY(); dx = 0; dy = -COORDS_XY_STEP; break; case 3: x = 0; - y = MAXIMUM_MAP_SIZE_BIG - ((_currentLine + 1) * COORDS_XY_STEP); + y = getTechnicalMapSizeBig() - ((_currentLine + 1) * COORDS_XY_STEP); dx = COORDS_XY_STEP; dy = 0; break; } - for (int32_t i = 0; i < kMaximumMapSizeTechnical; i++) + for (int32_t i = 0; i < getTechnicalMapSize(); i++) { if (!MapIsEdge({ x, y })) { @@ -1146,10 +1183,10 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { destinationPosition.x++; destinationPosition.y++; - destination = _mapImageData.data() + (destinationPosition.y * MAP_WINDOW_MAP_SIZE) + destinationPosition.x; + destination = _mapImageData.data() + (destinationPosition.y * getMiniMapWidth()) + destinationPosition.x; } _currentLine++; - if (_currentLine >= kMaximumMapSizeTechnical) + if (_currentLine >= static_cast(getTechnicalMapSize())) _currentLine = 0; } @@ -1256,27 +1293,27 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { return colourB; } - void PaintPeepOverlay(DrawPixelInfo& dpi) + void PaintPeepOverlay(DrawPixelInfo& dpi, const ScreenCoordsXY& offset) { auto flashColour = GetGuestFlashColour(); for (auto guest : EntityList()) { - DrawMapPeepPixel(guest, flashColour, dpi); + DrawMapPeepPixel(guest, flashColour, dpi, offset); } flashColour = GetStaffFlashColour(); for (auto staff : EntityList()) { - DrawMapPeepPixel(staff, flashColour, dpi); + DrawMapPeepPixel(staff, flashColour, dpi, offset); } } - void DrawMapPeepPixel(Peep* peep, const uint8_t flashColour, DrawPixelInfo& dpi) + void DrawMapPeepPixel(Peep* peep, const uint8_t flashColour, DrawPixelInfo& dpi, const ScreenCoordsXY& offset) { if (peep->x == LOCATION_NULL) return; MapCoordsXY c = TransformToMapCoords({ peep->x, peep->y }); - auto leftTop = ScreenCoordsXY{ c.x, c.y }; + auto leftTop = ScreenCoordsXY{ c.x, c.y } + offset; auto rightBottom = leftTop; uint8_t colour = DefaultPeepMapColour; if (EntityGetFlashing(peep)) @@ -1316,7 +1353,7 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { return colour; } - void PaintTrainOverlay(DrawPixelInfo& dpi) + void PaintTrainOverlay(DrawPixelInfo& dpi, const ScreenCoordsXY& offset) { for (auto train : TrainManager::View()) { @@ -1325,9 +1362,10 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { if (vehicle->x == LOCATION_NULL) continue; - MapCoordsXY c = TransformToMapCoords({ vehicle->x, vehicle->y }); + auto mapCoord = TransformToMapCoords({ vehicle->x, vehicle->y }); + auto pixelCoord = ScreenCoordsXY{ mapCoord.x, mapCoord.y } + offset; - GfxFillRect(dpi, { { c.x, c.y }, { c.x, c.y } }, PALETTE_INDEX_171); + GfxFillRect(dpi, { pixelCoord, pixelCoord }, PALETTE_INDEX_171); } } } @@ -1336,7 +1374,7 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { * The call to GfxFillRect was originally wrapped in Sub68DABD which made sure that arguments were ordered correctly, * but it doesn't look like it's ever necessary here so the call was removed. */ - void PaintHudRectangle(DrawPixelInfo& dpi) + void PaintHudRectangle(DrawPixelInfo& dpi, const ScreenCoordsXY& widgetOffset) { WindowBase* mainWindow = WindowGetMain(); if (mainWindow == nullptr) @@ -1346,11 +1384,13 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { if (mainViewport == nullptr) return; - auto offset = MiniMapOffsets[GetCurrentRotation()]; - auto leftTop = ScreenCoordsXY{ (mainViewport->viewPos.x >> 5) + offset.x, - (mainViewport->viewPos.y >> 4) + offset.y }; - auto rightBottom = ScreenCoordsXY{ ((mainViewport->viewPos.x + mainViewport->view_width) >> 5) + offset.x, - ((mainViewport->viewPos.y + mainViewport->view_height) >> 4) + offset.y }; + auto mapOffset = MiniMapOffsetFactors[GetCurrentRotation()]; + mapOffset.x *= getTechnicalMapSize(); + mapOffset.y *= getTechnicalMapSize(); + + auto leftTop = widgetOffset + mapOffset + + ScreenCoordsXY{ (mainViewport->viewPos.x >> 5), (mainViewport->viewPos.y >> 4) }; + auto rightBottom = leftTop + ScreenCoordsXY{ mainViewport->view_width >> 5, mainViewport->view_height >> 4 }; auto rightTop = ScreenCoordsXY{ rightBottom.x, leftTop.y }; auto leftBottom = ScreenCoordsXY{ leftTop.x, rightBottom.y }; @@ -1438,7 +1478,7 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { CoordsXY ScreenToMap(ScreenCoordsXY screenCoords) { - screenCoords.x = ((screenCoords.x + 8) - kMaximumMapSizeTechnical) / 2; + screenCoords.x = ((screenCoords.x + 8) - getTechnicalMapSize()) / 2; screenCoords.y = ((screenCoords.y + 8)) / 2; auto location = TileCoordsXY(screenCoords.y - screenCoords.x, screenCoords.x + screenCoords.y).ToCoordsXY(); @@ -1447,11 +1487,11 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { case 0: return location; case 1: - return { MAXIMUM_MAP_SIZE_BIG - 1 - location.y, location.x }; + return { getTechnicalMapSizeBig() - 1 - location.y, location.x }; case 2: - return { MAXIMUM_MAP_SIZE_BIG - 1 - location.x, MAXIMUM_MAP_SIZE_BIG - 1 - location.y }; + return { getTechnicalMapSizeBig() - 1 - location.x, getTechnicalMapSizeBig() - 1 - location.y }; case 3: - return { location.y, MAXIMUM_MAP_SIZE_BIG - 1 - location.x }; + return { location.y, getTechnicalMapSizeBig() - 1 - location.x }; } return { 0, 0 }; // unreachable @@ -1465,15 +1505,15 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { { case 3: std::swap(x, y); - x = MAXIMUM_MAP_SIZE_BIG - 1 - x; + x = getTechnicalMapSizeBig() - 1 - x; break; case 2: - x = MAXIMUM_MAP_SIZE_BIG - 1 - x; - y = MAXIMUM_MAP_SIZE_BIG - 1 - y; + x = getTechnicalMapSizeBig() - 1 - x; + y = getTechnicalMapSizeBig() - 1 - y; break; case 1: std::swap(x, y); - y = MAXIMUM_MAP_SIZE_BIG - 1 - y; + y = getTechnicalMapSizeBig() - 1 - y; break; case 0: break; @@ -1481,19 +1521,42 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = { x /= 32; y /= 32; - return { -x + y + kMaximumMapSizeTechnical - 8, x + y - 8 }; + return { -x + y + getTechnicalMapSize(), x + y }; } - void ResizeMap() + uint16_t GetReservedBottomSpace() + { + if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) + return kScenarioEditorReservedSpace; + else if (selected_tab == PAGE_RIDES) + return kRidesTabReservedSpace; + else + return kDefaultReservedSpace; + } + + void SetInitialWindowDimensions() + { + // The initial mini map size should be able to show a reasonably sized map + auto initSize = std::clamp(getTechnicalMapSize(), 100, 254) * 2; + width = initSize + kReservedHSpace + SCROLLBAR_SIZE; + height = initSize + kReservedTopSpace + GetReservedBottomSpace() + SCROLLBAR_SIZE; + + auto maxWindowHeight = ContextGetHeight() - 68; + width = std::min(width, ContextGetWidth()); + height = std::min(height, maxWindowHeight); + } + + void ResetMaxWindowDimensions() + { + max_width = std::clamp(getMiniMapWidth() + kReservedHSpace + SCROLLBAR_SIZE, WW, ContextGetWidth()); + max_height = std::clamp( + getMiniMapWidth() + kReservedTopSpace + GetReservedBottomSpace() + SCROLLBAR_SIZE, WH, ContextGetHeight() - 68); + } + + void ResizeMiniMap() { widgets[WIDX_MAP].right = width - 4; - - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) - widgets[WIDX_MAP].bottom = height - 1 - 72; - else if (selected_tab == PAGE_RIDES) - widgets[WIDX_MAP].bottom = height - 1 - (4 * kListRowHeight + 4); - else - widgets[WIDX_MAP].bottom = height - 1 - 14; + widgets[WIDX_MAP].bottom = height - 1 - GetReservedBottomSpace(); } void CalculateTextLayout() diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index d1ceca87c1..f5ccdd3421 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include #include #include #include @@ -653,13 +654,13 @@ static uint64_t PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { if (IsWidgetDisabled(widgetIndex)) { // Draw greyed out (light border bottom right shadow) - auto colour = colours[widget.colour]; - colour = ColourMapA[NOT_TRANSLUCENT(colour)].lighter; + auto colour = colours[widget.colour].colour; + colour = ColourMapA[colour].lighter; GfxDrawSpriteSolid(dpi, image, pos + ScreenCoordsXY{ 1, 1 }, colour); // Draw greyed out (dark) - colour = colours[widget.colour]; - colour = ColourMapA[NOT_TRANSLUCENT(colour)].mid_light; + colour = colours[widget.colour].colour; + colour = ColourMapA[colour].mid_light; GfxDrawSpriteSolid(dpi, image, pos, colour); } else @@ -1012,7 +1013,7 @@ static uint64_t PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { DrawTabImages(dpi); DrawDropdownButtons(dpi, WIDX_SIMPLEX_FLOOR_TEXTURE, WIDX_SIMPLEX_WALL_TEXTURE); - const uint8_t textColour = colours[1]; + const auto textColour = colours[1]; DrawTextBasic( dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_LOW].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_LOW_, {}, @@ -1197,11 +1198,11 @@ static uint64_t PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { DrawWidgets(dpi); DrawTabImages(dpi); - const colour_t enabledColour = colours[1]; - const colour_t disabledColour = enabledColour | COLOUR_FLAG_INSET; + const auto enabledColour = colours[1]; + const auto disabledColour = enabledColour.withFlag(ColourFlag::inset, true); // Smooth strength label and value - const colour_t strengthColour = _heightmapSmoothMap ? enabledColour : disabledColour; + const auto strengthColour = _heightmapSmoothMap ? enabledColour : disabledColour; DrawTextBasic( dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1 }, STR_MAPGEN_SMOOTH_STRENGTH, {}, { strengthColour }); @@ -1215,7 +1216,7 @@ static uint64_t PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { STR_COMMA16, ft, { strengthColour }); // Low label and value - const colour_t labelColour = _heightmapLoaded ? enabledColour : disabledColour; + const auto labelColour = _heightmapLoaded ? enabledColour : disabledColour; DrawTextBasic( dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_HEIGHTMAP_LOW].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_LOW_, {}, { labelColour }); diff --git a/src/openrct2-ui/windows/Multiplayer.cpp b/src/openrct2-ui/windows/Multiplayer.cpp index 51e1e02e6d..22fc14d829 100644 --- a/src/openrct2-ui/windows/Multiplayer.cpp +++ b/src/openrct2-ui/windows/Multiplayer.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -137,7 +137,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { static bool IsServerPlayerInvisible() { - return NetworkIsServerPlayerInvisible() && !gConfigGeneral.DebuggingTools; + return NetworkIsServerPlayerInvisible() && !Config::Get().general.DebuggingTools; } class MultiplayerWindow final : public Window @@ -272,16 +272,16 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { switch (widgetIndex) { case WIDX_LOG_CHAT_CHECKBOX: - gConfigNetwork.LogChat = !gConfigNetwork.LogChat; - ConfigSaveDefault(); + Config::Get().network.LogChat = !Config::Get().network.LogChat; + Config::Save(); break; case WIDX_LOG_SERVER_ACTIONS_CHECKBOX: - gConfigNetwork.LogServerActions = !gConfigNetwork.LogServerActions; - ConfigSaveDefault(); + Config::Get().network.LogServerActions = !Config::Get().network.LogServerActions; + Config::Save(); break; case WIDX_KNOWN_KEYS_ONLY_CHECKBOX: - gConfigNetwork.KnownKeysOnly = !gConfigNetwork.KnownKeysOnly; - ConfigSaveDefault(); + Config::Get().network.KnownKeysOnly = !Config::Get().network.KnownKeysOnly; + Config::Save(); break; } break; @@ -430,9 +430,9 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { widgets[WIDX_KNOWN_KEYS_ONLY_CHECKBOX].type = WindowWidgetType::Empty; } - SetCheckboxValue(WIDX_LOG_CHAT_CHECKBOX, gConfigNetwork.LogChat); - SetCheckboxValue(WIDX_LOG_SERVER_ACTIONS_CHECKBOX, gConfigNetwork.LogServerActions); - SetCheckboxValue(WIDX_KNOWN_KEYS_ONLY_CHECKBOX, gConfigNetwork.KnownKeysOnly); + SetCheckboxValue(WIDX_LOG_CHAT_CHECKBOX, Config::Get().network.LogChat); + SetCheckboxValue(WIDX_LOG_SERVER_ACTIONS_CHECKBOX, Config::Get().network.LogServerActions); + SetCheckboxValue(WIDX_KNOWN_KEYS_ONLY_CHECKBOX, Config::Get().network.KnownKeysOnly); break; } } @@ -569,7 +569,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { Invalidate(); } - screenSize = { 0, NetworkGetNumPlayers() * SCROLLABLE_ROW_HEIGHT }; + screenSize = { 0, NetworkGetNumPlayers() * kScrollableRowHeight }; int32_t i = screenSize.height - window_multiplayer_players_widgets[WIDX_LIST].bottom + window_multiplayer_players_widgets[WIDX_LIST].top + 21; if (i < 0) @@ -590,7 +590,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { Invalidate(); } - screenSize = { 0, NetworkGetNumActions() * SCROLLABLE_ROW_HEIGHT }; + screenSize = { 0, NetworkGetNumActions() * kScrollableRowHeight }; int32_t i = screenSize.height - window_multiplayer_groups_widgets[WIDX_LIST].bottom + window_multiplayer_groups_widgets[WIDX_LIST].top + 21; if (i < 0) @@ -612,7 +612,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { { case WINDOW_MULTIPLAYER_PAGE_PLAYERS: { - int32_t index = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + int32_t index = screenCoords.y / kScrollableRowHeight; if (index >= no_list_items) return; @@ -626,7 +626,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { case WINDOW_MULTIPLAYER_PAGE_GROUPS: { - int32_t index = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + int32_t index = screenCoords.y / kScrollableRowHeight; if (index >= no_list_items) return; @@ -648,7 +648,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { case WINDOW_MULTIPLAYER_PAGE_PLAYERS: case WINDOW_MULTIPLAYER_PAGE_GROUPS: { - int32_t index = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + int32_t index = screenCoords.y / kScrollableRowHeight; if (index >= no_list_items) return; @@ -751,18 +751,18 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { break; } - if (screenCoords.y + SCROLLABLE_ROW_HEIGHT + 1 >= dpi.y) + if (screenCoords.y + kScrollableRowHeight + 1 >= dpi.y) { thread_local std::string _buffer; _buffer.reserve(512); _buffer.clear(); // Draw player name - colour_t colour = COLOUR_BLACK; + auto colour = ColourWithFlags{ COLOUR_BLACK }; if (listPosition == selected_list_item) { GfxFilterRect( - dpi, { 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 }, + dpi, { 0, screenCoords.y, 800, screenCoords.y + kScrollableRowHeight - 1 }, FilterPaletteID::PaletteDarken1); _buffer += NetworkGetPlayerName(player); colour = colours[2]; @@ -781,7 +781,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { } screenCoords.x = 0; GfxClipString(_buffer.data(), 230, FontStyle::Medium); - GfxDrawString(dpi, screenCoords, _buffer.c_str(), { colour }); + DrawText(dpi, screenCoords, { colour }, _buffer.c_str()); // Draw group name _buffer.resize(0); @@ -792,7 +792,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { screenCoords.x = 173; _buffer += NetworkGetGroupName(group); GfxClipString(_buffer.data(), 80, FontStyle::Medium); - GfxDrawString(dpi, screenCoords, _buffer.c_str(), { colour }); + DrawText(dpi, screenCoords, { colour }, _buffer.c_str()); } // Draw last action @@ -829,9 +829,9 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { _buffer += pingBuffer; screenCoords.x = 356; - GfxDrawString(dpi, screenCoords, _buffer.c_str(), { colour }); + DrawText(dpi, screenCoords, { colour }, _buffer.c_str()); } - screenCoords.y += SCROLLABLE_ROW_HEIGHT; + screenCoords.y += kScrollableRowHeight; listPosition++; } } @@ -886,14 +886,15 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; GfxFillRect( - dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); + dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, + ColourMapA[colours[1].colour].mid_light); for (int32_t i = 0; i < NetworkGetNumActions(); i++) { if (i == selected_list_item) { GfxFilterRect( - dpi, { 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 }, + dpi, { 0, screenCoords.y, 800, screenCoords.y + kScrollableRowHeight - 1 }, FilterPaletteID::PaletteDarken1); } if (screenCoords.y > dpi.y + dpi.height) @@ -901,7 +902,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { break; } - if (screenCoords.y + SCROLLABLE_ROW_HEIGHT + 1 >= dpi.y) + if (screenCoords.y + kScrollableRowHeight + 1 >= dpi.y) { int32_t groupindex = NetworkGetGroupIndex(_selectedGroup); if (groupindex != -1) @@ -909,7 +910,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { if (NetworkCanPerformAction(groupindex, static_cast(i))) { screenCoords.x = 0; - GfxDrawString(dpi, screenCoords, u8"{WINDOW_COLOUR_2}✓", {}); + DrawText(dpi, screenCoords, {}, u8"{WINDOW_COLOUR_2}✓"); } } @@ -918,7 +919,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { ft.Add(NetworkGetActionNameStringID(i)); DrawTextBasic(dpi, { 10, screenCoords.y }, STR_WINDOW_COLOUR_2_STRINGID, ft); } - screenCoords.y += SCROLLABLE_ROW_HEIGHT; + screenCoords.y += kScrollableRowHeight; } } diff --git a/src/openrct2-ui/windows/NetworkStatus.cpp b/src/openrct2-ui/windows/NetworkStatus.cpp index 248371af3c..7ce236bf67 100644 --- a/src/openrct2-ui/windows/NetworkStatus.cpp +++ b/src/openrct2-ui/windows/NetworkStatus.cpp @@ -9,7 +9,8 @@ #include #include -#include +#include +#include #include #include #include @@ -25,9 +26,9 @@ enum WindowNetworkStatusWidgetIdx { }; static Widget window_network_status_widgets[] = { - MakeWidget({ 0, 0}, {441, 91}, WindowWidgetType::Frame, WindowColour::Primary ), // panel / background - MakeWidget({ 1, 1}, {438, 14}, WindowWidgetType::Caption, WindowColour::Primary, STR_NONE, STR_WINDOW_TITLE_TIP), // title bar - MakeWidget({427, 2}, { 11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP), // close x button + MakeWidget({ 0, 0}, {400, 91}, WindowWidgetType::Frame, WindowColour::Primary ), // panel / background + MakeWidget({ 1, 1}, {397, 14}, WindowWidgetType::Caption, WindowColour::Primary, STR_NONE, STR_WINDOW_TITLE_TIP), // title bar + MakeWidget({388, 2}, { 11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP), // close x button kWidgetsEnd, }; @@ -101,12 +102,12 @@ static Widget window_network_status_widgets[] = { { WindowDrawWidgets(*this, dpi); thread_local std::string _buffer; - _buffer.assign("{BLACK}"); + _buffer.assign("{WHITE}"); _buffer += _windowNetworkStatusText; GfxClipString(_buffer.data(), widgets[WIDX_BACKGROUND].right - 50, FontStyle::Medium); ScreenCoordsXY screenCoords(windowPos.x + (width / 2), windowPos.y + (height / 2)); screenCoords.x -= GfxGetStringWidth(_buffer, FontStyle::Medium) / 2; - GfxDrawString(dpi, screenCoords, _buffer.c_str()); + DrawText(dpi, screenCoords, { COLOUR_BLACK }, _buffer.c_str()); } void SetCloseCallBack(close_callback onClose) @@ -117,6 +118,7 @@ static Widget window_network_status_widgets[] = { void SetWindowNetworkStatusText(const std::string& text) { _windowNetworkStatusText = text; + Invalidate(); } void SetPassword(char* password) @@ -132,8 +134,19 @@ static Widget window_network_status_widgets[] = { WindowBase* NetworkStatusOpen(const std::string& text, close_callback onClose) { - auto window = WindowFocusOrCreate( - WindowClass::NetworkStatus, 420, 90, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN); + ContextForceCloseWindowByClass(WindowClass::ProgressWindow); + + NetworkStatusWindow* window; + if ((window = static_cast(WindowFindByClass(WindowClass::NetworkStatus))) != nullptr) + { + WindowBringToFront(*window); + } + else + { + window = WindowCreate( + WindowClass::NetworkStatus, 400, 90, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); + } + window->SetCloseCallBack(onClose); window->SetWindowNetworkStatusText(text); return window; @@ -154,8 +167,10 @@ static Widget window_network_status_widgets[] = { WindowBase* NetworkStatusOpenPassword() { + ContextForceCloseWindowByClass(WindowClass::ProgressWindow); + auto window = WindowFocusOrCreate( - WindowClass::NetworkStatus, 420, 90, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN); + WindowClass::NetworkStatus, 400, 90, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN); char password[33]{}; WindowTextInputRawOpen(window, WIDX_PASSWORD, STR_PASSWORD_REQUIRED, STR_PASSWORD_REQUIRED_DESC, {}, password, 32); window->SetPassword(password); diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index ec6986bad6..7fe8428455 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include #include #include #include diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 5d2bfd2cfb..c7513e4da7 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -364,8 +364,8 @@ static Widget window_new_ride_widgets[] = { ContextOpenWindowView(WV_FINANCES_RESEARCH); break; case WIDX_GROUP_BY_TRACK_TYPE: - gConfigInterface.ListRideVehiclesSeparately = !gConfigInterface.ListRideVehiclesSeparately; - ConfigSaveDefault(); + Config::Get().interface.ListRideVehiclesSeparately = !Config::Get().interface.ListRideVehiclesSeparately; + Config::Save(); SetPage(_currentTab); break; case WIDX_FILTER_TEXT_BOX: @@ -391,7 +391,7 @@ static Widget window_new_ride_widgets[] = { { SetPressedTab(); - if (!gConfigInterface.ListRideVehiclesSeparately) + if (!Config::Get().interface.ListRideVehiclesSeparately) pressed_widgets |= (1LL << WIDX_GROUP_BY_TRACK_TYPE); else pressed_widgets &= ~(1LL << WIDX_GROUP_BY_TRACK_TYPE); @@ -479,7 +479,7 @@ static Widget window_new_ride_widgets[] = { return; } - GfxClear(dpi, ColourMapA[colours[1]].mid_light); + GfxClear(dpi, ColourMapA[colours[1].colour].mid_light); ScreenCoordsXY coords{ 1, 1 }; RideSelection* listItem = _windowNewRideListItems; @@ -684,7 +684,7 @@ static Widget window_new_ride_widgets[] = { const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); // Skip if the vehicle isn't the preferred vehicle for this generic track type - if (!gConfigInterface.ListRideVehiclesSeparately + if (!Config::Get().interface.ListRideVehiclesSeparately && !GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY) && highestVehiclePriority > rideEntry->BuildMenuPriority) { @@ -699,7 +699,7 @@ static Widget window_new_ride_widgets[] = { highestVehiclePriority = rideEntry->BuildMenuPriority; // Determines how and where to draw a button for this ride type/vehicle. - if (gConfigInterface.ListRideVehiclesSeparately + if (Config::Get().interface.ListRideVehiclesSeparately || GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) { // Separate, draw apart @@ -931,7 +931,7 @@ static Widget window_new_ride_widgets[] = { if (!_vehicleAvailability.empty()) { - if (gConfigInterface.ListRideVehiclesSeparately) + if (Config::Get().interface.ListRideVehiclesSeparately) { ft = Formatter(); ft.Add(rideEntry->naming.Name); @@ -986,7 +986,7 @@ static Widget window_new_ride_widgets[] = { spriteIndex += tab == THRILL_TAB ? ThrillRidesTabAnimationSequence[frame] : frame; GfxDrawSprite( - dpi, ImageId(spriteIndex, colours[1]), + dpi, ImageId(spriteIndex, colours[1].colour), windowPos + ScreenCoordsXY{ widgets[widgetIndex].left, widgets[widgetIndex].top }); } } diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index 11ccc0c555..c9e1a3d415 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -208,7 +208,9 @@ static Widget window_news_widgets[] = { { auto ft = Formatter(); ft.Add(newsItem.Text.c_str()); - DrawTextWrapped(dpi, { 2, y + lineHeight }, 325, STR_BOTTOM_TOOLBAR_NEWS_TEXT, ft, { FontStyle::Small }); + DrawTextWrapped( + dpi, { 2, y + lineHeight }, 325, STR_BOTTOM_TOOLBAR_NEWS_TEXT, ft, + { COLOUR_BRIGHT_GREEN, FontStyle::Small }); } // Subject button if ((newsItem.TypeHasSubject()) && !(newsItem.HasButton())) diff --git a/src/openrct2-ui/windows/NewsOptions.cpp b/src/openrct2-ui/windows/NewsOptions.cpp index 91658f2599..d3e81e2c18 100644 --- a/src/openrct2-ui/windows/NewsOptions.cpp +++ b/src/openrct2-ui/windows/NewsOptions.cpp @@ -37,24 +37,24 @@ struct NotificationDef }; static constexpr NotificationDef NewsItemOptionDefinitions[] = { - { NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_AWARD, offsetof(NotificationConfiguration, ParkAward) }, - { NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED, offsetof(NotificationConfiguration, ParkMarketingCampaignFinished) }, - { NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_WARNINGS, offsetof(NotificationConfiguration, ParkWarnings) }, - { NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_RATING_WARNINGS, offsetof(NotificationConfiguration, ParkRatingWarnings) }, - { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_BROKEN_DOWN, offsetof(NotificationConfiguration, RideBrokenDown) }, - { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CRASHED, offsetof(NotificationConfiguration, RideCrashed) }, - { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CASUALTIES, offsetof(NotificationConfiguration, RideCasualties) }, - { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_WARNINGS, offsetof(NotificationConfiguration, RideWarnings) }, - { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_RESEARCHED, offsetof(NotificationConfiguration, RideResearched) }, - { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_VEHICLE_STALLED, offsetof(NotificationConfiguration, RideStalledVehicles) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_WARNINGS, offsetof(NotificationConfiguration, GuestWarnings) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_PARK, offsetof(NotificationConfiguration, GuestLeftPark) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE, offsetof(NotificationConfiguration, GuestQueuingForRide) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_ON_RIDE, offsetof(NotificationConfiguration, GuestOnRide) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_RIDE, offsetof(NotificationConfiguration, GuestLeftRide) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_BOUGHT_ITEM, offsetof(NotificationConfiguration, GuestBoughtItem) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_USED_FACILITY, offsetof(NotificationConfiguration, GuestUsedFacility) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_DIED, offsetof(NotificationConfiguration, GuestDied) }, + { NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_AWARD, offsetof(Config::Notification, ParkAward) }, + { NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED, offsetof(Config::Notification, ParkMarketingCampaignFinished) }, + { NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_WARNINGS, offsetof(Config::Notification, ParkWarnings) }, + { NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_RATING_WARNINGS, offsetof(Config::Notification, ParkRatingWarnings) }, + { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_BROKEN_DOWN, offsetof(Config::Notification, RideBrokenDown) }, + { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CRASHED, offsetof(Config::Notification, RideCrashed) }, + { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CASUALTIES, offsetof(Config::Notification, RideCasualties) }, + { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_WARNINGS, offsetof(Config::Notification, RideWarnings) }, + { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_RESEARCHED, offsetof(Config::Notification, RideResearched) }, + { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_VEHICLE_STALLED, offsetof(Config::Notification, RideStalledVehicles) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_WARNINGS, offsetof(Config::Notification, GuestWarnings) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_PARK, offsetof(Config::Notification, GuestLeftPark) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE, offsetof(Config::Notification, GuestQueuingForRide) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_ON_RIDE, offsetof(Config::Notification, GuestOnRide) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_RIDE, offsetof(Config::Notification, GuestLeftRide) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_BOUGHT_ITEM, offsetof(Config::Notification, GuestBoughtItem) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_USED_FACILITY, offsetof(Config::Notification, GuestUsedFacility) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_DIED, offsetof(Config::Notification, GuestDied) }, }; enum WindowNewsOptionsWidgetIdx @@ -131,7 +131,7 @@ static Widget WindowNewsOptionsWidgets[] = { bool* configValue = GetNotificationValuePtr(ndef); *configValue = !(*configValue); - ConfigSaveDefault(); + Config::Save(); InvalidateWidget(widgetIndex); break; @@ -257,7 +257,8 @@ static Widget WindowNewsOptionsWidgets[] = { bool* GetNotificationValuePtr(const NotificationDef* ndef) { - bool* configValue = reinterpret_cast(reinterpret_cast(&gConfigNotifications) + ndef->config_offset); + bool* configValue = reinterpret_cast( + reinterpret_cast(&Config::Get().notifications) + ndef->config_offset); return configValue; } diff --git a/src/openrct2-ui/windows/ObjectLoadError.cpp b/src/openrct2-ui/windows/ObjectLoadError.cpp index 3eca21d95e..8852b03ee8 100644 --- a/src/openrct2-ui/windows/ObjectLoadError.cpp +++ b/src/openrct2-ui/windows/ObjectLoadError.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -465,19 +466,19 @@ static Widget window_object_load_error_widgets[] = { ScreenSize OnScrollGetSize(const int32_t scrollIndex) override { - return ScreenSize(0, no_list_items * SCROLLABLE_ROW_HEIGHT); + return ScreenSize(0, no_list_items * kScrollableRowHeight); } void OnScrollMouseDown(const int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - const auto selectedItem = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + const auto selectedItem = screenCoords.y / kScrollableRowHeight; SelectObjectFromList(selectedItem); } void OnScrollMouseOver(const int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { // Highlight item that the cursor is over, or remove highlighting if none - const auto selectedItem = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + const auto selectedItem = screenCoords.y / kScrollableRowHeight; if (selectedItem < 0 || selectedItem >= no_list_items) _highlightedIndex = -1; else @@ -507,28 +508,28 @@ static Widget window_object_load_error_widgets[] = { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; GfxFillRect( dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, - ColourMapA[colours[1]].mid_light); + ColourMapA[colours[1].colour].mid_light); const int32_t listWidth = widgets[WIDX_SCROLL].width(); for (int32_t i = 0; i < no_list_items; i++) { ScreenCoordsXY screenCoords; - screenCoords.y = i * SCROLLABLE_ROW_HEIGHT; + screenCoords.y = i * kScrollableRowHeight; if (screenCoords.y > dpi.y + dpi.height) break; - if (screenCoords.y + SCROLLABLE_ROW_HEIGHT < dpi.y) + if (screenCoords.y + kScrollableRowHeight < dpi.y) continue; const auto screenRect = ScreenRect{ { 0, screenCoords.y }, - { listWidth, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } }; + { listWidth, screenCoords.y + kScrollableRowHeight - 1 } }; // If hovering over item, change the color and fill the backdrop. if (i == selected_list_item) - GfxFillRect(dpi, screenRect, ColourMapA[colours[1]].darker); + GfxFillRect(dpi, screenRect, ColourMapA[colours[1].colour].darker); else if (i == _highlightedIndex) - GfxFillRect(dpi, screenRect, ColourMapA[colours[1]].mid_dark); + GfxFillRect(dpi, screenRect, ColourMapA[colours[1].colour].mid_dark); else if ((i & 1) != 0) // odd / even check - GfxFillRect(dpi, screenRect, ColourMapA[colours[1]].light); + GfxFillRect(dpi, screenRect, ColourMapA[colours[1].colour].light); // Draw the actual object entry's name... screenCoords.x = NAME_COL_LEFT - 3; @@ -538,7 +539,7 @@ static Widget window_object_load_error_widgets[] = { auto name = entry.GetName(); char buffer[256]; String::Set(buffer, sizeof(buffer), name.data(), name.size()); - GfxDrawString(dpi, screenCoords, buffer, { COLOUR_DARK_GREEN }); + DrawText(dpi, screenCoords, { COLOUR_DARK_GREEN }, buffer); if (entry.Generation == ObjectGeneration::DAT) { diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index 7960e6605a..e6c743b3c8 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,9 @@ #include #include +using namespace OpenRCT2; using namespace OpenRCT2::Audio; + namespace OpenRCT2::Ui::Windows { // clang-format off @@ -159,6 +162,8 @@ enum WindowOptionsWidgetIdx { WIDX_INVERT_DRAG, WIDX_ZOOM_TO_CURSOR, WIDX_WINDOW_BUTTONS_ON_THE_LEFT, + WIDX_ENLARGED_UI, + WIDX_TOUCH_ENHANCEMENTS, WIDX_HOTKEY_DROPDOWN, WIDX_THEMES_GROUP, WIDX_THEMES_LABEL, @@ -166,6 +171,7 @@ enum WindowOptionsWidgetIdx { WIDX_THEMES_DROPDOWN, WIDX_THEMES_BUTTON, WIDX_TOOLBAR_BUTTONS_GROUP, + WIDX_TOOLBAR_BUTTONS_CENTRED, WIDX_TOOLBAR_BUTTONS_SHOW_FOR_LABEL, WIDX_TOOLBAR_SHOW_FINANCES, WIDX_TOOLBAR_SHOW_RESEARCH, @@ -251,27 +257,27 @@ static Widget window_options_display_widgets[] = { kWidgetsEnd, }; +constexpr int32_t kFrameRenderingStart = 53; +constexpr int32_t kFrameEffectStart = 163; + static Widget window_options_rendering_widgets[] = { MAIN_OPTIONS_WIDGETS, -#define FRAME_RENDERING_START 53 - MakeWidget({ 5, FRAME_RENDERING_START + 0}, {300, 108}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_RENDERING_GROUP ), // Rendering group - MakeWidget({ 10, FRAME_RENDERING_START + 15}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_SMOOTHING, STR_TILE_SMOOTHING_TIP ), // Landscape smoothing - MakeWidget({ 10, FRAME_RENDERING_START + 30}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_GRIDLINES, STR_GRIDLINES_TIP ), // Gridlines - MakeWidget({ 10, FRAME_RENDERING_START + 45}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_UPPERCASE_BANNERS, STR_UPPERCASE_BANNERS_TIP ), // Uppercase banners - MakeWidget({ 10, FRAME_RENDERING_START + 60}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_SHOW_GUEST_PURCHASES, STR_SHOW_GUEST_PURCHASES_TIP ), // Guest purchases - MakeWidget({ 10, FRAME_RENDERING_START + 75}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TRANSPARENT_SCREENSHOT, STR_TRANSPARENT_SCREENSHOT_TIP), // Transparent screenshot - MakeWidget({ 10, FRAME_RENDERING_START + 90}, {281, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_VIRTUAL_FLOOR_STYLE, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor - MakeWidget({155, FRAME_RENDERING_START + 90}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor dropdown - MakeWidget({288, FRAME_RENDERING_START + 91}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor dropdown -#undef FRAME_RENDERING_START -#define FRAME_EFFECTS_START 163 - MakeWidget({ 5, FRAME_EFFECTS_START + 0}, {300, 94}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_EFFECTS_GROUP ), // Rendering group - MakeWidget({10, FRAME_EFFECTS_START + 15}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CYCLE_DAY_NIGHT, STR_CYCLE_DAY_NIGHT_TIP ), // Cycle day-night - MakeWidget({25, FRAME_EFFECTS_START + 30}, {266, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_ENABLE_LIGHTING_EFFECTS, STR_ENABLE_LIGHTING_EFFECTS_TIP ), // Enable light fx - MakeWidget({40, FRAME_EFFECTS_START + 45}, {251, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_ENABLE_LIGHTING_VEHICLES, STR_ENABLE_LIGHTING_VEHICLES_TIP), // Enable light fx for vehicles - MakeWidget({10, FRAME_EFFECTS_START + 60}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_RENDER_WEATHER_EFFECTS, STR_RENDER_WEATHER_EFFECTS_TIP ), // Render weather effects - MakeWidget({25, FRAME_EFFECTS_START + 75}, {266, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_DISABLE_LIGHTNING_EFFECT, STR_DISABLE_LIGHTNING_EFFECT_TIP), // Disable lightning effect -#undef FRAME_EFFECTS_START + MakeWidget({ 5, kFrameRenderingStart + 0}, {300, 108}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_RENDERING_GROUP ), // Rendering group + MakeWidget({ 10, kFrameRenderingStart + 15}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_SMOOTHING, STR_TILE_SMOOTHING_TIP ), // Landscape smoothing + MakeWidget({ 10, kFrameRenderingStart + 30}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_GRIDLINES, STR_GRIDLINES_TIP ), // Gridlines + MakeWidget({ 10, kFrameRenderingStart + 45}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_UPPERCASE_BANNERS, STR_UPPERCASE_BANNERS_TIP ), // Uppercase banners + MakeWidget({ 10, kFrameRenderingStart + 60}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_SHOW_GUEST_PURCHASES, STR_SHOW_GUEST_PURCHASES_TIP ), // Guest purchases + MakeWidget({ 10, kFrameRenderingStart + 75}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TRANSPARENT_SCREENSHOT, STR_TRANSPARENT_SCREENSHOT_TIP), // Transparent screenshot + MakeWidget({ 10, kFrameRenderingStart + 90}, {281, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_VIRTUAL_FLOOR_STYLE, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor + MakeWidget({155, kFrameRenderingStart + 90}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor dropdown + MakeWidget({288, kFrameRenderingStart + 91}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor dropdown + + MakeWidget({ 5, kFrameEffectStart + 0}, {300, 94}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_EFFECTS_GROUP ), // Rendering group + MakeWidget({10, kFrameEffectStart + 15}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CYCLE_DAY_NIGHT, STR_CYCLE_DAY_NIGHT_TIP ), // Cycle day-night + MakeWidget({25, kFrameEffectStart + 30}, {266, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_ENABLE_LIGHTING_EFFECTS, STR_ENABLE_LIGHTING_EFFECTS_TIP ), // Enable light fx + MakeWidget({40, kFrameEffectStart + 45}, {251, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_ENABLE_LIGHTING_VEHICLES, STR_ENABLE_LIGHTING_VEHICLES_TIP), // Enable light fx for vehicles + MakeWidget({10, kFrameEffectStart + 60}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_RENDER_WEATHER_EFFECTS, STR_RENDER_WEATHER_EFFECTS_TIP ), // Render weather effects + MakeWidget({25, kFrameEffectStart + 75}, {266, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_DISABLE_LIGHTNING_EFFECT, STR_DISABLE_LIGHTNING_EFFECT_TIP), // Disable lightning effect kWidgetsEnd, }; @@ -315,87 +321,85 @@ static Widget window_options_audio_widgets[] = { kWidgetsEnd, }; +constexpr int32_t kControlsGroupStart = 53; +constexpr int32_t kThemesGroupStart = 193; +constexpr int32_t kToolbarGroupStart = 245; + static Widget window_options_controls_and_interface_widgets[] = { MAIN_OPTIONS_WIDGETS, -#define CONTROLS_GROUP_START 53 - MakeWidget({ 5, CONTROLS_GROUP_START + 0}, {300,107}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CONTROLS_GROUP ), // Controls group - MakeWidget({ 10, CONTROLS_GROUP_START + 13}, {290, 14}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_SCREEN_EDGE_SCROLLING, STR_SCREEN_EDGE_SCROLLING_TIP ), // Edge scrolling - MakeWidget({ 10, CONTROLS_GROUP_START + 30}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_TRAP_MOUSE, STR_TRAP_MOUSE_TIP ), // Trap mouse - MakeWidget({ 10, CONTROLS_GROUP_START + 45}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_INVERT_RIGHT_MOUSE_DRAG, STR_INVERT_RIGHT_MOUSE_DRAG_TIP ), // Invert right mouse dragging - MakeWidget({ 10, CONTROLS_GROUP_START + 60}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_ZOOM_TO_CURSOR, STR_ZOOM_TO_CURSOR_TIP ), // Zoom to cursor - MakeWidget({ 10, CONTROLS_GROUP_START + 75}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary, STR_WINDOW_BUTTONS_ON_THE_LEFT, STR_WINDOW_BUTTONS_ON_THE_LEFT_TIP), // Window buttons on the left - MakeWidget({155, CONTROLS_GROUP_START + 90}, {145, 13}, WindowWidgetType::Button, WindowColour::Secondary, STR_HOTKEY, STR_HOTKEY_TIP ), // Set hotkeys buttons -#undef CONTROLS_GROUP_START -#define THEMES_GROUP_START 163 - MakeWidget({ 5, THEMES_GROUP_START + 0}, {300, 48}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_THEMES_GROUP ), // Themes group - MakeWidget({ 10, THEMES_GROUP_START + 14}, {145, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_THEMES_LABEL_CURRENT_THEME, STR_CURRENT_THEME_TIP ), // Themes - MakeWidget({155, THEMES_GROUP_START + 14}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_STRING ), - MakeWidget({288, THEMES_GROUP_START + 15}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_CURRENT_THEME_TIP ), - MakeWidget({155, THEMES_GROUP_START + 30}, {145, 13}, WindowWidgetType::Button, WindowColour::Secondary, STR_EDIT_THEMES_BUTTON, STR_EDIT_THEMES_BUTTON_TIP), // Themes button -#undef THEMES_GROUP_START -#define TOOLBAR_GROUP_START 215 - MakeWidget({ 5, TOOLBAR_GROUP_START + 0}, {300, 92}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_TOOLBAR_BUTTONS_GROUP ), // Toolbar buttons group - MakeWidget({ 10, TOOLBAR_GROUP_START + 14}, {280, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_SHOW_TOOLBAR_BUTTONS_FOR ), - MakeWidget({ 24, TOOLBAR_GROUP_START + 31}, {122, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_FINANCES_BUTTON_ON_TOOLBAR, STR_FINANCES_BUTTON_ON_TOOLBAR_TIP ), // Finances - MakeWidget({ 24, TOOLBAR_GROUP_START + 46}, {122, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_RESEARCH_BUTTON_ON_TOOLBAR, STR_RESEARCH_BUTTON_ON_TOOLBAR_TIP ), // Research - MakeWidget({155, TOOLBAR_GROUP_START + 31}, {145, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_CHEATS_BUTTON_ON_TOOLBAR, STR_CHEATS_BUTTON_ON_TOOLBAR_TIP ), // Cheats - MakeWidget({155, TOOLBAR_GROUP_START + 46}, {145, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_SHOW_RECENT_MESSAGES_ON_TOOLBAR, STR_SHOW_RECENT_MESSAGES_ON_TOOLBAR_TIP), // Recent messages - MakeWidget({ 24, TOOLBAR_GROUP_START + 61}, {162, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_MUTE_BUTTON_ON_TOOLBAR, STR_MUTE_BUTTON_ON_TOOLBAR_TIP ), // Mute - MakeWidget({155, TOOLBAR_GROUP_START + 61}, {145, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_CHAT_BUTTON_ON_TOOLBAR, STR_CHAT_BUTTON_ON_TOOLBAR_TIP ), // Chat - MakeWidget({ 24, TOOLBAR_GROUP_START + 76}, {122, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_ZOOM_BUTTON_ON_TOOLBAR, STR_ZOOM_BUTTON_ON_TOOLBAR_TIP ), // Zoom + MakeWidget({ 5, kControlsGroupStart + 0}, {300,137}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CONTROLS_GROUP ), // Controls group + MakeWidget({ 10, kControlsGroupStart + 13}, {290, 14}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_SCREEN_EDGE_SCROLLING, STR_SCREEN_EDGE_SCROLLING_TIP ), // Edge scrolling + MakeWidget({ 10, kControlsGroupStart + 30}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_TRAP_MOUSE, STR_TRAP_MOUSE_TIP ), // Trap mouse + MakeWidget({ 10, kControlsGroupStart + 45}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_INVERT_RIGHT_MOUSE_DRAG, STR_INVERT_RIGHT_MOUSE_DRAG_TIP ), // Invert right mouse dragging + MakeWidget({ 10, kControlsGroupStart + 60}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_ZOOM_TO_CURSOR, STR_ZOOM_TO_CURSOR_TIP ), // Zoom to cursor + MakeWidget({ 10, kControlsGroupStart + 75}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary, STR_WINDOW_BUTTONS_ON_THE_LEFT, STR_WINDOW_BUTTONS_ON_THE_LEFT_TIP), // Window buttons on the left + MakeWidget({ 10, kControlsGroupStart + 90}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary, STR_ENLARGED_UI, STR_ENLARGED_UI_TIP ), + MakeWidget({ 25, kControlsGroupStart + 105}, {275, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary, STR_TOUCH_ENHANCEMENTS, STR_TOUCH_ENHANCEMENTS_TIP ), + MakeWidget({155, kControlsGroupStart + 120}, {145, 13}, WindowWidgetType::Button, WindowColour::Secondary, STR_HOTKEY, STR_HOTKEY_TIP ), // Set hotkeys buttons + + MakeWidget({ 5, kThemesGroupStart + 0}, {300, 48}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_THEMES_GROUP ), // Themes group + MakeWidget({ 10, kThemesGroupStart + 14}, {145, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_THEMES_LABEL_CURRENT_THEME, STR_CURRENT_THEME_TIP ), // Themes + MakeWidget({155, kThemesGroupStart + 14}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_STRING ), + MakeWidget({288, kThemesGroupStart + 15}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_CURRENT_THEME_TIP ), + MakeWidget({155, kThemesGroupStart + 30}, {145, 13}, WindowWidgetType::Button, WindowColour::Secondary, STR_EDIT_THEMES_BUTTON, STR_EDIT_THEMES_BUTTON_TIP), // Themes button + + MakeWidget({ 5, kToolbarGroupStart + 0}, {300,107}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_TOOLBAR_BUTTONS_GROUP ), // Toolbar buttons group + MakeWidget({ 10, kToolbarGroupStart + 14}, {280, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary, STR_OPTIONS_TOOLBAR_BUTTONS_CENTRED, STR_OPTIONS_TOOLBAR_BUTTONS_CENTRED_TIP), + MakeWidget({ 10, kToolbarGroupStart + 31}, {280, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_SHOW_TOOLBAR_BUTTONS_FOR ), + MakeWidget({ 24, kToolbarGroupStart + 46}, {122, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_FINANCES_BUTTON_ON_TOOLBAR, STR_FINANCES_BUTTON_ON_TOOLBAR_TIP ), // Finances + MakeWidget({ 24, kToolbarGroupStart + 61}, {122, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_RESEARCH_BUTTON_ON_TOOLBAR, STR_RESEARCH_BUTTON_ON_TOOLBAR_TIP ), // Research + MakeWidget({155, kToolbarGroupStart + 46}, {145, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_CHEATS_BUTTON_ON_TOOLBAR, STR_CHEATS_BUTTON_ON_TOOLBAR_TIP ), // Cheats + MakeWidget({155, kToolbarGroupStart + 61}, {145, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_SHOW_RECENT_MESSAGES_ON_TOOLBAR, STR_SHOW_RECENT_MESSAGES_ON_TOOLBAR_TIP), // Recent messages + MakeWidget({ 24, kToolbarGroupStart + 76}, {162, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_MUTE_BUTTON_ON_TOOLBAR, STR_MUTE_BUTTON_ON_TOOLBAR_TIP ), // Mute + MakeWidget({155, kToolbarGroupStart + 76}, {145, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_CHAT_BUTTON_ON_TOOLBAR, STR_CHAT_BUTTON_ON_TOOLBAR_TIP ), // Chat + MakeWidget({ 24, kToolbarGroupStart + 91}, {122, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_ZOOM_BUTTON_ON_TOOLBAR, STR_ZOOM_BUTTON_ON_TOOLBAR_TIP ), // Zoom kWidgetsEnd, -#undef TOOLBAR_GROUP_START }; -#define TITLE_SEQUENCE_START 53 -#define SCENARIO_START (TITLE_SEQUENCE_START + 35) -#define SCENARIO_OPTIONS_START (SCENARIO_START + 55) -#define TWEAKS_START (SCENARIO_OPTIONS_START + 39) +constexpr int32_t kTitleSequenceStart = 53; +constexpr int32_t kScenarioGroupStart = kTitleSequenceStart + 35; +constexpr int32_t kScenarioOptionsGroupStart = kScenarioGroupStart + 55; +constexpr int32_t kTweaksStart = kScenarioOptionsGroupStart + 39; static Widget window_options_misc_widgets[] = { MAIN_OPTIONS_WIDGETS, - MakeWidget( { 5, TITLE_SEQUENCE_START + 0}, {300, 31}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_OPTIONS_TITLE_SEQUENCE ), - MakeDropdownWidgets({ 10, TITLE_SEQUENCE_START + 15}, {290, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_STRINGID, STR_TITLE_SEQUENCE_TIP), // Title sequence dropdown + MakeWidget( { 5, kTitleSequenceStart + 0}, {300, 31}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_OPTIONS_TITLE_SEQUENCE ), + MakeDropdownWidgets({ 10, kTitleSequenceStart + 15}, {290, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_STRINGID, STR_TITLE_SEQUENCE_TIP), // Title sequence dropdown - MakeWidget({ 5, SCENARIO_START + 0}, {300, 51}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_OPTIONS_SCENARIO_SELECTION ), - MakeWidget({ 10, SCENARIO_START + 16}, {165, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_OPTIONS_SCENARIO_GROUPING, STR_SCENARIO_GROUPING_TIP ), - MakeWidget({175, SCENARIO_START + 15}, {125, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Scenario select mode - MakeWidget({288, SCENARIO_START + 16}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SCENARIO_GROUPING_TIP ), - MakeWidget({ 25, SCENARIO_START + 30}, {275, 16}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_OPTIONS_SCENARIO_UNLOCKING, STR_SCENARIO_UNLOCKING_TIP), // Unlocking of scenarios + MakeWidget({ 5, kScenarioGroupStart + 0}, {300, 51}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_OPTIONS_SCENARIO_SELECTION ), + MakeWidget({ 10, kScenarioGroupStart + 16}, {165, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_OPTIONS_SCENARIO_GROUPING, STR_SCENARIO_GROUPING_TIP ), + MakeWidget({175, kScenarioGroupStart + 15}, {125, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Scenario select mode + MakeWidget({288, kScenarioGroupStart + 16}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SCENARIO_GROUPING_TIP ), + MakeWidget({ 25, kScenarioGroupStart + 30}, {275, 16}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_OPTIONS_SCENARIO_UNLOCKING, STR_SCENARIO_UNLOCKING_TIP), // Unlocking of scenarios - MakeWidget({ 5, SCENARIO_OPTIONS_START + 0}, {300, 35}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_SCENARIO_OPTIONS ), - MakeWidget({10, SCENARIO_OPTIONS_START + 15}, {290, 15}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_ALLOW_EARLY_COMPLETION, STR_EARLY_COMPLETION_TIP), // Allow early scenario completion + MakeWidget({ 5, kScenarioOptionsGroupStart + 0}, {300, 35}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_SCENARIO_OPTIONS ), + MakeWidget({10, kScenarioOptionsGroupStart + 15}, {290, 15}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_ALLOW_EARLY_COMPLETION, STR_EARLY_COMPLETION_TIP), // Allow early scenario completion - MakeWidget({ 5, TWEAKS_START + 0}, {300, 81}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_OPTIONS_TWEAKS ), - MakeWidget({ 10, TWEAKS_START + 15}, {290, 15}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_REAL_NAME, STR_REAL_NAME_TIP ), // Show 'real' names of guests - MakeWidget({ 10, TWEAKS_START + 30}, {290, 15}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_AUTO_STAFF_PLACEMENT, STR_AUTO_STAFF_PLACEMENT_TIP ), // Auto staff placement - MakeWidget({ 10, TWEAKS_START + 45}, {290, 15}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_AUTO_OPEN_SHOPS, STR_AUTO_OPEN_SHOPS_TIP ), // Automatically open shops & stalls - MakeWidget({ 10, TWEAKS_START + 62}, {165, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_DEFAULT_INSPECTION_INTERVAL, STR_DEFAULT_INSPECTION_INTERVAL_TIP), - MakeWidget({175, TWEAKS_START + 61}, {125, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Default inspection time dropdown - MakeWidget({288, TWEAKS_START + 62}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_DEFAULT_INSPECTION_INTERVAL_TIP ), // Default inspection time dropdown button + MakeWidget({ 5, kTweaksStart + 0}, {300, 81}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_OPTIONS_TWEAKS ), + MakeWidget({ 10, kTweaksStart + 15}, {290, 15}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_REAL_NAME, STR_REAL_NAME_TIP ), // Show 'real' names of guests + MakeWidget({ 10, kTweaksStart + 30}, {290, 15}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_AUTO_STAFF_PLACEMENT, STR_AUTO_STAFF_PLACEMENT_TIP ), // Auto staff placement + MakeWidget({ 10, kTweaksStart + 45}, {290, 15}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_AUTO_OPEN_SHOPS, STR_AUTO_OPEN_SHOPS_TIP ), // Automatically open shops & stalls + MakeWidget({ 10, kTweaksStart + 62}, {165, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_DEFAULT_INSPECTION_INTERVAL, STR_DEFAULT_INSPECTION_INTERVAL_TIP), + MakeWidget({175, kTweaksStart + 61}, {125, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Default inspection time dropdown + MakeWidget({288, kTweaksStart + 62}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_DEFAULT_INSPECTION_INTERVAL_TIP ), // Default inspection time dropdown button kWidgetsEnd, }; -#undef TWEAKS_START -#undef SCENARIO_OPTIONS_START -#undef SCENARIO_START -#undef TITLE_SEQUENCE_START - static Widget window_options_advanced_widgets[] = { MAIN_OPTIONS_WIDGETS, - MakeWidget ({ 10, 54}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_ENABLE_DEBUGGING_TOOLS, STR_ENABLE_DEBUGGING_TOOLS_TIP ), // Enable debugging tools - MakeWidget ({ 10, 84}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_SAVE_PLUGIN_DATA, STR_SAVE_PLUGIN_DATA_TIP ), // Export plug-in objects with saved games - MakeWidget ({ 10, 99}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary , STR_STAY_CONNECTED_AFTER_DESYNC, STR_STAY_CONNECTED_AFTER_DESYNC_TIP ), // Do not disconnect after the client desynchronises with the server - MakeWidget ({ 10, 114}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_ALWAYS_NATIVE_LOADSAVE, STR_ALWAYS_NATIVE_LOADSAVE_TIP ), // Use native load/save window - MakeWidget ({ 24, 131}, {135, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_OPTIONS_AUTOSAVE_FREQUENCY_LABEL, STR_AUTOSAVE_FREQUENCY_TIP ), - MakeWidget ({165, 130}, {135, 13}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Autosave dropdown - MakeWidget ({288, 131}, { 11, 11}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_AUTOSAVE_FREQUENCY_TIP ), // Autosave dropdown button - MakeWidget ({ 24, 151}, {135, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_AUTOSAVE_AMOUNT, STR_AUTOSAVE_AMOUNT_TIP ), - MakeSpinnerWidgets({165, 150}, {135, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_NONE, STR_AUTOSAVE_AMOUNT_TIP ), // Autosave amount spinner - MakeWidget ({ 23, 169}, {276, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_PATH_TO_RCT1, STR_PATH_TO_RCT1_TIP ), // RCT 1 path text - MakeWidget ({ 24, 184}, {266, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_NONE, STR_STRING_TOOLTIP ), // RCT 1 path button - MakeWidget ({289, 184}, { 11, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CLOSE_X, STR_PATH_TO_RCT1_CLEAR_TIP ), // RCT 1 path clear button - MakeWidget ({ 24, 200}, {140, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_ASSET_PACKS, STR_NONE ), // Asset packs + MakeWidget ({ 10, 54}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary, STR_ENABLE_DEBUGGING_TOOLS, STR_ENABLE_DEBUGGING_TOOLS_TIP ), // Enable debugging tools + MakeWidget ({ 10, 69}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary, STR_SAVE_PLUGIN_DATA, STR_SAVE_PLUGIN_DATA_TIP ), // Export plug-in objects with saved games + MakeWidget ({ 10, 84}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Tertiary, STR_STAY_CONNECTED_AFTER_DESYNC, STR_STAY_CONNECTED_AFTER_DESYNC_TIP ), // Do not disconnect after the client desynchronises with the server + MakeWidget ({ 10, 99}, {290, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_ALWAYS_NATIVE_LOADSAVE, STR_ALWAYS_NATIVE_LOADSAVE_TIP ), // Use native load/save window + MakeWidget ({ 23, 114}, {135, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_OPTIONS_AUTOSAVE_FREQUENCY_LABEL, STR_AUTOSAVE_FREQUENCY_TIP ), + MakeWidget ({165, 113}, {135, 13}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Autosave dropdown + MakeWidget ({288, 114}, { 11, 11}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_AUTOSAVE_FREQUENCY_TIP ), // Autosave dropdown button + MakeWidget ({ 23, 130}, {135, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_AUTOSAVE_AMOUNT, STR_AUTOSAVE_AMOUNT_TIP ), + MakeSpinnerWidgets({165, 130}, {135, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_NONE, STR_AUTOSAVE_AMOUNT_TIP ), // Autosave amount spinner + MakeWidget ({ 23, 145}, {276, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_PATH_TO_RCT1, STR_PATH_TO_RCT1_TIP ), // RCT 1 path text + MakeWidget ({ 24, 160}, {266, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_NONE, STR_STRING_TOOLTIP ), // RCT 1 path button + MakeWidget ({289, 160}, { 11, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CLOSE_X, STR_PATH_TO_RCT1_CLEAR_TIP ), // RCT 1 path clear button + MakeWidget ({150, 176}, {150, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_EDIT_ASSET_PACKS_BUTTON, STR_NONE ), // Asset packs kWidgetsEnd, }; @@ -687,42 +691,42 @@ static Widget *window_options_page_widgets[] = { switch (widgetIndex) { case WIDX_UNCAP_FPS_CHECKBOX: - gConfigGeneral.UncapFPS ^= 1; - DrawingEngineSetVSync(gConfigGeneral.UseVSync); - ConfigSaveDefault(); + Config::Get().general.UncapFPS ^= 1; + DrawingEngineSetVSync(Config::Get().general.UseVSync); + Config::Save(); Invalidate(); break; case WIDX_USE_VSYNC_CHECKBOX: - gConfigGeneral.UseVSync ^= 1; - DrawingEngineSetVSync(gConfigGeneral.UseVSync); - ConfigSaveDefault(); + Config::Get().general.UseVSync ^= 1; + DrawingEngineSetVSync(Config::Get().general.UseVSync); + Config::Save(); Invalidate(); break; case WIDX_SHOW_FPS_CHECKBOX: - gConfigGeneral.ShowFPS ^= 1; - ConfigSaveDefault(); + Config::Get().general.ShowFPS ^= 1; + Config::Save(); Invalidate(); break; case WIDX_MULTITHREADING_CHECKBOX: - gConfigGeneral.MultiThreading ^= 1; - ConfigSaveDefault(); + Config::Get().general.MultiThreading ^= 1; + Config::Save(); Invalidate(); break; case WIDX_MINIMIZE_FOCUS_LOSS: - gConfigGeneral.MinimizeFullscreenFocusLoss ^= 1; + Config::Get().general.MinimizeFullscreenFocusLoss ^= 1; RefreshVideo(false); - ConfigSaveDefault(); + Config::Save(); Invalidate(); break; case WIDX_STEAM_OVERLAY_PAUSE: - gConfigGeneral.SteamOverlayPause ^= 1; - ConfigSaveDefault(); + Config::Get().general.SteamOverlayPause ^= 1; + Config::Save(); Invalidate(); break; case WIDX_DISABLE_SCREENSAVER_LOCK: - gConfigGeneral.DisableScreensaver ^= 1; + Config::Get().general.DisableScreensaver ^= 1; ApplyScreenSaverLockSetting(); - ConfigSaveDefault(); + Config::Save(); Invalidate(); break; } @@ -750,8 +754,8 @@ static Widget *window_options_page_widgets[] = { args[1] = resolution.Width; args[2] = resolution.Height; - if (resolution.Width == gConfigGeneral.FullscreenWidth - && resolution.Height == gConfigGeneral.FullscreenHeight) + if (resolution.Width == Config::Get().general.FullscreenWidth + && resolution.Height == Config::Get().general.FullscreenHeight) { selectedResolution = static_cast(i); } @@ -776,7 +780,7 @@ static Widget *window_options_page_widgets[] = { ShowDropdown(widget, 3); - Dropdown::SetChecked(gConfigGeneral.FullscreenMode, true); + Dropdown::SetChecked(Config::Get().general.FullscreenMode, true); break; case WIDX_DRAWING_ENGINE_DROPDOWN: { @@ -791,20 +795,20 @@ static Widget *window_options_page_widgets[] = { gDropdownItems[i].Args = DrawingEngineStringIds[i]; } ShowDropdown(widget, numItems); - Dropdown::SetChecked(EnumValue(gConfigGeneral.DrawingEngine), true); + Dropdown::SetChecked(EnumValue(Config::Get().general.DrawingEngine), true); break; } case WIDX_SCALE_UP: - gConfigGeneral.WindowScale += 0.25f; - ConfigSaveDefault(); + Config::Get().general.WindowScale += 0.25f; + Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); break; case WIDX_SCALE_DOWN: - gConfigGeneral.WindowScale -= 0.25f; - gConfigGeneral.WindowScale = std::max(0.5f, gConfigGeneral.WindowScale); - ConfigSaveDefault(); + Config::Get().general.WindowScale -= 0.25f; + Config::Get().general.WindowScale = std::max(0.5f, Config::Get().general.WindowScale); + Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); @@ -821,40 +825,41 @@ static Widget *window_options_page_widgets[] = { const auto& resolutions = OpenRCT2::GetContext()->GetUiContext()->GetFullscreenResolutions(); const Resolution& resolution = resolutions[dropdownIndex]; - if (resolution.Width != gConfigGeneral.FullscreenWidth - || resolution.Height != gConfigGeneral.FullscreenHeight) + if (resolution.Width != Config::Get().general.FullscreenWidth + || resolution.Height != Config::Get().general.FullscreenHeight) { - gConfigGeneral.FullscreenWidth = resolution.Width; - gConfigGeneral.FullscreenHeight = resolution.Height; + Config::Get().general.FullscreenWidth = resolution.Width; + Config::Get().general.FullscreenHeight = resolution.Height; - if (gConfigGeneral.FullscreenMode == static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) + if (Config::Get().general.FullscreenMode + == static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) ContextSetFullscreenMode(static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)); - ConfigSaveDefault(); + Config::Save(); GfxInvalidateScreen(); } } break; case WIDX_FULLSCREEN_DROPDOWN: - if (dropdownIndex != gConfigGeneral.FullscreenMode) + if (dropdownIndex != Config::Get().general.FullscreenMode) { ContextSetFullscreenMode(dropdownIndex); - gConfigGeneral.FullscreenMode = static_cast(dropdownIndex); - ConfigSaveDefault(); + Config::Get().general.FullscreenMode = static_cast(dropdownIndex); + Config::Save(); GfxInvalidateScreen(); } break; case WIDX_DRAWING_ENGINE_DROPDOWN: - if (dropdownIndex != EnumValue(gConfigGeneral.DrawingEngine)) + if (dropdownIndex != EnumValue(Config::Get().general.DrawingEngine)) { DrawingEngine srcEngine = drawing_engine_get_type(); DrawingEngine dstEngine = static_cast(dropdownIndex); - gConfigGeneral.DrawingEngine = dstEngine; + Config::Get().general.DrawingEngine = dstEngine; bool recreate_window = DrawingEngineRequiresNewWindow(srcEngine, dstEngine); RefreshVideo(recreate_window); - ConfigSaveDefault(); + Config::Save(); Invalidate(); } break; @@ -866,11 +871,11 @@ static Widget *window_options_page_widgets[] = { // Resolution dropdown caption. auto ft = Formatter::Common(); ft.Increment(16); - ft.Add(static_cast(gConfigGeneral.FullscreenWidth)); - ft.Add(static_cast(gConfigGeneral.FullscreenHeight)); + ft.Add(static_cast(Config::Get().general.FullscreenWidth)); + ft.Add(static_cast(Config::Get().general.FullscreenHeight)); // Disable resolution dropdown on "Windowed" and "Fullscreen (desktop)" - if (gConfigGeneral.FullscreenMode != static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) + if (Config::Get().general.FullscreenMode != static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) { disabled_widgets |= (1uLL << WIDX_RESOLUTION_DROPDOWN); disabled_widgets |= (1uLL << WIDX_RESOLUTION); @@ -884,8 +889,8 @@ static Widget *window_options_page_widgets[] = { } // Disable Steam Overlay checkbox when using software or OpenGL rendering. - if (gConfigGeneral.DrawingEngine == DrawingEngine::Software - || gConfigGeneral.DrawingEngine == DrawingEngine::OpenGL) + if (Config::Get().general.DrawingEngine == DrawingEngine::Software + || Config::Get().general.DrawingEngine == DrawingEngine::OpenGL) { disabled_widgets |= (1uLL << WIDX_STEAM_OVERLAY_PAUSE); } @@ -895,7 +900,7 @@ static Widget *window_options_page_widgets[] = { } // Disable changing VSync for Software engine, as we can't control its use of VSync - if (gConfigGeneral.DrawingEngine == DrawingEngine::Software) + if (Config::Get().general.DrawingEngine == DrawingEngine::Software) { disabled_widgets |= (1uLL << WIDX_USE_VSYNC_CHECKBOX); } @@ -904,23 +909,23 @@ static Widget *window_options_page_widgets[] = { disabled_widgets &= ~(1uLL << WIDX_USE_VSYNC_CHECKBOX); } - SetCheckboxValue(WIDX_UNCAP_FPS_CHECKBOX, gConfigGeneral.UncapFPS); - SetCheckboxValue(WIDX_USE_VSYNC_CHECKBOX, gConfigGeneral.UseVSync); - SetCheckboxValue(WIDX_SHOW_FPS_CHECKBOX, gConfigGeneral.ShowFPS); - SetCheckboxValue(WIDX_MULTITHREADING_CHECKBOX, gConfigGeneral.MultiThreading); - SetCheckboxValue(WIDX_MINIMIZE_FOCUS_LOSS, gConfigGeneral.MinimizeFullscreenFocusLoss); - SetCheckboxValue(WIDX_STEAM_OVERLAY_PAUSE, gConfigGeneral.SteamOverlayPause); - SetCheckboxValue(WIDX_DISABLE_SCREENSAVER_LOCK, gConfigGeneral.DisableScreensaver); + SetCheckboxValue(WIDX_UNCAP_FPS_CHECKBOX, Config::Get().general.UncapFPS); + SetCheckboxValue(WIDX_USE_VSYNC_CHECKBOX, Config::Get().general.UseVSync); + SetCheckboxValue(WIDX_SHOW_FPS_CHECKBOX, Config::Get().general.ShowFPS); + SetCheckboxValue(WIDX_MULTITHREADING_CHECKBOX, Config::Get().general.MultiThreading); + SetCheckboxValue(WIDX_MINIMIZE_FOCUS_LOSS, Config::Get().general.MinimizeFullscreenFocusLoss); + SetCheckboxValue(WIDX_STEAM_OVERLAY_PAUSE, Config::Get().general.SteamOverlayPause); + SetCheckboxValue(WIDX_DISABLE_SCREENSAVER_LOCK, Config::Get().general.DisableScreensaver); // Dropdown captions for straightforward strings. - widgets[WIDX_FULLSCREEN].text = FullscreenModeNames[gConfigGeneral.FullscreenMode]; - widgets[WIDX_DRAWING_ENGINE].text = DrawingEngineStringIds[EnumValue(gConfigGeneral.DrawingEngine)]; + widgets[WIDX_FULLSCREEN].text = FullscreenModeNames[Config::Get().general.FullscreenMode]; + widgets[WIDX_DRAWING_ENGINE].text = DrawingEngineStringIds[EnumValue(Config::Get().general.DrawingEngine)]; } void DisplayDraw(DrawPixelInfo& dpi) { auto ft = Formatter(); - ft.Add(static_cast(gConfigGeneral.WindowScale * 100)); + ft.Add(static_cast(Config::Get().general.WindowScale * 100)); DrawTextBasic( dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_SCALE].left + 1, widgets[WIDX_SCALE].top + 1 }, STR_WINDOW_COLOUR_2_COMMA2DP32, ft, { colours[1] }); @@ -933,19 +938,19 @@ static Widget *window_options_page_widgets[] = { switch (widgetIndex) { case WIDX_TILE_SMOOTHING_CHECKBOX: - gConfigGeneral.LandscapeSmoothing ^= 1; - ConfigSaveDefault(); + Config::Get().general.LandscapeSmoothing ^= 1; + Config::Save(); GfxInvalidateScreen(); break; case WIDX_GRIDLINES_CHECKBOX: { - gConfigGeneral.AlwaysShowGridlines ^= 1; - ConfigSaveDefault(); + Config::Get().general.AlwaysShowGridlines ^= 1; + Config::Save(); GfxInvalidateScreen(); WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - if (gConfigGeneral.AlwaysShowGridlines) + if (Config::Get().general.AlwaysShowGridlines) mainWindow->viewport->flags |= VIEWPORT_FLAG_GRIDLINES; else mainWindow->viewport->flags &= ~VIEWPORT_FLAG_GRIDLINES; @@ -953,46 +958,46 @@ static Widget *window_options_page_widgets[] = { break; } case WIDX_DAY_NIGHT_CHECKBOX: - gConfigGeneral.DayNightCycle ^= 1; - ConfigSaveDefault(); + Config::Get().general.DayNightCycle ^= 1; + Config::Save(); Invalidate(); break; case WIDX_ENABLE_LIGHT_FX_CHECKBOX: - gConfigGeneral.EnableLightFx ^= 1; - ConfigSaveDefault(); + Config::Get().general.EnableLightFx ^= 1; + Config::Save(); Invalidate(); break; case WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX: - gConfigGeneral.EnableLightFxForVehicles ^= 1; - ConfigSaveDefault(); + Config::Get().general.EnableLightFxForVehicles ^= 1; + Config::Save(); Invalidate(); break; case WIDX_UPPER_CASE_BANNERS_CHECKBOX: - gConfigGeneral.UpperCaseBanners ^= 1; - ConfigSaveDefault(); + Config::Get().general.UpperCaseBanners ^= 1; + Config::Save(); Invalidate(); ScrollingTextInvalidate(); break; case WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX: - gConfigGeneral.DisableLightningEffect ^= 1; - ConfigSaveDefault(); + Config::Get().general.DisableLightningEffect ^= 1; + Config::Save(); Invalidate(); break; case WIDX_RENDER_WEATHER_EFFECTS_CHECKBOX: - gConfigGeneral.RenderWeatherEffects ^= 1; - gConfigGeneral.RenderWeatherGloom = gConfigGeneral.RenderWeatherEffects; - ConfigSaveDefault(); + Config::Get().general.RenderWeatherEffects ^= 1; + Config::Get().general.RenderWeatherGloom = Config::Get().general.RenderWeatherEffects; + Config::Save(); Invalidate(); GfxInvalidateScreen(); break; case WIDX_SHOW_GUEST_PURCHASES_CHECKBOX: - gConfigGeneral.ShowGuestPurchases ^= 1; - ConfigSaveDefault(); + Config::Get().general.ShowGuestPurchases ^= 1; + Config::Save(); Invalidate(); break; case WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX: - gConfigGeneral.TransparentScreenshot ^= 1; - ConfigSaveDefault(); + Config::Get().general.TransparentScreenshot ^= 1; + Config::Save(); Invalidate(); break; } @@ -1013,7 +1018,7 @@ static Widget *window_options_page_widgets[] = { Widget* widget = &widgets[widgetIndex - 1]; ShowDropdown(widget, 3); - Dropdown::SetChecked(static_cast(gConfigGeneral.VirtualFloorStyle), true); + Dropdown::SetChecked(static_cast(Config::Get().general.VirtualFloorStyle), true); break; } } @@ -1023,20 +1028,20 @@ static Widget *window_options_page_widgets[] = { switch (widgetIndex) { case WIDX_VIRTUAL_FLOOR_DROPDOWN: - gConfigGeneral.VirtualFloorStyle = static_cast(dropdownIndex); - ConfigSaveDefault(); + Config::Get().general.VirtualFloorStyle = static_cast(dropdownIndex); + Config::Save(); break; } } void RenderingPrepareDraw() { - SetCheckboxValue(WIDX_TILE_SMOOTHING_CHECKBOX, gConfigGeneral.LandscapeSmoothing); - SetCheckboxValue(WIDX_GRIDLINES_CHECKBOX, gConfigGeneral.AlwaysShowGridlines); - SetCheckboxValue(WIDX_DAY_NIGHT_CHECKBOX, gConfigGeneral.DayNightCycle); - SetCheckboxValue(WIDX_SHOW_GUEST_PURCHASES_CHECKBOX, gConfigGeneral.ShowGuestPurchases); - SetCheckboxValue(WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX, gConfigGeneral.TransparentScreenshot); - SetCheckboxValue(WIDX_UPPER_CASE_BANNERS_CHECKBOX, gConfigGeneral.UpperCaseBanners); + SetCheckboxValue(WIDX_TILE_SMOOTHING_CHECKBOX, Config::Get().general.LandscapeSmoothing); + SetCheckboxValue(WIDX_GRIDLINES_CHECKBOX, Config::Get().general.AlwaysShowGridlines); + SetCheckboxValue(WIDX_DAY_NIGHT_CHECKBOX, Config::Get().general.DayNightCycle); + SetCheckboxValue(WIDX_SHOW_GUEST_PURCHASES_CHECKBOX, Config::Get().general.ShowGuestPurchases); + SetCheckboxValue(WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX, Config::Get().general.TransparentScreenshot); + SetCheckboxValue(WIDX_UPPER_CASE_BANNERS_CHECKBOX, Config::Get().general.UpperCaseBanners); static constexpr StringId _virtualFloorStyleStrings[] = { STR_VIRTUAL_FLOOR_STYLE_DISABLED, @@ -1044,36 +1049,38 @@ static Widget *window_options_page_widgets[] = { STR_VIRTUAL_FLOOR_STYLE_GLASSY, }; - widgets[WIDX_VIRTUAL_FLOOR].text = _virtualFloorStyleStrings[EnumValue(gConfigGeneral.VirtualFloorStyle)]; + widgets[WIDX_VIRTUAL_FLOOR].text = _virtualFloorStyleStrings[EnumValue(Config::Get().general.VirtualFloorStyle)]; - SetCheckboxValue(WIDX_ENABLE_LIGHT_FX_CHECKBOX, gConfigGeneral.EnableLightFx); - if (gConfigGeneral.DayNightCycle && gConfigGeneral.DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay) + SetCheckboxValue(WIDX_ENABLE_LIGHT_FX_CHECKBOX, Config::Get().general.EnableLightFx); + if (Config::Get().general.DayNightCycle + && Config::Get().general.DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay) { disabled_widgets &= ~(1uLL << WIDX_ENABLE_LIGHT_FX_CHECKBOX); } else { disabled_widgets |= (1uLL << WIDX_ENABLE_LIGHT_FX_CHECKBOX); - gConfigGeneral.EnableLightFx = false; + Config::Get().general.EnableLightFx = false; } - SetCheckboxValue(WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX, gConfigGeneral.EnableLightFxForVehicles); - if (gConfigGeneral.DayNightCycle && gConfigGeneral.DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay - && gConfigGeneral.EnableLightFx) + SetCheckboxValue(WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX, Config::Get().general.EnableLightFxForVehicles); + if (Config::Get().general.DayNightCycle + && Config::Get().general.DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay + && Config::Get().general.EnableLightFx) { disabled_widgets &= ~(1uLL << WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX); } else { disabled_widgets |= (1uLL << WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX); - gConfigGeneral.EnableLightFxForVehicles = false; + Config::Get().general.EnableLightFxForVehicles = false; } WidgetSetCheckboxValue( *this, WIDX_RENDER_WEATHER_EFFECTS_CHECKBOX, - gConfigGeneral.RenderWeatherEffects || gConfigGeneral.RenderWeatherGloom); - SetCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, gConfigGeneral.DisableLightningEffect); - if (!gConfigGeneral.RenderWeatherEffects && !gConfigGeneral.RenderWeatherGloom) + Config::Get().general.RenderWeatherEffects || Config::Get().general.RenderWeatherGloom); + SetCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, Config::Get().general.DisableLightningEffect); + if (!Config::Get().general.RenderWeatherEffects && !Config::Get().general.RenderWeatherGloom) { SetCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, true); disabled_widgets |= (1uLL << WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX); @@ -1101,7 +1108,7 @@ static Widget *window_options_page_widgets[] = { ShowDropdown(widget, 2); - Dropdown::SetChecked(gConfigGeneral.ShowHeightAsUnits ? 0 : 1, true); + Dropdown::SetChecked(Config::Get().general.ShowHeightAsUnits ? 0 : 1, true); break; case WIDX_CURRENCY_DROPDOWN: { @@ -1125,13 +1132,13 @@ static Widget *window_options_page_widgets[] = { ShowDropdown(widget, numItems); - if (gConfigGeneral.CurrencyFormat == CurrencyType::Custom) + if (Config::Get().general.CurrencyFormat == CurrencyType::Custom) { - Dropdown::SetChecked(EnumValue(gConfigGeneral.CurrencyFormat) + 1, true); + Dropdown::SetChecked(EnumValue(Config::Get().general.CurrencyFormat) + 1, true); } else { - Dropdown::SetChecked(EnumValue(gConfigGeneral.CurrencyFormat), true); + Dropdown::SetChecked(EnumValue(Config::Get().general.CurrencyFormat), true); } break; } @@ -1145,7 +1152,7 @@ static Widget *window_options_page_widgets[] = { ShowDropdown(widget, 3); - Dropdown::SetChecked(static_cast(gConfigGeneral.MeasurementFormat), true); + Dropdown::SetChecked(static_cast(Config::Get().general.MeasurementFormat), true); break; case WIDX_TEMPERATURE_DROPDOWN: gDropdownItems[0].Format = STR_DROPDOWN_MENU_LABEL; @@ -1155,7 +1162,7 @@ static Widget *window_options_page_widgets[] = { ShowDropdown(widget, 2); - Dropdown::SetChecked(static_cast(gConfigGeneral.TemperatureFormat), true); + Dropdown::SetChecked(static_cast(Config::Get().general.TemperatureFormat), true); break; case WIDX_LANGUAGE_DROPDOWN: for (size_t i = 1; i < LANGUAGE_COUNT; i++) @@ -1173,7 +1180,7 @@ static Widget *window_options_page_widgets[] = { gDropdownItems[i].Args = DateFormatStringIDs[i]; } ShowDropdown(widget, 4); - Dropdown::SetChecked(gConfigGeneral.DateFormat, true); + Dropdown::SetChecked(Config::Get().general.DateFormat, true); break; } } @@ -1184,38 +1191,38 @@ static Widget *window_options_page_widgets[] = { { case WIDX_HEIGHT_LABELS_DROPDOWN: // reset flag and set it to 1 if height as units is selected - gConfigGeneral.ShowHeightAsUnits = 0; + Config::Get().general.ShowHeightAsUnits = 0; if (dropdownIndex == 0) { - gConfigGeneral.ShowHeightAsUnits = 1; + Config::Get().general.ShowHeightAsUnits = 1; } - ConfigSaveDefault(); + Config::Save(); UpdateHeightMarkers(); break; case WIDX_CURRENCY_DROPDOWN: if (dropdownIndex == EnumValue(CurrencyType::Custom) + 1) { // Add 1 because the separator occupies a position - gConfigGeneral.CurrencyFormat = static_cast(dropdownIndex - 1); + Config::Get().general.CurrencyFormat = static_cast(dropdownIndex - 1); ContextOpenWindow(WindowClass::CustomCurrencyConfig); } else { - gConfigGeneral.CurrencyFormat = static_cast(dropdownIndex); + Config::Get().general.CurrencyFormat = static_cast(dropdownIndex); } - ConfigSaveDefault(); + Config::Save(); GfxInvalidateScreen(); break; case WIDX_DISTANCE_DROPDOWN: - gConfigGeneral.MeasurementFormat = static_cast(dropdownIndex); - ConfigSaveDefault(); + Config::Get().general.MeasurementFormat = static_cast(dropdownIndex); + Config::Save(); UpdateHeightMarkers(); break; case WIDX_TEMPERATURE_DROPDOWN: - if (dropdownIndex != static_cast(gConfigGeneral.TemperatureFormat)) + if (dropdownIndex != static_cast(Config::Get().general.TemperatureFormat)) { - gConfigGeneral.TemperatureFormat = static_cast(dropdownIndex); - ConfigSaveDefault(); + Config::Get().general.TemperatureFormat = static_cast(dropdownIndex); + Config::Save(); GfxInvalidateScreen(); } break; @@ -1238,18 +1245,18 @@ static Widget *window_options_page_widgets[] = { } else { - gConfigGeneral.Language = dropdownIndex + 1; - ConfigSaveDefault(); + Config::Get().general.Language = dropdownIndex + 1; + Config::Save(); GfxInvalidateScreen(); } } } break; case WIDX_DATE_FORMAT_DROPDOWN: - if (dropdownIndex != gConfigGeneral.DateFormat) + if (dropdownIndex != Config::Get().general.DateFormat) { - gConfigGeneral.DateFormat = static_cast(dropdownIndex); - ConfigSaveDefault(); + Config::Get().general.DateFormat = static_cast(dropdownIndex); + Config::Save(); GfxInvalidateScreen(); } break; @@ -1263,12 +1270,12 @@ static Widget *window_options_page_widgets[] = { ft.Add(LanguagesDescriptors[LocalisationService_GetCurrentLanguage()].native_name); // Currency: pounds, dollars, etc. (10 total) - widgets[WIDX_CURRENCY].text = CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)].stringId; + widgets[WIDX_CURRENCY].text = CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)].stringId; // Distance: metric / imperial / si { StringId stringId = STR_NONE; - switch (gConfigGeneral.MeasurementFormat) + switch (Config::Get().general.MeasurementFormat) { case MeasurementFormat::Imperial: stringId = STR_IMPERIAL; @@ -1284,14 +1291,15 @@ static Widget *window_options_page_widgets[] = { } // Date format - widgets[WIDX_DATE_FORMAT].text = DateFormatStringIDs[gConfigGeneral.DateFormat]; + widgets[WIDX_DATE_FORMAT].text = DateFormatStringIDs[Config::Get().general.DateFormat]; // Temperature: celsius/fahrenheit - widgets[WIDX_TEMPERATURE].text = gConfigGeneral.TemperatureFormat == TemperatureUnit::Fahrenheit ? STR_FAHRENHEIT - : STR_CELSIUS; + widgets[WIDX_TEMPERATURE].text = Config::Get().general.TemperatureFormat == TemperatureUnit::Fahrenheit + ? STR_FAHRENHEIT + : STR_CELSIUS; // Height: units/real values - widgets[WIDX_HEIGHT_LABELS].text = gConfigGeneral.ShowHeightAsUnits ? STR_HEIGHT_IN_UNITS : STR_REAL_VALUES; + widgets[WIDX_HEIGHT_LABELS].text = Config::Get().general.ShowHeightAsUnits ? STR_HEIGHT_IN_UNITS : STR_REAL_VALUES; } #pragma endregion @@ -1302,35 +1310,35 @@ static Widget *window_options_page_widgets[] = { switch (widgetIndex) { case WIDX_SOUND_CHECKBOX: - gConfigSound.SoundEnabled = !gConfigSound.SoundEnabled; - ConfigSaveDefault(); + Config::Get().sound.SoundEnabled = !Config::Get().sound.SoundEnabled; + Config::Save(); Invalidate(); break; case WIDX_MASTER_SOUND_CHECKBOX: - gConfigSound.MasterSoundEnabled = !gConfigSound.MasterSoundEnabled; - if (!gConfigSound.MasterSoundEnabled) + Config::Get().sound.MasterSoundEnabled = !Config::Get().sound.MasterSoundEnabled; + if (!Config::Get().sound.MasterSoundEnabled) OpenRCT2::Audio::Pause(); else OpenRCT2::Audio::Resume(); WindowInvalidateByClass(WindowClass::TopToolbar); - ConfigSaveDefault(); + Config::Save(); Invalidate(); break; case WIDX_MUSIC_CHECKBOX: - gConfigSound.RideMusicEnabled = !gConfigSound.RideMusicEnabled; - if (!gConfigSound.RideMusicEnabled) + Config::Get().sound.RideMusicEnabled = !Config::Get().sound.RideMusicEnabled; + if (!Config::Get().sound.RideMusicEnabled) { OpenRCT2::RideAudio::StopAllChannels(); } - ConfigSaveDefault(); + Config::Save(); Invalidate(); break; case WIDX_AUDIO_FOCUS_CHECKBOX: - gConfigSound.audio_focus = !gConfigSound.audio_focus; - ConfigSaveDefault(); + Config::Get().sound.audio_focus = !Config::Get().sound.audio_focus; + Config::Save(); Invalidate(); break; } @@ -1366,7 +1374,7 @@ static Widget *window_options_page_widgets[] = { if (theme.Kind == TitleMusicKind::RCT1 && !rct1MusicThemeIsAvailable) continue; - if (gConfigSound.TitleMusic == theme.Kind) + if (Config::Get().sound.TitleMusic == theme.Kind) checkedIndex = numItems; gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; @@ -1391,15 +1399,15 @@ static Widget *window_options_page_widgets[] = { if (dropdownIndex == 0) { audioContext->SetOutputDevice(""); - gConfigSound.Device = ""; + Config::Get().sound.Device = ""; } else { const auto& deviceName = GetDeviceName(dropdownIndex); audioContext->SetOutputDevice(deviceName); - gConfigSound.Device = deviceName; + Config::Get().sound.Device = deviceName; } - ConfigSaveDefault(); + Config::Save(); OpenRCT2::Audio::PlayTitleMusic(); } Invalidate(); @@ -1415,12 +1423,12 @@ static Widget *window_options_page_widgets[] = { dropdownIndex++; } - gConfigSound.TitleMusic = TitleThemeOptions[dropdownIndex].Kind; - ConfigSaveDefault(); + Config::Get().sound.TitleMusic = TitleThemeOptions[dropdownIndex].Kind; + Config::Save(); Invalidate(); OpenRCT2::Audio::StopTitleMusic(); - if (gConfigSound.TitleMusic != TitleMusicKind::None) + if (Config::Get().sound.TitleMusic != TitleMusicKind::None) { OpenRCT2::Audio::PlayTitleMusic(); } @@ -1434,30 +1442,30 @@ static Widget *window_options_page_widgets[] = { const auto& masterVolumeWidget = widgets[WIDX_MASTER_VOLUME]; const auto& masterVolumeScroll = scrolls[0]; uint8_t masterVolume = GetScrollPercentage(masterVolumeWidget, masterVolumeScroll); - if (masterVolume != gConfigSound.MasterVolume) + if (masterVolume != Config::Get().sound.MasterVolume) { - gConfigSound.MasterVolume = masterVolume; - ConfigSaveDefault(); + Config::Get().sound.MasterVolume = masterVolume; + Config::Save(); InvalidateWidget(WIDX_MASTER_VOLUME); } const auto& soundVolumeWidget = widgets[WIDX_MASTER_VOLUME]; const auto& soundVolumeScroll = scrolls[1]; uint8_t soundVolume = GetScrollPercentage(soundVolumeWidget, soundVolumeScroll); - if (soundVolume != gConfigSound.SoundVolume) + if (soundVolume != Config::Get().sound.SoundVolume) { - gConfigSound.SoundVolume = soundVolume; - ConfigSaveDefault(); + Config::Get().sound.SoundVolume = soundVolume; + Config::Save(); InvalidateWidget(WIDX_SOUND_VOLUME); } const auto& musicVolumeWidget = widgets[WIDX_MASTER_VOLUME]; const auto& musicVolumeScroll = scrolls[2]; uint8_t rideMusicVolume = GetScrollPercentage(musicVolumeWidget, musicVolumeScroll); - if (rideMusicVolume != gConfigSound.AudioFocus) + if (rideMusicVolume != Config::Get().sound.AudioFocus) { - gConfigSound.AudioFocus = rideMusicVolume; - ConfigSaveDefault(); + Config::Get().sound.AudioFocus = rideMusicVolume; + Config::Save(); InvalidateWidget(WIDX_MUSIC_VOLUME); } } @@ -1470,7 +1478,7 @@ static Widget *window_options_page_widgets[] = { StringId GetTitleMusicName() const { auto theme = std::find_if(std::begin(TitleThemeOptions), std::end(TitleThemeOptions), [](auto&& option) { - return gConfigSound.TitleMusic == option.Kind; + return Config::Get().sound.TitleMusic == option.Kind; }); if (theme != std::end(TitleThemeOptions)) return theme->Name; @@ -1508,25 +1516,33 @@ static Widget *window_options_page_widgets[] = { widgets[WIDX_TITLE_MUSIC].text = GetTitleMusicName(); - SetCheckboxValue(WIDX_SOUND_CHECKBOX, gConfigSound.SoundEnabled); - SetCheckboxValue(WIDX_MASTER_SOUND_CHECKBOX, gConfigSound.MasterSoundEnabled); - SetCheckboxValue(WIDX_MUSIC_CHECKBOX, gConfigSound.RideMusicEnabled); - SetCheckboxValue(WIDX_AUDIO_FOCUS_CHECKBOX, gConfigSound.audio_focus); - WidgetSetEnabled(*this, WIDX_SOUND_CHECKBOX, gConfigSound.MasterSoundEnabled); - WidgetSetEnabled(*this, WIDX_MUSIC_CHECKBOX, gConfigSound.MasterSoundEnabled); + SetCheckboxValue(WIDX_SOUND_CHECKBOX, Config::Get().sound.SoundEnabled); + SetCheckboxValue(WIDX_MASTER_SOUND_CHECKBOX, Config::Get().sound.MasterSoundEnabled); + SetCheckboxValue(WIDX_MUSIC_CHECKBOX, Config::Get().sound.RideMusicEnabled); + SetCheckboxValue(WIDX_AUDIO_FOCUS_CHECKBOX, Config::Get().sound.audio_focus); + WidgetSetEnabled(*this, WIDX_SOUND_CHECKBOX, Config::Get().sound.MasterSoundEnabled); + WidgetSetEnabled(*this, WIDX_MUSIC_CHECKBOX, Config::Get().sound.MasterSoundEnabled); // Initialize only on first frame, otherwise the scrollbars won't be able to be modified if (frame_no == 0) { - InitializeScrollPosition(WIDX_MASTER_VOLUME, 0, gConfigSound.MasterVolume); - InitializeScrollPosition(WIDX_SOUND_VOLUME, 1, gConfigSound.SoundVolume); - InitializeScrollPosition(WIDX_MUSIC_VOLUME, 2, gConfigSound.AudioFocus); + InitializeScrollPosition(WIDX_MASTER_VOLUME, 0, Config::Get().sound.MasterVolume); + InitializeScrollPosition(WIDX_SOUND_VOLUME, 1, Config::Get().sound.SoundVolume); + InitializeScrollPosition(WIDX_MUSIC_VOLUME, 2, Config::Get().sound.AudioFocus); } } #pragma endregion #pragma region Controls tab events + void ToggleToolbarSetting(bool& setting) + { + setting ^= true; + Config::Save(); + Invalidate(); + WindowInvalidateByClass(WindowClass::TopToolbar); + } + void ControlsMouseUp(WidgetIndex widgetIndex) { switch (widgetIndex) @@ -1535,72 +1551,68 @@ static Widget *window_options_page_widgets[] = { ContextOpenWindow(WindowClass::KeyboardShortcutList); break; case WIDX_SCREEN_EDGE_SCROLLING: - gConfigGeneral.EdgeScrolling ^= 1; - ConfigSaveDefault(); + Config::Get().general.EdgeScrolling ^= 1; + Config::Save(); Invalidate(); break; case WIDX_TRAP_CURSOR: - gConfigGeneral.TrapCursor ^= 1; - ConfigSaveDefault(); - ContextSetCursorTrap(gConfigGeneral.TrapCursor); + Config::Get().general.TrapCursor ^= 1; + Config::Save(); + ContextSetCursorTrap(Config::Get().general.TrapCursor); Invalidate(); break; case WIDX_ZOOM_TO_CURSOR: - gConfigGeneral.ZoomToCursor ^= 1; - ConfigSaveDefault(); + Config::Get().general.ZoomToCursor ^= 1; + Config::Save(); Invalidate(); break; + case WIDX_TOOLBAR_BUTTONS_CENTRED: + ToggleToolbarSetting(Config::Get().interface.ToolbarButtonsCentred); + break; case WIDX_TOOLBAR_SHOW_FINANCES: - gConfigInterface.ToolbarShowFinances ^= 1; - ConfigSaveDefault(); - Invalidate(); - WindowInvalidateByClass(WindowClass::TopToolbar); + ToggleToolbarSetting(Config::Get().interface.ToolbarShowFinances); break; case WIDX_TOOLBAR_SHOW_RESEARCH: - gConfigInterface.ToolbarShowResearch ^= 1; - ConfigSaveDefault(); - Invalidate(); - WindowInvalidateByClass(WindowClass::TopToolbar); + ToggleToolbarSetting(Config::Get().interface.ToolbarShowResearch); break; case WIDX_TOOLBAR_SHOW_CHEATS: - gConfigInterface.ToolbarShowCheats ^= 1; - ConfigSaveDefault(); - Invalidate(); - WindowInvalidateByClass(WindowClass::TopToolbar); + ToggleToolbarSetting(Config::Get().interface.ToolbarShowCheats); break; case WIDX_TOOLBAR_SHOW_NEWS: - gConfigInterface.ToolbarShowNews ^= 1; - ConfigSaveDefault(); - Invalidate(); - WindowInvalidateByClass(WindowClass::TopToolbar); + ToggleToolbarSetting(Config::Get().interface.ToolbarShowNews); break; case WIDX_TOOLBAR_SHOW_MUTE: - gConfigInterface.ToolbarShowMute ^= 1; - ConfigSaveDefault(); - Invalidate(); - WindowInvalidateByClass(WindowClass::TopToolbar); + ToggleToolbarSetting(Config::Get().interface.ToolbarShowMute); break; case WIDX_TOOLBAR_SHOW_CHAT: - gConfigInterface.ToolbarShowChat ^= 1; - ConfigSaveDefault(); - Invalidate(); - WindowInvalidateByClass(WindowClass::TopToolbar); + ToggleToolbarSetting(Config::Get().interface.ToolbarShowChat); break; case WIDX_TOOLBAR_SHOW_ZOOM: - gConfigInterface.ToolbarShowZoom ^= 1; - ConfigSaveDefault(); - Invalidate(); - WindowInvalidateByClass(WindowClass::TopToolbar); + ToggleToolbarSetting(Config::Get().interface.ToolbarShowZoom); break; case WIDX_WINDOW_BUTTONS_ON_THE_LEFT: - gConfigInterface.WindowButtonsOnTheLeft ^= 1; - ConfigSaveDefault(); + Config::Get().interface.WindowButtonsOnTheLeft ^= 1; + Config::Save(); + Invalidate(); + WindowInvalidateAll(); + break; + case WIDX_ENLARGED_UI: + Config::Get().interface.EnlargedUi ^= 1; + if (Config::Get().interface.EnlargedUi == false) + Config::Get().interface.TouchEnhancements = false; + Config::Save(); + Invalidate(); + WindowInvalidateAll(); + break; + case WIDX_TOUCH_ENHANCEMENTS: + Config::Get().interface.TouchEnhancements ^= 1; + Config::Save(); Invalidate(); WindowInvalidateAll(); break; case WIDX_INVERT_DRAG: - gConfigGeneral.InvertViewportDrag ^= 1; - ConfigSaveDefault(); + Config::Get().general.InvertViewportDrag ^= 1; + Config::Save(); Invalidate(); break; case WIDX_THEMES_BUTTON: @@ -1644,25 +1656,30 @@ static Widget *window_options_page_widgets[] = { { ThemeManagerSetActiveAvailableTheme(dropdownIndex); } - ConfigSaveDefault(); + Config::Save(); break; } } void ControlsPrepareDraw() { - SetCheckboxValue(WIDX_SCREEN_EDGE_SCROLLING, gConfigGeneral.EdgeScrolling); - SetCheckboxValue(WIDX_TRAP_CURSOR, gConfigGeneral.TrapCursor); - SetCheckboxValue(WIDX_INVERT_DRAG, gConfigGeneral.InvertViewportDrag); - SetCheckboxValue(WIDX_ZOOM_TO_CURSOR, gConfigGeneral.ZoomToCursor); - SetCheckboxValue(WIDX_TOOLBAR_SHOW_FINANCES, gConfigInterface.ToolbarShowFinances); - SetCheckboxValue(WIDX_TOOLBAR_SHOW_RESEARCH, gConfigInterface.ToolbarShowResearch); - SetCheckboxValue(WIDX_TOOLBAR_SHOW_CHEATS, gConfigInterface.ToolbarShowCheats); - SetCheckboxValue(WIDX_TOOLBAR_SHOW_NEWS, gConfigInterface.ToolbarShowNews); - SetCheckboxValue(WIDX_TOOLBAR_SHOW_MUTE, gConfigInterface.ToolbarShowMute); - SetCheckboxValue(WIDX_TOOLBAR_SHOW_CHAT, gConfigInterface.ToolbarShowChat); - SetCheckboxValue(WIDX_TOOLBAR_SHOW_ZOOM, gConfigInterface.ToolbarShowZoom); - SetCheckboxValue(WIDX_WINDOW_BUTTONS_ON_THE_LEFT, gConfigInterface.WindowButtonsOnTheLeft); + SetCheckboxValue(WIDX_SCREEN_EDGE_SCROLLING, Config::Get().general.EdgeScrolling); + SetCheckboxValue(WIDX_TRAP_CURSOR, Config::Get().general.TrapCursor); + SetCheckboxValue(WIDX_INVERT_DRAG, Config::Get().general.InvertViewportDrag); + SetCheckboxValue(WIDX_ZOOM_TO_CURSOR, Config::Get().general.ZoomToCursor); + SetCheckboxValue(WIDX_TOOLBAR_BUTTONS_CENTRED, Config::Get().interface.ToolbarButtonsCentred); + SetCheckboxValue(WIDX_TOOLBAR_SHOW_FINANCES, Config::Get().interface.ToolbarShowFinances); + SetCheckboxValue(WIDX_TOOLBAR_SHOW_RESEARCH, Config::Get().interface.ToolbarShowResearch); + SetCheckboxValue(WIDX_TOOLBAR_SHOW_CHEATS, Config::Get().interface.ToolbarShowCheats); + SetCheckboxValue(WIDX_TOOLBAR_SHOW_NEWS, Config::Get().interface.ToolbarShowNews); + SetCheckboxValue(WIDX_TOOLBAR_SHOW_MUTE, Config::Get().interface.ToolbarShowMute); + SetCheckboxValue(WIDX_TOOLBAR_SHOW_CHAT, Config::Get().interface.ToolbarShowChat); + SetCheckboxValue(WIDX_TOOLBAR_SHOW_ZOOM, Config::Get().interface.ToolbarShowZoom); + SetCheckboxValue(WIDX_WINDOW_BUTTONS_ON_THE_LEFT, Config::Get().interface.WindowButtonsOnTheLeft); + SetCheckboxValue(WIDX_ENLARGED_UI, Config::Get().interface.EnlargedUi); + SetCheckboxValue(WIDX_TOUCH_ENHANCEMENTS, Config::Get().interface.TouchEnhancements); + + WidgetSetEnabled(*this, WIDX_TOUCH_ENHANCEMENTS, Config::Get().interface.EnlargedUi); size_t activeAvailableThemeIndex = ThemeManagerGetAvailableThemeIndex(); const utf8* activeThemeName = ThemeManagerGetAvailableThemeName(activeAvailableThemeIndex); @@ -1678,37 +1695,37 @@ static Widget *window_options_page_widgets[] = { switch (widgetIndex) { case WIDX_REAL_NAME_CHECKBOX: - gConfigGeneral.ShowRealNamesOfGuests ^= 1; - ConfigSaveDefault(); + Config::Get().general.ShowRealNamesOfGuests ^= 1; + Config::Save(); Invalidate(); - PeepUpdateNames(gConfigGeneral.ShowRealNamesOfGuests); + PeepUpdateNames(Config::Get().general.ShowRealNamesOfGuests); break; case WIDX_AUTO_STAFF_PLACEMENT: - gConfigGeneral.AutoStaffPlacement ^= 1; - ConfigSaveDefault(); + Config::Get().general.AutoStaffPlacement ^= 1; + Config::Save(); Invalidate(); break; case WIDX_SCENARIO_UNLOCKING: - gConfigGeneral.ScenarioUnlockingEnabled ^= 1; - ConfigSaveDefault(); + Config::Get().general.ScenarioUnlockingEnabled ^= 1; + Config::Save(); WindowCloseByClass(WindowClass::ScenarioSelect); break; case WIDX_AUTO_OPEN_SHOPS: - gConfigGeneral.AutoOpenShops = !gConfigGeneral.AutoOpenShops; - ConfigSaveDefault(); + Config::Get().general.AutoOpenShops = !Config::Get().general.AutoOpenShops; + Config::Save(); Invalidate(); break; case WIDX_ALLOW_EARLY_COMPLETION: - gConfigGeneral.AllowEarlyCompletion ^= 1; + Config::Get().general.AllowEarlyCompletion ^= 1; // Only the server can control this setting and needs to send the // current value of allow_early_completion to all clients if (NetworkGetMode() == NETWORK_MODE_SERVER) { auto setAllowEarlyCompletionAction = ScenarioSetSettingAction( - ScenarioSetSetting::AllowEarlyCompletion, gConfigGeneral.AllowEarlyCompletion); + ScenarioSetSetting::AllowEarlyCompletion, Config::Get().general.AllowEarlyCompletion); GameActions::Execute(&setAllowEarlyCompletionAction); } - ConfigSaveDefault(); + Config::Save(); Invalidate(); break; } @@ -1739,8 +1756,9 @@ static Widget *window_options_page_widgets[] = { { windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], Dropdown::Flag::StayOpen, numItems); - auto selectedIndex = gConfigInterface.RandomTitleSequence ? numItems - 1 - : static_cast(TitleGetCurrentSequence()); + auto selectedIndex = Config::Get().interface.RandomTitleSequence + ? numItems - 1 + : static_cast(TitleGetCurrentSequence()); Dropdown::SetChecked(selectedIndex, true); break; } @@ -1757,7 +1775,7 @@ static Widget *window_options_page_widgets[] = { { windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, numItems, widget->width() - 3); - Dropdown::SetChecked(gConfigGeneral.ScenarioSelectMode, true); + Dropdown::SetChecked(Config::Get().general.ScenarioSelectMode, true); break; } case WIDX_DEFAULT_INSPECTION_INTERVAL_DROPDOWN: @@ -1768,7 +1786,7 @@ static Widget *window_options_page_widgets[] = { } ShowDropdown(widget, 7); - Dropdown::SetChecked(gConfigGeneral.DefaultInspectionInterval, true); + Dropdown::SetChecked(Config::Get().general.DefaultInspectionInterval, true); break; } } @@ -1782,33 +1800,33 @@ static Widget *window_options_page_widgets[] = { auto numItems = static_cast(TitleSequenceManagerGetCount()); if (dropdownIndex < numItems && dropdownIndex != static_cast(TitleGetCurrentSequence())) { - gConfigInterface.RandomTitleSequence = false; + Config::Get().interface.RandomTitleSequence = false; TitleSequenceChangePreset(static_cast(dropdownIndex)); - ConfigSaveDefault(); + Config::Save(); Invalidate(); } else if (dropdownIndex == numItems + 1) { - gConfigInterface.RandomTitleSequence = true; - ConfigSaveDefault(); + Config::Get().interface.RandomTitleSequence = true; + Config::Save(); Invalidate(); } break; } case WIDX_DEFAULT_INSPECTION_INTERVAL_DROPDOWN: - if (dropdownIndex != gConfigGeneral.DefaultInspectionInterval) + if (dropdownIndex != Config::Get().general.DefaultInspectionInterval) { - gConfigGeneral.DefaultInspectionInterval = static_cast(dropdownIndex); - ConfigSaveDefault(); + Config::Get().general.DefaultInspectionInterval = static_cast(dropdownIndex); + Config::Save(); Invalidate(); } break; case WIDX_SCENARIO_GROUPING_DROPDOWN: - if (dropdownIndex != gConfigGeneral.ScenarioSelectMode) + if (dropdownIndex != Config::Get().general.ScenarioSelectMode) { - gConfigGeneral.ScenarioSelectMode = dropdownIndex; - gConfigInterface.ScenarioselectLastTab = 0; - ConfigSaveDefault(); + Config::Get().general.ScenarioSelectMode = dropdownIndex; + Config::Get().interface.ScenarioselectLastTab = 0; + Config::Save(); Invalidate(); WindowCloseByClass(WindowClass::ScenarioSelect); } @@ -1819,7 +1837,7 @@ static Widget *window_options_page_widgets[] = { void MiscPrepareDraw() { auto ft = Formatter::Common(); - if (gConfigInterface.RandomTitleSequence) + if (Config::Get().interface.RandomTitleSequence) { ft.Add(STR_TITLE_SEQUENCE_RANDOM); } @@ -1846,19 +1864,19 @@ static Widget *window_options_page_widgets[] = { } } - SetCheckboxValue(WIDX_REAL_NAME_CHECKBOX, gConfigGeneral.ShowRealNamesOfGuests); - SetCheckboxValue(WIDX_AUTO_STAFF_PLACEMENT, gConfigGeneral.AutoStaffPlacement); - SetCheckboxValue(WIDX_AUTO_OPEN_SHOPS, gConfigGeneral.AutoOpenShops); - SetCheckboxValue(WIDX_ALLOW_EARLY_COMPLETION, gConfigGeneral.AllowEarlyCompletion); + SetCheckboxValue(WIDX_REAL_NAME_CHECKBOX, Config::Get().general.ShowRealNamesOfGuests); + SetCheckboxValue(WIDX_AUTO_STAFF_PLACEMENT, Config::Get().general.AutoStaffPlacement); + SetCheckboxValue(WIDX_AUTO_OPEN_SHOPS, Config::Get().general.AutoOpenShops); + SetCheckboxValue(WIDX_ALLOW_EARLY_COMPLETION, Config::Get().general.AllowEarlyCompletion); - if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_DIFFICULTY) + if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_DIFFICULTY) widgets[WIDX_SCENARIO_GROUPING].text = STR_OPTIONS_SCENARIO_DIFFICULTY; else widgets[WIDX_SCENARIO_GROUPING].text = STR_OPTIONS_SCENARIO_ORIGIN; - SetCheckboxValue(WIDX_SCENARIO_UNLOCKING, gConfigGeneral.ScenarioUnlockingEnabled); + SetCheckboxValue(WIDX_SCENARIO_UNLOCKING, Config::Get().general.ScenarioUnlockingEnabled); - if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) { disabled_widgets &= ~(1uLL << WIDX_SCENARIO_UNLOCKING); } @@ -1867,8 +1885,8 @@ static Widget *window_options_page_widgets[] = { disabled_widgets |= (1uLL << WIDX_SCENARIO_UNLOCKING); } - widgets[WIDX_DEFAULT_INSPECTION_INTERVAL].text = RideInspectionIntervalNames[gConfigGeneral - .DefaultInspectionInterval]; + widgets[WIDX_DEFAULT_INSPECTION_INTERVAL].text = RideInspectionIntervalNames + [Config::Get().general.DefaultInspectionInterval]; } #pragma endregion @@ -1879,23 +1897,23 @@ static Widget *window_options_page_widgets[] = { switch (widgetIndex) { case WIDX_DEBUGGING_TOOLS: - gConfigGeneral.DebuggingTools ^= 1; - ConfigSaveDefault(); + Config::Get().general.DebuggingTools ^= 1; + Config::Save(); GfxInvalidateScreen(); break; case WIDX_SAVE_PLUGIN_DATA_CHECKBOX: - gConfigGeneral.SavePluginData ^= 1; - ConfigSaveDefault(); + Config::Get().general.SavePluginData ^= 1; + Config::Save(); Invalidate(); break; case WIDX_STAY_CONNECTED_AFTER_DESYNC: - gConfigNetwork.StayConnected = !gConfigNetwork.StayConnected; - ConfigSaveDefault(); + Config::Get().network.StayConnected = !Config::Get().network.StayConnected; + Config::Save(); Invalidate(); break; case WIDX_ALWAYS_NATIVE_LOADSAVE: - gConfigGeneral.UseNativeBrowseDialog = !gConfigGeneral.UseNativeBrowseDialog; - ConfigSaveDefault(); + Config::Get().general.UseNativeBrowseDialog = !Config::Get().general.UseNativeBrowseDialog; + Config::Save(); Invalidate(); break; case WIDX_PATH_TO_RCT1_BUTTON: @@ -1911,9 +1929,9 @@ static Widget *window_options_page_widgets[] = { { if (CsgAtLocationIsUsable(rct1path)) { - gConfigGeneral.RCT1Path = std::move(rct1path); - gConfigInterface.ScenarioselectLastTab = 0; - ConfigSaveDefault(); + Config::Get().general.RCT1Path = std::move(rct1path); + Config::Get().interface.ScenarioselectLastTab = 0; + Config::Save(); ContextShowError(STR_RESTART_REQUIRED, STR_NONE, {}); } else @@ -1935,10 +1953,10 @@ static Widget *window_options_page_widgets[] = { break; } case WIDX_PATH_TO_RCT1_CLEAR: - if (!gConfigGeneral.RCT1Path.empty()) + if (!Config::Get().general.RCT1Path.empty()) { - gConfigGeneral.RCT1Path.clear(); - ConfigSaveDefault(); + Config::Get().general.RCT1Path.clear(); + Config::Save(); } Invalidate(); break; @@ -1962,20 +1980,20 @@ static Widget *window_options_page_widgets[] = { } ShowDropdown(widget, AUTOSAVE_NEVER + 1); - Dropdown::SetChecked(gConfigGeneral.AutosaveFrequency, true); + Dropdown::SetChecked(Config::Get().general.AutosaveFrequency, true); break; case WIDX_AUTOSAVE_AMOUNT_UP: - gConfigGeneral.AutosaveAmount += 1; - ConfigSaveDefault(); + Config::Get().general.AutosaveAmount += 1; + Config::Save(); InvalidateWidget(WIDX_AUTOSAVE_FREQUENCY); InvalidateWidget(WIDX_AUTOSAVE_FREQUENCY_DROPDOWN); InvalidateWidget(WIDX_AUTOSAVE_AMOUNT); break; case WIDX_AUTOSAVE_AMOUNT_DOWN: - if (gConfigGeneral.AutosaveAmount > 1) + if (Config::Get().general.AutosaveAmount > 1) { - gConfigGeneral.AutosaveAmount -= 1; - ConfigSaveDefault(); + Config::Get().general.AutosaveAmount -= 1; + Config::Save(); InvalidateWidget(WIDX_AUTOSAVE_FREQUENCY); InvalidateWidget(WIDX_AUTOSAVE_FREQUENCY_DROPDOWN); InvalidateWidget(WIDX_AUTOSAVE_AMOUNT); @@ -1988,10 +2006,10 @@ static Widget *window_options_page_widgets[] = { switch (widgetIndex) { case WIDX_AUTOSAVE_FREQUENCY_DROPDOWN: - if (dropdownIndex != gConfigGeneral.AutosaveFrequency) + if (dropdownIndex != Config::Get().general.AutosaveFrequency) { - gConfigGeneral.AutosaveFrequency = static_cast(dropdownIndex); - ConfigSaveDefault(); + Config::Get().general.AutosaveFrequency = static_cast(dropdownIndex); + Config::Save(); Invalidate(); } break; @@ -2000,23 +2018,23 @@ static Widget *window_options_page_widgets[] = { void AdvancedPrepareDraw() { - SetCheckboxValue(WIDX_DEBUGGING_TOOLS, gConfigGeneral.DebuggingTools); - SetCheckboxValue(WIDX_SAVE_PLUGIN_DATA_CHECKBOX, gConfigGeneral.SavePluginData); - SetCheckboxValue(WIDX_STAY_CONNECTED_AFTER_DESYNC, gConfigNetwork.StayConnected); - SetCheckboxValue(WIDX_ALWAYS_NATIVE_LOADSAVE, gConfigGeneral.UseNativeBrowseDialog); - widgets[WIDX_AUTOSAVE_FREQUENCY].text = AutosaveNames[gConfigGeneral.AutosaveFrequency]; + SetCheckboxValue(WIDX_DEBUGGING_TOOLS, Config::Get().general.DebuggingTools); + SetCheckboxValue(WIDX_SAVE_PLUGIN_DATA_CHECKBOX, Config::Get().general.SavePluginData); + SetCheckboxValue(WIDX_STAY_CONNECTED_AFTER_DESYNC, Config::Get().network.StayConnected); + SetCheckboxValue(WIDX_ALWAYS_NATIVE_LOADSAVE, Config::Get().general.UseNativeBrowseDialog); + widgets[WIDX_AUTOSAVE_FREQUENCY].text = AutosaveNames[Config::Get().general.AutosaveFrequency]; } void AdvancedDraw(DrawPixelInfo& dpi) { auto ft = Formatter(); - ft.Add(static_cast(gConfigGeneral.AutosaveAmount)); + ft.Add(static_cast(Config::Get().general.AutosaveAmount)); DrawTextBasic( dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_AUTOSAVE_AMOUNT].left + 1, widgets[WIDX_AUTOSAVE_AMOUNT].top + 1 }, STR_WINDOW_COLOUR_2_COMMA32, ft, { colours[1] }); - const auto normalisedPath = Platform::StrDecompToPrecomp(gConfigGeneral.RCT1Path); + const auto normalisedPath = Platform::StrDecompToPrecomp(Config::Get().general.RCT1Path); ft = Formatter(); ft.Add(normalisedPath.c_str()); @@ -2035,14 +2053,14 @@ static Widget *window_options_page_widgets[] = { { if (widgetIndex == WIDX_PATH_TO_RCT1_BUTTON) { - if (gConfigGeneral.RCT1Path.empty()) + if (Config::Get().general.RCT1Path.empty()) { // No tooltip if the path is empty return { STR_NONE, {} }; } auto ft = Formatter(); - ft.Add(gConfigGeneral.RCT1Path.c_str()); + ft.Add(Config::Get().general.RCT1Path.c_str()); return { fallback, ft }; } return { fallback, {} }; @@ -2111,20 +2129,20 @@ static Widget *window_options_page_widgets[] = { else { // Get the window background colour - uint8_t window_colour = NOT_TRANSLUCENT(colours[widget->colour]); + auto windowColour = colours[widget->colour].colour; // Draw greyed out (light border bottom right shadow) GfxDrawSpriteSolid( - dpi, ImageId(spriteIndex), screenCoords + ScreenCoordsXY{ 1, 1 }, ColourMapA[window_colour].lighter); + dpi, ImageId(spriteIndex), screenCoords + ScreenCoordsXY{ 1, 1 }, ColourMapA[windowColour].lighter); // Draw greyed out (dark) - GfxDrawSpriteSolid(dpi, ImageId(spriteIndex), screenCoords, ColourMapA[window_colour].mid_light); + GfxDrawSpriteSolid(dpi, ImageId(spriteIndex), screenCoords, ColourMapA[windowColour].mid_light); } } void UpdateHeightMarkers() { - ConfigSaveDefault(); + Config::Save(); GfxInvalidateScreen(); } diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index 7c8d7a554b..0e122b2231 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -427,7 +427,7 @@ static constexpr WindowParkAward _parkAwards[] = { { auto& park = OpenRCT2::GetGameState().Park; WindowTextInputRawOpen( - this, WIDX_RENAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, {}, park.Name.c_str(), USER_STRING_MAX_LENGTH); + this, WIDX_RENAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, {}, park.Name.c_str(), kUserStringMaxLength); break; } case WIDX_CLOSE_LIGHT: @@ -632,7 +632,7 @@ static constexpr WindowParkAward _parkAwards[] = { int32_t viewportFlags{}; if (viewport == nullptr) { - viewportFlags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; + viewportFlags = Config::Get().general.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; } else { @@ -853,11 +853,10 @@ static constexpr WindowParkAward _parkAwards[] = { } case WIDX_PRICE: { - utf8 _moneyInputText[MONEY_STRING_MAXLENGTH] = {}; - MoneyToString(Park::GetEntranceFee(), _moneyInputText, MONEY_STRING_MAXLENGTH, false); + utf8 _moneyInputText[kMoneyStringMaxlength] = {}; + MoneyToString(Park::GetEntranceFee(), _moneyInputText, kMoneyStringMaxlength, false); WindowTextInputRawOpen( - this, WIDX_PRICE, STR_ENTER_NEW_VALUE, STR_ENTER_NEW_VALUE, {}, _moneyInputText, - MONEY_STRING_MAXLENGTH); + this, WIDX_PRICE, STR_ENTER_NEW_VALUE, STR_ENTER_NEW_VALUE, {}, _moneyInputText, kMoneyStringMaxlength); } } } @@ -920,10 +919,14 @@ static constexpr WindowParkAward _parkAwards[] = { DrawTextBasic(dpi, screenCoords, STR_INCOME_FROM_ADMISSIONS, ft); money64 parkEntranceFee = Park::GetEntranceFee(); - auto stringId = parkEntranceFee == 0 ? STR_FREE : STR_BOTTOM_TOOLBAR_CASH; - screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PRICE].left + 1, widgets[WIDX_PRICE].top + 1 }; ft = Formatter(); ft.Add(parkEntranceFee); + + StringId stringId = STR_BOTTOM_TOOLBAR_CASH; + if (parkEntranceFee == 0) + stringId = STR_FREE; + + screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PRICE].left + 1, widgets[WIDX_PRICE].top + 1 }; DrawTextBasic(dpi, screenCoords, stringId, ft, { colours[1] }); } #pragma endregion @@ -984,7 +987,7 @@ static constexpr WindowParkAward _parkAwards[] = { // Draw park size auto parkSize = gameState.Park.Size * 10; auto stringIndex = STR_PARK_SIZE_METRIC_LABEL; - if (gConfigGeneral.MeasurementFormat == MeasurementFormat::Imperial) + if (Config::Get().general.MeasurementFormat == MeasurementFormat::Imperial) { stringIndex = STR_PARK_SIZE_IMPERIAL_LABEL; parkSize = SquaredMetresToSquaredFeet(parkSize); diff --git a/src/openrct2-ui/windows/Player.cpp b/src/openrct2-ui/windows/Player.cpp index eed24b5dca..325411471e 100644 --- a/src/openrct2-ui/windows/Player.cpp +++ b/src/openrct2-ui/windows/Player.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -456,7 +456,7 @@ static Widget *window_player_page_widgets[] = { DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); char ping[64]; snprintf(ping, 64, "%d ms", NetworkGetPlayerPing(player)); - GfxDrawString(dpi, screenCoords + ScreenCoordsXY(30, 0), ping, { colours[2] }); + DrawText(dpi, screenCoords + ScreenCoordsXY(30, 0), { colours[2] }, ping); // Draw last action screenCoords = windowPos + ScreenCoordsXY{ width / 2, height - 13 }; diff --git a/src/openrct2-ui/windows/ProgressWindow.cpp b/src/openrct2-ui/windows/ProgressWindow.cpp new file mode 100644 index 0000000000..00f6aebfa2 --- /dev/null +++ b/src/openrct2-ui/windows/ProgressWindow.cpp @@ -0,0 +1,277 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +namespace OpenRCT2::Ui::Windows +{ + enum ProgressWindowWidgetIdx + { + WIDX_BACKGROUND, + WIDX_TITLE, + WIDX_CLOSE, + }; + + static constexpr int32_t kWindowWidth = 400; + static constexpr int32_t kWindowHeight = 90; + + // clang-format off + static 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 + kWidgetsEnd, + }; + + struct LoaderVehicleStyle + { + ImageId supports; + ImageId track; + ImageId vehicle; + }; + + static std::array kVehicleStyles = { { + { + ImageId{SPR_G2_LOADER_HYBRID_SUPPORTS, COLOUR_LIGHT_ORANGE, COLOUR_DARK_BROWN }, + ImageId{SPR_G2_LOADER_HYBRID_TRACK, COLOUR_LIGHT_ORANGE, COLOUR_LIGHT_ORANGE }, + ImageId{SPR_G2_LOADER_HYBRID_VEHICLE, COLOUR_OLIVE_GREEN, COLOUR_OLIVE_GREEN, COLOUR_BRIGHT_RED } + }, + { + ImageId{SPR_G2_LOADER_STEEL_SUPPORTS, COLOUR_LIGHT_BROWN, COLOUR_BLACK }, + ImageId{SPR_G2_LOADER_STEEL_TRACK, COLOUR_LIGHT_BROWN, COLOUR_LIGHT_BROWN }, + ImageId{SPR_G2_LOADER_STEEL_VEHICLE, COLOUR_LIGHT_BLUE, COLOUR_WHITE, COLOUR_LIGHT_BLUE } + }, + { + ImageId{SPR_G2_LOADER_WOODEN_SUPPORTS, COLOUR_BLACK, COLOUR_WHITE }, + ImageId{SPR_G2_LOADER_WOODEN_TRACK, COLOUR_BORDEAUX_RED, COLOUR_BLACK }, + ImageId{SPR_G2_LOADER_WOODEN_VEHICLE, COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_SATURATED_BROWN} + }, + } }; + + static uint8_t nextStyle = 0; + + // clang-format on + class ProgressWindow final : public Window + { + private: + close_callback _onClose = nullptr; + + StringId _progressFormat; + std::string _progressTitle; + std::string _currentCaption; + + uint32_t _currentProgress; + uint32_t _totalCount; + int8_t style = -1; + + public: + void OnOpen() override + { + widgets = kProgressWindowWidgets; + WindowInitScrollWidgets(*this); + + frame_no = 0; + min_width = kWindowWidth; + min_height = kWindowHeight; + max_width = min_width; + max_height = min_height; + + ApplyStyle(); + } + + void OnClose() override + { + if (_onClose != nullptr) + { + _onClose(); + } + } + + void OnMouseUp(WidgetIndex widgetIndex) override + { + switch (widgetIndex) + { + case WIDX_CLOSE: + Close(); + break; + } + } + + void OnUpdate() override + { + Invalidate(); + } + + void OnPrepareDraw() override + { + if (_onClose != nullptr) + widgets[WIDX_CLOSE].type = WindowWidgetType::Button; + else + widgets[WIDX_CLOSE].type = WindowWidgetType::Empty; + + ResizeFrame(); + PrepareCaption(); + } + + void ApplyStyle() + { + if (style >= 0) + { + // Take the next available style, rotating + style = nextStyle++; + nextStyle %= std::size(kVehicleStyles); + } + else + { + // Pick a random style to start off with + std::random_device r; + auto upperBound = static_cast(std::size(kVehicleStyles)) - 1; + std::uniform_int_distribution uniform_dist(0, upperBound); + std::default_random_engine e(r()); + style = static_cast(uniform_dist(e)); + } + } + + void PrepareCaption() + { + if (_totalCount > 0) + { + auto ft = Formatter(); + ft.Add(_progressTitle.c_str()); + ft.Add(_currentProgress); + ft.Add(_totalCount); + + _currentCaption = FormatStringIDLegacy(_progressFormat, ft.Data()); + } + else + _currentCaption = _progressTitle; + + // Set window title + { + auto ft = Formatter::Common(); + ft.Add(STR_STRING); + ft.Add(_currentCaption.c_str()); + } + } + + void OnDraw(DrawPixelInfo& dpi) override + { + WindowDrawWidgets(*this, dpi); + + auto& widget = widgets[WIDX_TITLE]; + auto screenCoords = windowPos + ScreenCoordsXY{ widget.left, widget.bottom + 1 }; + + DrawPixelInfo clipDPI; + if (!ClipDrawPixelInfo(clipDPI, dpi, screenCoords, width - 3, height - widget.bottom - 3)) + return; + + auto& variant = kVehicleStyles[style]; + + // Draw supports sprite -- twice, to fill the window + auto trackCoords = ScreenCoordsXY{ widget.left, widget.bottom + 1 }; + GfxDrawSprite(clipDPI, variant.supports, trackCoords); + GfxDrawSprite(clipDPI, variant.supports, trackCoords + ScreenCoordsXY(256, 0)); + + // Draw track sprite -- twice, to fill the window + GfxDrawSprite(clipDPI, variant.track, trackCoords); + GfxDrawSprite(clipDPI, variant.track, trackCoords + ScreenCoordsXY(256, 0)); + + // Figure out where to position the vehicle to indicate progress + auto* vehicle = GfxGetG1Element(variant.vehicle); + int32_t position; + if (_totalCount > 0) + position = (-vehicle->width + 2) + width * _currentProgress / _totalCount; + else + position = (vehicle->width + width) / 2; + + GfxDrawSprite(clipDPI, variant.vehicle, ScreenCoordsXY(position, widget.bottom + 1)); + } + + void SetCaption(const std::string& text) + { + _progressTitle = text; + _currentProgress = 0; + _totalCount = 0; + + Invalidate(); + } + + void SetCloseCallback(close_callback onClose) + { + _onClose = onClose; + } + + void SetProgress(uint32_t currentProgress, uint32_t totalCount, StringId format) + { + if (format == STR_NONE) + _progressFormat = STR_STRING_M_OF_N; + else + _progressFormat = format; + + _currentProgress = currentProgress; + _totalCount = totalCount; + Invalidate(); + } + }; + + WindowBase* ProgressWindowOpen(const std::string& text, close_callback onClose) + { + ContextForceCloseWindowByClass(WindowClass::NetworkStatus); + + ProgressWindow* window; + if ((window = static_cast(WindowFindByClass(WindowClass::ProgressWindow))) != nullptr) + { + WindowBringToFront(*window); + } + else + { + window = WindowCreate( + WindowClass::ProgressWindow, kWindowWidth, kWindowHeight, + WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); + } + + window->SetCaption(text); + window->SetCloseCallback(onClose); + return window; + } + + void ProgressWindowSet(uint32_t currentProgress, uint32_t totalCount, StringId format) + { + auto window = WindowFindByClass(WindowClass::ProgressWindow); + if (window == nullptr) + { + return; + } + auto progressWindow = static_cast(window); + progressWindow->SetProgress(currentProgress, totalCount, format); + } + + // Closes the window, deliberately *without* executing the callback. + void ProgressWindowClose() + { + auto window = WindowFindByClass(WindowClass::ProgressWindow); + if (window == nullptr) + { + return; + } + auto progressWindow = static_cast(window); + progressWindow->SetCloseCallback(nullptr); + progressWindow->Close(); + } +} // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Research.cpp b/src/openrct2-ui/windows/Research.cpp index 1d7144d7d0..692620b7ee 100644 --- a/src/openrct2-ui/windows/Research.cpp +++ b/src/openrct2-ui/windows/Research.cpp @@ -14,8 +14,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index e48dca60f9..9d01bf286d 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" #include "../interface/Theme.h" #include @@ -41,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -168,6 +168,8 @@ enum { WIDX_LOCATE_MECHANIC, WIDX_REFURBISH_RIDE, WIDX_FORCE_BREAKDOWN, + WIDX_RELIABILITY_BAR, + WIDX_DOWN_TIME_BAR, WIDX_TRACK_PREVIEW = 14, WIDX_TRACK_COLOUR_SCHEME, @@ -242,11 +244,11 @@ constexpr int32_t RCT1_LIGHT_OFFSET = 4; // 0x009ADC34 static Widget _mainWidgets[] = { MAIN_RIDE_WIDGETS, - MakeWidget({ 3, 60}, {288, 107}, WindowWidgetType::Viewport, WindowColour::Secondary, STR_VIEWPORT ), - MakeWidget({ 35, 46}, {222, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, 0xFFFFFFFF, STR_VIEW_SELECTION ), - MakeWidget({245, 47}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_VIEW_SELECTION ), - MakeWidget({ 3, 167}, {288, 11}, WindowWidgetType::LabelCentred, WindowColour::Secondary ), - MakeWidget({291, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_OPEN_CLOSE_OR_TEST_RIDE), + MakeWidget({ 3, 60}, {288, 107}, WindowWidgetType::Viewport, WindowColour::Secondary ), + MakeWidget({ 35, 46}, {222, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kWidgetContentEmpty, STR_VIEW_SELECTION ), + MakeWidget({245, 47}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_VIEW_SELECTION ), + MakeWidget({ 3, 167}, {288, 11}, WindowWidgetType::LabelCentred, WindowColour::Secondary ), + MakeWidget({291, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, kWidgetContentEmpty, STR_OPEN_CLOSE_OR_TEST_RIDE), MakeWidget({291, 70}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION), STR_CONSTRUCTION ), MakeWidget({291, 94}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RENAME), STR_NAME_RIDE_TIP ), MakeWidget({291, 118}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_LOCATE), STR_LOCATE_SUBJECT_TIP ), @@ -303,6 +305,8 @@ static Widget _maintenanceWidgets[] = { MakeWidget({289, 108}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_LOCATE_NEAREST_AVAILABLE_MECHANIC_TIP ), MakeWidget({265, 108}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION), STR_REFURBISH_RIDE_TIP ), MakeWidget({241, 108}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_NO_ENTRY), STR_DEBUG_FORCE_BREAKDOWN_TIP ), + MakeProgressBar({107, 47}, { 147, 10}, COLOUR_BRIGHT_GREEN), + MakeProgressBar({107, 58}, { 147, 10}, COLOUR_BRIGHT_RED), kWidgetsEnd, }; @@ -502,12 +506,12 @@ static_assert(std::size(RatingNames) == 6); // Used in other places as well const StringId ColourSchemeNames[4] = { - STR_MAIN_COLOUR_SCHEME, // RIDE_COLOUR_SCHEME_MAIN - STR_ALTERNATIVE_COLOUR_SCHEME_1, // RIDE_COLOUR_SCHEME_ADDITIONAL_1 - STR_ALTERNATIVE_COLOUR_SCHEME_2, // RIDE_COLOUR_SCHEME_ADDITIONAL_2 - STR_ALTERNATIVE_COLOUR_SCHEME_3, // RIDE_COLOUR_SCHEME_ADDITIONAL_3 + STR_MAIN_COLOUR_SCHEME, // RideColourScheme::main + STR_ALTERNATIVE_COLOUR_SCHEME_1, // RideColourScheme::additional1 + STR_ALTERNATIVE_COLOUR_SCHEME_2, // RideColourScheme::additional2 + STR_ALTERNATIVE_COLOUR_SCHEME_3, // RideColourScheme::additional3 }; - static_assert(std::size(ColourSchemeNames) == RIDE_COLOUR_SCHEME_COUNT); + static_assert(std::size(ColourSchemeNames) == kNumRideColourSchemes); static constexpr std::array VehicleLoadNames = { static_cast(STR_QUARTER_LOAD), // WAIT_FOR_LOAD_QUARTER @@ -519,11 +523,11 @@ static_assert(std::size(RatingNames) == 6); static_assert(std::size(VehicleLoadNames) == WAIT_FOR_LOAD_COUNT); static constexpr std::array VehicleColourSchemeNames = { - static_cast(STR_ALL_VEHICLES_IN_SAME_COLOURS), // RIDE_COLOUR_SCHEME_MODE_ALL_SAME, - static_cast(STR_DIFFERENT_COLOURS_PER), // RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN, - static_cast(STR_DIFFERENT_COLOURS_PER_VEHICLE), // RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_CAR, + static_cast(STR_ALL_VEHICLES_IN_SAME_COLOURS), // VehicleColourSettings::same, + static_cast(STR_DIFFERENT_COLOURS_PER), // VehicleColourSettings::perTrain, + static_cast(STR_DIFFERENT_COLOURS_PER_VEHICLE), // VehicleColourSettings::perCar, }; - static_assert(std::size(VehicleColourSchemeNames) == RIDE_COLOUR_SCHEME_MODE_COUNT); + static_assert(std::size(VehicleColourSchemeNames) == kNumVehicleColourSettings); static constexpr std::array VehicleStatusNames = { static_cast(STR_MOVING_TO_END_OF), // Vehicle::Status::MovingToEndOfStation @@ -1198,7 +1202,7 @@ static_assert(std::size(RatingNames) == 6); const auto vehicle = RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, rideEntry->TabCar); const auto& carEntry = rideEntry->Cars[vehicle]; - auto vehicleId = ((ride->colour_scheme_type & 3) == VEHICLE_COLOUR_SCHEME_PER_VEHICLE) ? rideEntry->TabCar : 0; + auto vehicleId = (ride->vehicleColourSettings == VehicleColourSettings::perCar) ? rideEntry->TabCar : 0; VehicleColour vehicleColour = RideGetVehicleColour(*ride, vehicleId); // imageIndex represents a precision of 64 @@ -1468,7 +1472,7 @@ static_assert(std::size(RatingNames) == 6); newViewportFlags = viewport->flags; RemoveViewport(); } - else if (gConfigGeneral.AlwaysShowGridlines) + else if (Config::Get().general.AlwaysShowGridlines) { newViewportFlags |= VIEWPORT_FLAG_GRIDLINES; } @@ -1981,10 +1985,9 @@ static_assert(std::size(RatingNames) == 6); } Widget* dropdownWidget = widget - 1; - auto ddWidth = WindowDropDownHasMultipleColumns(numItems) ? dropdownWidget->width() - 24 : dropdownWidget->width(); WindowDropdownShowTextCustomWidth( { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, - colours[1], 0, Dropdown::Flag::StayOpen, numItems, ddWidth); + colours[1], 0, Dropdown::Flag::StayOpen, numItems, dropdownWidget->width()); // Find the current vehicle type in the ordered list. int32_t pos = 0; @@ -2039,9 +2042,9 @@ static_assert(std::size(RatingNames) == 6); for (size_t i = 0; i < _entranceDropdownData.size(); i++) { gDropdownItems[i].Args = _entranceDropdownData[i].LabelId; - gDropdownItems[i].Format = _entranceDropdownData[i].EntranceTypeId == ride->entrance_style - ? STR_DROPDOWN_MENU_LABEL_SELECTED - : STR_DROPDOWN_MENU_LABEL; + gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; + if (_entranceDropdownData[i].EntranceTypeId == ride->entrance_style) + gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL_SELECTED; } WindowDropdownShowTextCustomWidth( @@ -2417,7 +2420,11 @@ static_assert(std::size(RatingNames) == 6); const RideComponentName stationName = GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.station); ft.Add(ride->num_stations > 1 ? stationName.number : stationName.singular); ft.Add(vehicle->current_station.ToUnderlying() + 1); - return stringId != STR_CRASHING && stringId != STR_CRASHED_0 ? STR_BLACK_STRING : STR_RED_OUTLINED_STRING; + + if (stringId != STR_CRASHING && stringId != STR_CRASHED_0) + return STR_BLACK_STRING; + else + return STR_RED_OUTLINED_STRING; } StringId GetStatusStation(Formatter& ft) const @@ -2578,7 +2585,7 @@ static_assert(std::size(RatingNames) == 6); ride->SetReversedTrains(!ride->HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)); break; case WIDX_VEHICLE_TRAINS_INCREASE: - if (ride->NumTrains < OpenRCT2::Limits::MaxTrainsPerRide) + if (ride->NumTrains < OpenRCT2::Limits::kMaxTrainsPerRide) ride->SetNumTrains(ride->NumTrains + 1); break; case WIDX_VEHICLE_TRAINS_DECREASE: @@ -2586,7 +2593,7 @@ static_assert(std::size(RatingNames) == 6); ride->SetNumTrains(ride->NumTrains - 1); break; case WIDX_VEHICLE_CARS_PER_TRAIN_INCREASE: - if (ride->num_cars_per_train < OpenRCT2::Limits::MaxCarsPerTrain) + if (ride->num_cars_per_train < OpenRCT2::Limits::kMaxCarsPerTrain) ride->SetNumCarsPerVehicle(ride->num_cars_per_train + 1); break; case WIDX_VEHICLE_CARS_PER_TRAIN_DECREASE: @@ -2890,7 +2897,7 @@ static_assert(std::size(RatingNames) == 6); // For each train for (int32_t i = 0; i < ride->NumTrains; i++) { - VehicleDrawInfo trainCarImages[OpenRCT2::Limits::MaxCarsPerTrain]; + VehicleDrawInfo trainCarImages[OpenRCT2::Limits::kMaxCarsPerTrain]; VehicleDrawInfo* nextSpriteToDraw = trainCarImages; int32_t x = startX; int32_t y = startY; @@ -2908,15 +2915,15 @@ static_assert(std::size(RatingNames) == 6); // Get colour of vehicle int32_t vehicleColourIndex = 0; - switch (ride->colour_scheme_type & 3) + switch (ride->vehicleColourSettings) { - case VEHICLE_COLOUR_SCHEME_SAME: + case VehicleColourSettings::same: vehicleColourIndex = 0; break; - case VEHICLE_COLOUR_SCHEME_PER_TRAIN: + case VehicleColourSettings::perTrain: vehicleColourIndex = i; break; - case VEHICLE_COLOUR_SCHEME_PER_VEHICLE: + case VehicleColourSettings::perCar: vehicleColourIndex = carIndex; break; } @@ -2946,7 +2953,7 @@ static_assert(std::size(RatingNames) == 6); y -= (carEntry.spacing / 2) / 17432; } - if (ride->type == RIDE_TYPE_REVERSER_ROLLER_COASTER) + if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_LAYERED_VEHICLE_PREVIEW)) { VehicleDrawInfo tmp = *(nextSpriteToDraw - 1); *(nextSpriteToDraw - 1) = *(nextSpriteToDraw - 2); @@ -2977,7 +2984,7 @@ static_assert(std::size(RatingNames) == 6); if (GetGameState().Cheats.UnlockOperatingLimits) { - maxValue = OpenRCT2::Limits::CheatsMaxOperatingLimit; + maxValue = OpenRCT2::Limits::kCheatsMaxOperatingLimit; } uint8_t increment = ride->mode == RideMode::Dodgems ? 10 : 1; @@ -2997,7 +3004,7 @@ static_assert(std::size(RatingNames) == 6); uint8_t minValue = GetGameState().Cheats.UnlockOperatingLimits ? 0 : operatingSettings.MinValue; if (GetGameState().Cheats.UnlockOperatingLimits) { - maxValue = OpenRCT2::Limits::CheatsMaxOperatingLimit; + maxValue = OpenRCT2::Limits::kCheatsMaxOperatingLimit; } uint8_t decrement = ride->mode == RideMode::Dodgems ? 10 : 1; @@ -3133,7 +3140,7 @@ static_assert(std::size(RatingNames) == 6); break; case WIDX_LIFT_HILL_SPEED_INCREASE: upperBound = GetGameState().Cheats.UnlockOperatingLimits - ? OpenRCT2::Limits::CheatsMaxOperatingLimit + ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : ride->GetRideTypeDescriptor().LiftData.maximum_speed; lowerBound = GetGameState().Cheats.UnlockOperatingLimits ? 0 @@ -3144,7 +3151,7 @@ static_assert(std::size(RatingNames) == 6); break; case WIDX_LIFT_HILL_SPEED_DECREASE: upperBound = GetGameState().Cheats.UnlockOperatingLimits - ? OpenRCT2::Limits::CheatsMaxOperatingLimit + ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : ride->GetRideTypeDescriptor().LiftData.maximum_speed; lowerBound = GetGameState().Cheats.UnlockOperatingLimits ? 0 @@ -3160,28 +3167,28 @@ static_assert(std::size(RatingNames) == 6); OperatingLengthWindow(WIDX_MAXIMUM_LENGTH); break; case WIDX_MINIMUM_LENGTH_INCREASE: - upperBound = OpenRCT2::Limits::MaxWaitingTime; + upperBound = OpenRCT2::Limits::kMaxWaitingTime; lowerBound = 0; SetOperatingSetting( rideId, RideSetSetting::MinWaitingTime, std::clamp(ride->min_waiting_time + 1, lowerBound, upperBound)); break; case WIDX_MINIMUM_LENGTH_DECREASE: - upperBound = OpenRCT2::Limits::MaxWaitingTime; + upperBound = OpenRCT2::Limits::kMaxWaitingTime; lowerBound = 0; SetOperatingSetting( rideId, RideSetSetting::MinWaitingTime, std::clamp(ride->min_waiting_time - 1, lowerBound, upperBound)); break; case WIDX_MAXIMUM_LENGTH_INCREASE: - upperBound = OpenRCT2::Limits::MaxWaitingTime; + upperBound = OpenRCT2::Limits::kMaxWaitingTime; lowerBound = 0; SetOperatingSetting( rideId, RideSetSetting::MaxWaitingTime, std::clamp(ride->max_waiting_time + 1, lowerBound, upperBound)); break; case WIDX_MAXIMUM_LENGTH_DECREASE: - upperBound = OpenRCT2::Limits::MaxWaitingTime; + upperBound = OpenRCT2::Limits::kMaxWaitingTime; lowerBound = 0; SetOperatingSetting( rideId, RideSetSetting::MaxWaitingTime, @@ -3194,16 +3201,16 @@ static_assert(std::size(RatingNames) == 6); LoadDropdown(&widgets[widgetIndex]); break; case WIDX_OPERATE_NUMBER_OF_CIRCUITS_INCREASE: - upperBound = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::CheatsMaxOperatingLimit - : OpenRCT2::Limits::MaxCircuitsPerRide; + upperBound = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + : OpenRCT2::Limits::kMaxCircuitsPerRide; lowerBound = 1; SetOperatingSetting( rideId, RideSetSetting::NumCircuits, std::clamp(ride->num_circuits + 1, lowerBound, upperBound)); break; case WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE: - upperBound = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::CheatsMaxOperatingLimit - : OpenRCT2::Limits::MaxCircuitsPerRide; + upperBound = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + : OpenRCT2::Limits::kMaxCircuitsPerRide; lowerBound = 1; SetOperatingSetting( rideId, RideSetSetting::NumCircuits, @@ -3218,7 +3225,7 @@ static_assert(std::size(RatingNames) == 6); if (ride == nullptr) return; - uint8_t upperBound = OpenRCT2::Limits::MaxWaitingTime; + uint8_t upperBound = OpenRCT2::Limits::kMaxWaitingTime; uint8_t lowerBound = 0; Formatter ft; ft.Add(lowerBound); @@ -3246,7 +3253,7 @@ static_assert(std::size(RatingNames) == 6); } const auto& operatingSettings = ride.GetRideTypeDescriptor().OperatingSettings; - int16_t maxValue = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::CheatsMaxOperatingLimit + int16_t maxValue = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : operatingSettings.MaxValue; int16_t minValue = GetGameState().Cheats.UnlockOperatingLimits ? 0 : operatingSettings.MinValue; @@ -3328,7 +3335,7 @@ static_assert(std::size(RatingNames) == 6); if (widgetIndex == WIDX_MODE_TWEAK) { const auto& operatingSettings = ride->GetRideTypeDescriptor().OperatingSettings; - uint32_t maxValue = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::CheatsMaxOperatingLimit + uint32_t maxValue = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : operatingSettings.MaxValue; uint32_t minValue = GetGameState().Cheats.UnlockOperatingLimits ? 0 : operatingSettings.MinValue; auto multiplier = ride->GetRideTypeDescriptor().OperatingSettings.OperatingSettingMultiplier; @@ -3351,7 +3358,7 @@ static_assert(std::size(RatingNames) == 6); auto rideSetSetting = widgetIndex == WIDX_MINIMUM_LENGTH ? RideSetSetting::MinWaitingTime : RideSetSetting::MaxWaitingTime; - uint16_t upperBound = OpenRCT2::Limits::MaxWaitingTime; + uint16_t upperBound = OpenRCT2::Limits::kMaxWaitingTime; uint16_t lowerBound = 0; uint16_t size = std::stol(std::string(text)); size = std::clamp(size, lowerBound, upperBound); @@ -3622,7 +3629,7 @@ static_assert(std::size(RatingNames) == 6); ft.Add(ride->num_block_brakes + ride->num_stations); DrawTextBasic( dpi, windowPos + ScreenCoordsXY{ 21, ride->mode == RideMode::PoweredLaunchBlockSectioned ? 89 : 61 }, - STR_BLOCK_SECTIONS, ft, COLOUR_BLACK); + STR_BLOCK_SECTIONS, ft, { COLOUR_BLACK }); } } @@ -3653,23 +3660,6 @@ static_assert(std::size(RatingNames) == 6); } } - void MaintenanceDrawBar(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t value, int32_t colour) const - { - GfxFillRectInset(dpi, { coords, coords + ScreenCoordsXY{ 149, 8 } }, colours[1], INSET_RECT_F_30); - if (colour & kBarBlink) - { - colour &= ~kBarBlink; - if (GameIsNotPaused() && (gCurrentRealTimeTicks & 8)) - return; - } - - value = ((186 * ((value * 2) & 0xFF)) >> 8) & 0xFF; - if (value > 2) - { - GfxFillRectInset(dpi, { coords + ScreenCoordsXY{ 2, 1 }, coords + ScreenCoordsXY{ value + 1, 7 } }, colour, 0); - } - } - void MaintenanceOnMouseUp(WidgetIndex widgetIndex) { switch (widgetIndex) @@ -3940,7 +3930,7 @@ static_assert(std::size(RatingNames) == 6); AnchorBorderWidgets(); WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_10); - if (gConfigGeneral.DebuggingTools && NetworkGetMode() == NETWORK_MODE_NONE) + if (Config::Get().general.DebuggingTools && NetworkGetMode() == NETWORK_MODE_NONE) { widgets[WIDX_FORCE_BREAKDOWN].type = WindowWidgetType::FlatBtn; } @@ -3990,15 +3980,14 @@ static_assert(std::size(RatingNames) == 6); auto ft = Formatter(); ft.Add(reliability); DrawTextBasic(dpi, screenCoords, STR_RELIABILITY_LABEL_1757, ft); - MaintenanceDrawBar( - dpi, screenCoords + ScreenCoordsXY{ 103, 0 }, std::max(10, reliability), COLOUR_BRIGHT_GREEN); + WidgetProgressBarSetNewPercentage(widgets[WIDX_RELIABILITY_BAR], std::max(10, reliability)); screenCoords.y += 11; uint16_t downTime = ride->downtime; ft = Formatter(); ft.Add(downTime); DrawTextBasic(dpi, screenCoords, STR_DOWN_TIME_LABEL_1889, ft); - MaintenanceDrawBar(dpi, screenCoords + ScreenCoordsXY{ 103, 0 }, downTime, COLOUR_BRIGHT_RED); + WidgetProgressBarSetNewPercentage(widgets[WIDX_DOWN_TIME_BAR], downTime); screenCoords.y += 26; // Last inspection @@ -4187,7 +4176,7 @@ static_assert(std::size(RatingNames) == 6); void ColourOnMouseDown(WidgetIndex widgetIndex) { VehicleColour vehicleColour; - int32_t i, numItems; + int32_t numItems; StringId stringId; auto ride = GetRide(rideId); @@ -4204,7 +4193,8 @@ static_assert(std::size(RatingNames) == 6); switch (widgetIndex) { case WIDX_TRACK_COLOUR_SCHEME_DROPDOWN: - for (i = 0; i < OpenRCT2::Limits::NumColourSchemes; i++) + { + for (size_t i = 0; i < std::size(ColourSchemeNames); i++) { gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[i].Args = ColourSchemeNames[i]; @@ -4216,6 +4206,7 @@ static_assert(std::size(RatingNames) == 6); Dropdown::SetChecked(colourSchemeIndex, true); break; + } case WIDX_TRACK_MAIN_COLOUR: WindowDropdownShowColour( this, &widgets[widgetIndex], colours[1], ride->track_colour[colourSchemeIndex].main); @@ -4229,7 +4220,8 @@ static_assert(std::size(RatingNames) == 6); this, &widgets[widgetIndex], colours[1], ride->track_colour[colourSchemeIndex].supports); break; case WIDX_MAZE_STYLE_DROPDOWN: - for (i = 0; i < 4; i++) + { + for (auto i = 0; i < 4; i++) { gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[i].Args = MazeOptions[i].text; @@ -4241,11 +4233,13 @@ static_assert(std::size(RatingNames) == 6); Dropdown::SetChecked(ride->track_colour[colourSchemeIndex].supports, true); break; + } case WIDX_ENTRANCE_STYLE_DROPDOWN: ShowEntranceStyleDropdown(); break; case WIDX_VEHICLE_COLOUR_SCHEME_DROPDOWN: - for (i = 0; i < 3; i++) + { + for (auto i = 0; i < 3; i++) { gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[i].Args = (GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle) @@ -4259,17 +4253,18 @@ static_assert(std::size(RatingNames) == 6); colours[1], 0, Dropdown::Flag::StayOpen, rideEntry->max_cars_in_train > 1 ? 3 : 2, widgets[widgetIndex].right - dropdownWidget->left); - Dropdown::SetChecked(ride->colour_scheme_type & 3, true); + Dropdown::SetChecked(EnumValue(ride->vehicleColourSettings), true); break; + } case WIDX_VEHICLE_COLOUR_INDEX_DROPDOWN: + { numItems = ride->NumTrains; - if ((ride->colour_scheme_type & 3) != VEHICLE_COLOUR_SCHEME_PER_TRAIN) + if (ride->vehicleColourSettings != VehicleColourSettings::perTrain) numItems = ride->num_cars_per_train; - stringId = (ride->colour_scheme_type & 3) == VEHICLE_COLOUR_SCHEME_PER_TRAIN - ? STR_RIDE_COLOUR_TRAIN_OPTION - : STR_RIDE_COLOUR_VEHICLE_OPTION; - for (i = 0; i < std::min(numItems, Dropdown::ItemsMaxSize); i++) + stringId = ride->vehicleColourSettings == VehicleColourSettings::perTrain ? STR_RIDE_COLOUR_TRAIN_OPTION + : STR_RIDE_COLOUR_VEHICLE_OPTION; + for (auto i = 0; i < std::min(numItems, Dropdown::ItemsMaxSize); i++) { gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[i].Args = (static_cast(i + 1) << 32) @@ -4283,6 +4278,7 @@ static_assert(std::size(RatingNames) == 6); Dropdown::SetChecked(_vehicleIndex, true); break; + } case WIDX_VEHICLE_BODY_COLOUR: vehicleColour = RideGetVehicleColour(*ride, _vehicleIndex); WindowDropdownShowColour(this, &widgets[widgetIndex], colours[1], vehicleColour.Body); @@ -4560,8 +4556,7 @@ static_assert(std::size(RatingNames) == 6); if (!ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES) && ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS)) { - int32_t vehicleColourSchemeType = ride->colour_scheme_type & 3; - if (vehicleColourSchemeType == 0) + if (ride->vehicleColourSettings == VehicleColourSettings::same) _vehicleIndex = 0; vehicleColour = RideGetVehicleColour(*ride, _vehicleIndex); @@ -4622,18 +4617,19 @@ static_assert(std::size(RatingNames) == 6); } ft.Rewind(); ft.Increment(6); - ft.Add(VehicleColourSchemeNames[vehicleColourSchemeType]); + ft.Add(VehicleColourSchemeNames[EnumValue(ride->vehicleColourSettings)]); ft.Add(GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle).singular); ft.Add(GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle).capitalised); ft.Add(_vehicleIndex + 1); // Vehicle index - if (vehicleColourSchemeType != 0) + if (ride->vehicleColourSettings != VehicleColourSettings::same) { widgets[WIDX_VEHICLE_COLOUR_INDEX].type = WindowWidgetType::DropdownMenu; widgets[WIDX_VEHICLE_COLOUR_INDEX_DROPDOWN].type = WindowWidgetType::Button; - widgets[WIDX_VEHICLE_COLOUR_INDEX].text = vehicleColourSchemeType == 1 ? STR_RIDE_COLOUR_TRAIN_VALUE - : STR_RIDE_COLOUR_VEHICLE_VALUE; + widgets[WIDX_VEHICLE_COLOUR_INDEX].text = ride->vehicleColourSettings == VehicleColourSettings::perTrain + ? STR_RIDE_COLOUR_TRAIN_VALUE + : STR_RIDE_COLOUR_VEHICLE_VALUE; } else { @@ -4799,9 +4795,8 @@ static_assert(std::size(RatingNames) == 6); auto screenCoords = ScreenCoordsXY{ vehiclePreviewWidget->width() / 2, vehiclePreviewWidget->height() - 15 }; // ? - auto trainCarIndex = (ride->colour_scheme_type & 3) == RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_CAR - ? _vehicleIndex - : rideEntry->TabCar; + auto trainCarIndex = ride->vehicleColourSettings == VehicleColourSettings::perCar ? _vehicleIndex + : rideEntry->TabCar; const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition( ride->subtype, ride->num_cars_per_train, trainCarIndex)]; @@ -5301,7 +5296,7 @@ static_assert(std::size(RatingNames) == 6); disabled_widgets |= (1uLL << WIDX_SAVE_TRACK_DESIGN); if (ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED) { - if (ride->excitement != kRideRatingUndefined) + if (!ride->ratings.isNull()) { disabled_widgets &= ~(1uLL << WIDX_SAVE_TRACK_DESIGN); widgets[WIDX_SAVE_TRACK_DESIGN].tooltip = STR_SAVE_TRACK_DESIGN; @@ -5343,9 +5338,9 @@ static_assert(std::size(RatingNames) == 6); if (ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED) { // Excitement - StringId ratingName = GetRatingName(ride->excitement); + StringId ratingName = GetRatingName(ride->ratings.excitement); auto ft = Formatter(); - ft.Add(ride->excitement); + ft.Add(ride->ratings.excitement); ft.Add(ratingName); StringId stringId = !RideHasRatings(*ride) ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE : STR_EXCITEMENT_RATING; @@ -5353,24 +5348,24 @@ static_assert(std::size(RatingNames) == 6); screenCoords.y += kListRowHeight; // Intensity - ratingName = GetRatingName(ride->intensity); + ratingName = GetRatingName(ride->ratings.intensity); ft = Formatter(); - ft.Add(ride->intensity); + ft.Add(ride->ratings.intensity); ft.Add(ratingName); stringId = STR_INTENSITY_RATING; if (!RideHasRatings(*ride)) stringId = STR_INTENSITY_RATING_NOT_YET_AVAILABLE; - else if (ride->intensity >= RIDE_RATING(10, 00)) + else if (ride->ratings.intensity >= RIDE_RATING(10, 00)) stringId = STR_INTENSITY_RATING_RED; DrawTextBasic(dpi, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Nausea - ratingName = GetRatingName(ride->nausea); + ratingName = GetRatingName(ride->ratings.nausea); ft = Formatter(); - ft.Add(ride->nausea); + ft.Add(ride->ratings.nausea); ft.Add(ratingName); stringId = !RideHasRatings(*ride) ? STR_NAUSEA_RATING_NOT_YET_AVAILABLE : STR_NAUSEA_RATING; DrawTextBasic(dpi, screenCoords, stringId, ft); @@ -5515,17 +5510,15 @@ static_assert(std::size(RatingNames) == 6); // Total 'air' time ft = Formatter(); - ft.Add(ride->total_air_time * 3); + ft.Add(ride->totalAirTime * 3); DrawTextBasic(dpi, screenCoords, STR_TOTAL_AIR_TIME, ft); screenCoords.y += kListRowHeight; } if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_DROPS)) { - // Drops - auto drops = ride->drops & 0x3F; ft = Formatter(); - ft.Add(drops); + ft.Add(ride->getNumDrops()); DrawTextBasic(dpi, screenCoords, STR_DROPS, ft); screenCoords.y += kListRowHeight; @@ -6039,7 +6032,7 @@ static_assert(std::size(RatingNames) == 6); return; auto price = ride->price[0]; - if (price < 20.00_GBP) + if (price < kRideMaxPrice) price++; IncomeSetPrimaryPrice(price); @@ -6055,7 +6048,7 @@ static_assert(std::size(RatingNames) == 6); return; auto price = ride->price[0]; - if (price > 0.00_GBP) + if (price > kRideMinPrice) price--; IncomeSetPrimaryPrice(price); @@ -6092,7 +6085,7 @@ static_assert(std::size(RatingNames) == 6); { auto price = IncomeGetSecondaryPrice(); - if (price < 20.00_GBP) + if (price < kRideMaxPrice) price++; IncomeSetSecondaryPrice(price); @@ -6110,7 +6103,7 @@ static_assert(std::size(RatingNames) == 6); void IncomeOnMouseUp(WidgetIndex widgetIndex) { - utf8 _moneyInputText[MONEY_STRING_MAXLENGTH] = {}; + utf8 _moneyInputText[kMoneyStringMaxlength] = {}; switch (widgetIndex) { @@ -6137,10 +6130,10 @@ static_assert(std::size(RatingNames) == 6); auto ride = GetRide(rideId); if (ride != nullptr) { - MoneyToString(ride->price[0], _moneyInputText, MONEY_STRING_MAXLENGTH, true); + MoneyToString(ride->price[0], _moneyInputText, kMoneyStringMaxlength, true); WindowTextInputRawOpen( this, WIDX_PRIMARY_PRICE, STR_ENTER_NEW_VALUE, STR_ENTER_NEW_VALUE, {}, _moneyInputText, - MONEY_STRING_MAXLENGTH); + kMoneyStringMaxlength); } break; } @@ -6151,10 +6144,10 @@ static_assert(std::size(RatingNames) == 6); { auto price64 = IncomeGetSecondaryPrice(); - MoneyToString(price64, _moneyInputText, MONEY_STRING_MAXLENGTH, true); + MoneyToString(price64, _moneyInputText, kMoneyStringMaxlength, true); WindowTextInputRawOpen( this, WIDX_SECONDARY_PRICE, STR_ENTER_NEW_VALUE, STR_ENTER_NEW_VALUE, {}, _moneyInputText, - MONEY_STRING_MAXLENGTH); + kMoneyStringMaxlength); } break; case WIDX_SECONDARY_PRICE_SAME_THROUGHOUT_PARK: @@ -6213,7 +6206,7 @@ static_assert(std::size(RatingNames) == 6); return; } - price = std::clamp(price, 0.00_GBP, 20.00_GBP); + price = std::clamp(price, kRideMinPrice, kRideMaxPrice); if (widgetIndex == WIDX_PRIMARY_PRICE) { @@ -6811,7 +6804,7 @@ static_assert(std::size(RatingNames) == 6); // Get view index int16_t view = 1; - for (int32_t i = 0; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) + for (int32_t i = 0; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { if (ride->vehicles[i] == headVehicleSpriteIndex) break; diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index a3383ddfa1..15c2cb64c8 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -47,6 +47,9 @@ #include #include +constexpr int8_t kDefaultSpeedIncrement = 2; +constexpr int8_t kDefaultMinimumSpeed = 2; + using namespace OpenRCT2::TrackMetaData; namespace OpenRCT2::Ui::Windows { @@ -270,7 +273,7 @@ static Widget _rideConstructionWidgets[] = { if (RideTryGetOriginElement(*currentRide, nullptr)) { // Auto open shops if required. - if (currentRide->mode == RideMode::ShopStall && gConfigGeneral.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 @@ -972,12 +975,6 @@ static Widget _rideConstructionWidgets[] = { case WIDX_CLOSE: Close(); break; - case WIDX_NEXT_SECTION: - RideSelectNextSection(); - break; - case WIDX_PREVIOUS_SECTION: - RideSelectPreviousSection(); - break; case WIDX_ROTATE: Rotate(); break; @@ -1023,6 +1020,12 @@ static Widget _rideConstructionWidgets[] = { case WIDX_DEMOLISH: MouseUpDemolish(); break; + case WIDX_NEXT_SECTION: + RideSelectNextSection(); + break; + case WIDX_PREVIOUS_SECTION: + RideSelectPreviousSection(); + break; case WIDX_LEFT_CURVE: RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = EnumValue(TrackCurve::Left); @@ -1336,9 +1339,10 @@ static Widget _rideConstructionWidgets[] = { } else { - uint8_t* brakesSpeedPtr = &_currentBrakeSpeed; - uint8_t brakesSpeed = *brakesSpeedPtr + 2; - if (brakesSpeed <= kMaximumBrakeSpeed) + auto trackSpeedMaximum = kMaximumTrackSpeed; + auto trackSpeedIncrement = kDefaultSpeedIncrement; + uint8_t brakesSpeed = std::min(trackSpeedMaximum, _currentBrakeSpeed + trackSpeedIncrement); + if (brakesSpeed != _currentBrakeSpeed) { if (_rideConstructionState == RideConstructionState::Selected) { @@ -1346,7 +1350,7 @@ static Widget _rideConstructionWidgets[] = { } else { - *brakesSpeedPtr = brakesSpeed; + _currentBrakeSpeed = brakesSpeed; WindowRideConstructionUpdateActiveElements(); } } @@ -1362,9 +1366,14 @@ static Widget _rideConstructionWidgets[] = { } else { - uint8_t* brakesSpeedPtr = &_currentBrakeSpeed; - uint8_t brakesSpeed = *brakesSpeedPtr - 2; - if (brakesSpeed >= 2) + auto trackSpeedIncrement = kDefaultSpeedIncrement; + auto trackSpeedMinimum = kDefaultMinimumSpeed; + if (GetGameState().Cheats.UnlockOperatingLimits) + { + trackSpeedMinimum = 0; + } + uint8_t brakesSpeed = std::max(trackSpeedMinimum, _currentBrakeSpeed - trackSpeedIncrement); + if (brakesSpeed != _currentBrakeSpeed) { if (_rideConstructionState == RideConstructionState::Selected) { @@ -1372,7 +1381,7 @@ static Widget _rideConstructionWidgets[] = { } else { - *brakesSpeedPtr = brakesSpeed; + _currentBrakeSpeed = brakesSpeed; WindowRideConstructionUpdateActiveElements(); } } @@ -1597,7 +1606,8 @@ static Widget _rideConstructionWidgets[] = { const auto& rtd = GetRideTypeDescriptor(currentRide->type); auto trackDrawerDescriptor = getCurrentTrackDrawerDescriptor(rtd); - hold_down_widgets = (1u << WIDX_CONSTRUCT) | (1u << WIDX_DEMOLISH); + hold_down_widgets = (1u << WIDX_CONSTRUCT) | (1u << WIDX_DEMOLISH) | (1u << WIDX_NEXT_SECTION) + | (1u << WIDX_PREVIOUS_SECTION); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY) || !currentRide->HasStation()) { widgets[WIDX_ENTRANCE_EXIT_GROUPBOX].type = WindowWidgetType::Empty; @@ -1698,7 +1708,7 @@ static Widget _rideConstructionWidgets[] = { { // Enable helix widgets[WIDX_SLOPE_DOWN_STEEP].type = WindowWidgetType::FlatBtn; - if (currentRide->type != RIDE_TYPE_SPLASH_BOATS && currentRide->type != RIDE_TYPE_RIVER_RAFTS) + if (IsTrackEnabled(TRACK_HELIX_UP_BANKED_HALF)) widgets[WIDX_SLOPE_UP_STEEP].type = WindowWidgetType::FlatBtn; } } @@ -2645,7 +2655,7 @@ static Widget _rideConstructionWidgets[] = { tempTrackTileElement.AsTrack()->SetRideType(currentRide->type); tempTrackTileElement.AsTrack()->SetHasCableLift(false); tempTrackTileElement.AsTrack()->SetInverted((liftHillAndInvertedState & CONSTRUCTION_INVERTED_TRACK_SELECTED) != 0); - tempTrackTileElement.AsTrack()->SetColourScheme(RIDE_COLOUR_SCHEME_MAIN); + tempTrackTileElement.AsTrack()->SetColourScheme(RideColourScheme::main); // Skipping seat rotation, should not be necessary for a temporary piece. tempTrackTileElement.AsTrack()->SetRideIndex(rideIndex); @@ -3353,10 +3363,10 @@ static Widget _rideConstructionWidgets[] = { if (_autoRotatingShop && _rideConstructionState == RideConstructionState::Place && ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) { - PathElement* pathsByDir[NumOrthogonalDirections]; + PathElement* pathsByDir[kNumOrthogonalDirections]; bool keepOrientation = false; - for (int8_t i = 0; i < NumOrthogonalDirections; i++) + for (int8_t i = 0; i < kNumOrthogonalDirections; i++) { const auto testLoc = CoordsXYZ{ *mapCoords + CoordsDirectionDelta[i], z }; if (!MapIsLocationOwned(testLoc)) @@ -3398,7 +3408,7 @@ static Widget _rideConstructionWidgets[] = { if (!keepOrientation) { - for (int8_t i = 0; i < NumOrthogonalDirections; i++) + for (int8_t i = 0; i < kNumOrthogonalDirections; i++) { if (pathsByDir[i] != nullptr) { @@ -4511,7 +4521,7 @@ static Widget _rideConstructionWidgets[] = { return; } - w->OnMouseUp(WIDX_PREVIOUS_SECTION); + w->OnMouseDown(WIDX_PREVIOUS_SECTION); } void WindowRideConstructionKeyboardShortcutNextTrack() @@ -4523,7 +4533,7 @@ static Widget _rideConstructionWidgets[] = { return; } - w->OnMouseUp(WIDX_NEXT_SECTION); + w->OnMouseDown(WIDX_NEXT_SECTION); } void WindowRideConstructionKeyboardShortcutBuildCurrent() diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index 0022ef62db..06aa956c8e 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -386,7 +385,7 @@ static Widget _rideListWidgets[] = { */ ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - const auto newHeight = static_cast(_rideList.size() * SCROLLABLE_ROW_HEIGHT); + const auto newHeight = static_cast(_rideList.size() * kScrollableRowHeight); if (selected_list_item != -1) { selected_list_item = -1; @@ -411,7 +410,7 @@ static Widget _rideListWidgets[] = { */ void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - const auto index = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + const auto index = screenCoords.y / kScrollableRowHeight; if (index < 0 || static_cast(index) >= _rideList.size()) return; @@ -437,7 +436,7 @@ static Widget _rideListWidgets[] = { */ void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - const auto index = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + const auto index = screenCoords.y / kScrollableRowHeight; if (index < 0 || static_cast(index) >= _rideList.size()) return; @@ -543,17 +542,23 @@ static Widget _rideListWidgets[] = { { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; GfxFillRect( - dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width, dpi.height } }, ColourMapA[colours[1]].mid_light); + dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width, dpi.height } }, + ColourMapA[colours[1].colour].mid_light); auto y = 0; for (size_t i = 0; i < _rideList.size(); i++) { - StringId format = (_quickDemolishMode ? STR_RED_STRINGID : STR_BLACK_STRING); + StringId format = STR_BLACK_STRING; + if (_quickDemolishMode) + format = STR_RED_STRINGID; + if (i == static_cast(selected_list_item)) { // Background highlight - GfxFilterRect(dpi, { 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1); - format = (_quickDemolishMode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID); + GfxFilterRect(dpi, { 0, y, 800, y + kScrollableRowHeight - 1 }, FilterPaletteID::PaletteDarken1); + format = STR_WINDOW_COLOUR_2_STRINGID; + if (_quickDemolishMode) + format = STR_LIGHTPINK_STRINGID; } // Get ride @@ -715,7 +720,7 @@ static Widget _rideListWidgets[] = { if (RideHasRatings(*ridePtr)) { formatSecondary = STR_EXCITEMENT_LABEL; - ft.Add(ridePtr->excitement); + ft.Add(ridePtr->ratings.excitement); } break; case INFORMATION_TYPE_INTENSITY: @@ -723,7 +728,7 @@ static Widget _rideListWidgets[] = { if (RideHasRatings(*ridePtr)) { formatSecondary = STR_INTENSITY_LABEL; - ft.Add(ridePtr->intensity); + ft.Add(ridePtr->ratings.intensity); } break; case INFORMATION_TYPE_NAUSEA: @@ -731,7 +736,7 @@ static Widget _rideListWidgets[] = { if (RideHasRatings(*ridePtr)) { formatSecondary = STR_NAUSEA_LABEL; - ft.Add(ridePtr->nausea); + ft.Add(ridePtr->ratings.nausea); } break; } @@ -742,7 +747,7 @@ static Widget _rideListWidgets[] = { ft.Add(formatSecondary); } DrawTextEllipsised(dpi, { 160, y - 1 }, 157, format, ft); - y += SCROLLABLE_ROW_HEIGHT; + y += kScrollableRowHeight; } } @@ -910,17 +915,17 @@ static Widget _rideListWidgets[] = { break; case INFORMATION_TYPE_EXCITEMENT: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.excitement <= otherRide.excitement; + return thisRide.ratings.excitement <= otherRide.ratings.excitement; }); break; case INFORMATION_TYPE_INTENSITY: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.intensity <= otherRide.intensity; + return thisRide.ratings.intensity <= otherRide.ratings.intensity; }); break; case INFORMATION_TYPE_NAUSEA: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.nausea <= otherRide.nausea; + return thisRide.ratings.nausea <= otherRide.ratings.nausea; }); break; } diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index d4c80757e2..d2344e9c2b 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -209,7 +209,7 @@ static constexpr StringId window_save_prompt_labels[][2] = { return nullptr; } - if (!gConfigGeneral.ConfirmationPrompt) + if (!Config::Get().general.ConfirmationPrompt) { /* game_load_or_quit_no_save_prompt() will exec requested task and close this window * immediately again. diff --git a/src/openrct2-ui/windows/ScenarioSelect.cpp b/src/openrct2-ui/windows/ScenarioSelect.cpp index bcc966df15..25cfc23ce2 100644 --- a/src/openrct2-ui/windows/ScenarioSelect.cpp +++ b/src/openrct2-ui/windows/ScenarioSelect.cpp @@ -151,8 +151,8 @@ static Widget _scenarioSelectWidgets[] = { { selected_tab = widgetIndex - 4; _highlightedScenario = nullptr; - gConfigInterface.ScenarioselectLastTab = selected_tab; - ConfigSaveDefault(); + Config::Get().interface.ScenarioselectLastTab = selected_tab; + Config::Save(); InitialiseListItems(); Invalidate(); OnResize(); @@ -164,13 +164,18 @@ static Widget _scenarioSelectWidgets[] = { void OnDraw(DrawPixelInfo& dpi) override { - int32_t format; const ScenarioIndexEntry* scenario; DrawWidgets(dpi); - format = ScenarioSelectUseSmallFont() ? STR_SMALL_WINDOW_COLOUR_2_STRINGID : STR_WINDOW_COLOUR_2_STRINGID; - FontStyle fontStyle = ScenarioSelectUseSmallFont() ? FontStyle::Small : FontStyle::Medium; + StringId format = STR_WINDOW_COLOUR_2_STRINGID; + FontStyle fontStyle = FontStyle::Medium; + + if (ScenarioSelectUseSmallFont()) + { + format = STR_SMALL_WINDOW_COLOUR_2_STRINGID; + fontStyle = FontStyle::Small; + } // Text for each tab for (uint32_t i = 0; i < std::size(kScenarioOriginStringIds); i++) @@ -180,7 +185,7 @@ static Widget _scenarioSelectWidgets[] = { continue; auto ft = Formatter(); - if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) { ft.Add(kScenarioOriginStringIds[i]); } @@ -219,7 +224,7 @@ static Widget _scenarioSelectWidgets[] = { } // Scenario path - if (gConfigGeneral.DebuggingTools) + if (Config::Get().general.DebuggingTools) { const auto shortPath = ShortenPath(scenario->Path, width - 6 - TabWidth, FontStyle::Medium); @@ -282,7 +287,7 @@ static Widget _scenarioSelectWidgets[] = { pressed_widgets |= 1LL << (selected_tab + WIDX_TAB1); ResizeFrameWithPage(); - const int32_t bottomMargin = gConfigGeneral.DebuggingTools ? 17 : 5; + const int32_t bottomMargin = Config::Get().general.DebuggingTools ? 17 : 5; widgets[WIDX_SCENARIOLIST].right = width - 179; widgets[WIDX_SCENARIOLIST].bottom = height - bottomMargin; } @@ -388,11 +393,16 @@ static Widget _scenarioSelectWidgets[] = { void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { - uint8_t paletteIndex = ColourMapA[colours[1]].mid_light; + uint8_t paletteIndex = ColourMapA[colours[1].colour].mid_light; GfxClear(dpi, paletteIndex); - StringId highlighted_format = ScenarioSelectUseSmallFont() ? STR_WHITE_STRING : STR_WINDOW_COLOUR_2_STRINGID; - StringId unhighlighted_format = ScenarioSelectUseSmallFont() ? STR_WHITE_STRING : STR_BLACK_STRING; + StringId highlighted_format = STR_WINDOW_COLOUR_2_STRINGID; + StringId unhighlighted_format = STR_BLACK_STRING; + if (ScenarioSelectUseSmallFont()) + { + highlighted_format = STR_WHITE_STRING; + unhighlighted_format = STR_WHITE_STRING; + } const auto& listWidget = widgets[WIDX_SCENARIOLIST]; int32_t listWidth = listWidget.width() - 12; @@ -441,7 +451,8 @@ static Widget _scenarioSelectWidgets[] = { auto ft = Formatter(); ft.Add(STR_STRING); ft.Add(buffer); - colour_t colour = isDisabled ? colours[1] | COLOUR_FLAG_INSET : COLOUR_BLACK; + auto colour = isDisabled ? colours[1].withFlag(ColourFlag::inset, true) + : ColourWithFlags{ COLOUR_BLACK }; auto darkness = isDisabled ? TextDarkness::Dark : TextDarkness::Regular; const auto scrollCentre = widgets[WIDX_SCENARIOLIST].width() / 2; @@ -480,9 +491,9 @@ static Widget _scenarioSelectWidgets[] = { private: void DrawCategoryHeading(DrawPixelInfo& dpi, int32_t left, int32_t right, int32_t y, StringId stringId) const { - colour_t baseColour = colours[1]; - colour_t lightColour = ColourMapA[baseColour].lighter; - colour_t darkColour = ColourMapA[baseColour].mid_dark; + auto baseColour = colours[1]; + colour_t lightColour = ColourMapA[baseColour.colour].lighter; + colour_t darkColour = ColourMapA[baseColour.colour].mid_dark; // Draw string int32_t centreX = (left + right) / 2; @@ -538,7 +549,7 @@ static Widget _scenarioSelectWidgets[] = { // Category heading StringId headingStringId = STR_NONE; - if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) { if (selected_tab != static_cast(ScenarioSource::Real) && currentHeading != scenario->Category) { @@ -618,7 +629,7 @@ static Widget _scenarioSelectWidgets[] = { bool megaParkLocked = (rct1CompletedScenarios & rct1RequiredCompletedScenarios) != rct1RequiredCompletedScenarios; _listItems[megaParkListItemIndex.value()].scenario.is_locked = megaParkLocked; - if (megaParkLocked && gConfigGeneral.ScenarioHideMegaPark) + if (megaParkLocked && Config::Get().general.ScenarioHideMegaPark) { // Remove mega park _listItems.pop_back(); @@ -644,7 +655,7 @@ static Widget _scenarioSelectWidgets[] = { bool IsScenarioVisible(const ScenarioIndexEntry& scenario) const { - if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) { if (static_cast(scenario.SourceGame) != selected_tab) { @@ -668,9 +679,9 @@ static Widget _scenarioSelectWidgets[] = { bool IsLockingEnabled() const { - if (gConfigGeneral.ScenarioSelectMode != SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.ScenarioSelectMode != SCENARIO_SELECT_MODE_ORIGIN) return false; - if (!gConfigGeneral.ScenarioUnlockingEnabled) + if (!Config::Get().general.ScenarioUnlockingEnabled) return false; if (selected_tab >= 6) return false; @@ -685,7 +696,7 @@ static Widget _scenarioSelectWidgets[] = { for (size_t i = 0; i < numScenarios; i++) { const ScenarioIndexEntry* scenario = ScenarioRepositoryGetByIndex(i); - if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) { showPages |= 1 << static_cast(scenario->SourceGame); } @@ -700,9 +711,9 @@ static Widget _scenarioSelectWidgets[] = { } } - if (showPages & (1 << gConfigInterface.ScenarioselectLastTab)) + if (showPages & (1 << Config::Get().interface.ScenarioselectLastTab)) { - selected_tab = gConfigInterface.ScenarioselectLastTab; + selected_tab = Config::Get().interface.ScenarioselectLastTab; } else { diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 038bf74f89..36eec93baf 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -1327,7 +1327,7 @@ static Widget WindowSceneryBaseWidgets[] = { auto scgEntry = tabInfo.GetSceneryGroupEntry(); if (scgEntry != nullptr) { - widget.image = ImageId(scgEntry->image, colours[1]); + widget.image = ImageId(scgEntry->image, colours[1].colour); } } @@ -1624,7 +1624,7 @@ static Widget WindowSceneryBaseWidgets[] = { void ContentScrollDraw(DrawPixelInfo& dpi) { - GfxClear(dpi, ColourMapA[colours[1]].mid_light); + GfxClear(dpi, ColourMapA[colours[1].colour].mid_light); auto numColumns = GetNumColumns(); auto tabIndex = _activeTabIndex; diff --git a/src/openrct2-ui/windows/SceneryScatter.cpp b/src/openrct2-ui/windows/SceneryScatter.cpp index 6da6ae4f27..9e85f20c43 100644 --- a/src/openrct2-ui/windows/SceneryScatter.cpp +++ b/src/openrct2-ui/windows/SceneryScatter.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include #include #include #include @@ -15,6 +16,7 @@ #include #include #include + namespace OpenRCT2::Ui::Windows { enum WindowSceneryScatterWidgetIdx diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index 850c68bc27..6fa38bc01a 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -16,7 +16,7 @@ # include # include # include -# include +# include # include # include # include @@ -94,7 +94,7 @@ static Widget _serverListWidgets[] = { void OnOpen() override { - _playerName = gConfigNetwork.PlayerName; + _playerName = Config::Get().network.PlayerName; widgets = _serverListWidgets; _serverListWidgets[WIDX_PLAYER_NAME_INPUT].string = const_cast(_playerName.c_str()); InitScrollWidgets(); @@ -120,7 +120,7 @@ static Widget _serverListWidgets[] = { { _serverList = {}; _fetchFuture = {}; - ConfigSaveDefault(); + Config::Save(); } void OnMouseUp(WidgetIndex widgetIndex) override @@ -238,7 +238,7 @@ static Widget _serverListWidgets[] = { } auto dropdownPos = ScreenCoordsXY{ windowPos.x + listWidget.left + screenCoords.x + 2 - scrolls[0].h_left, windowPos.y + listWidget.top + screenCoords.y + 2 - scrolls[0].v_top }; - WindowDropdownShowText(dropdownPos, 0, COLOUR_GREY, 0, 2); + WindowDropdownShowText(dropdownPos, 0, { COLOUR_GREY }, 0, 2); } } @@ -284,7 +284,7 @@ static Widget _serverListWidgets[] = { return; _playerName = temp; - gConfigNetwork.PlayerName = _playerName; + Config::Get().network.PlayerName = _playerName; widgets[WIDX_PLAYER_NAME_INPUT].string = const_cast(_playerName.c_str()); InvalidateWidget(WIDX_PLAYER_NAME_INPUT); @@ -334,7 +334,7 @@ static Widget _serverListWidgets[] = { void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { - uint8_t paletteIndex = ColourMapA[colours[1]].mid_light; + uint8_t paletteIndex = ColourMapA[colours[1].colour].mid_light; GfxClear(dpi, paletteIndex); auto& listWidget = widgets[WIDX_LIST]; @@ -359,7 +359,7 @@ static Widget _serverListWidgets[] = { _version = serverDetails.Version; } - colour_t colour = colours[1]; + auto colour = colours[1]; if (serverDetails.Favourite) { colour = COLOUR_YELLOW; @@ -424,7 +424,7 @@ static Widget _serverListWidgets[] = { // Draw number of players screenCoords.x = right - numPlayersStringWidth; - GfxDrawString(dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, players, { colours[1] }); + DrawText(dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, { colours[1] }, players); screenCoords.y += ITEM_HEIGHT; } diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index e7fa38135c..a796d08941 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -82,10 +82,10 @@ static Widget _windowServerStartWidgets[] = { page = 0; list_information_type = 0; - snprintf(_port, 7, "%u", gConfigNetwork.DefaultPort); - SafeStrCpy(_name, gConfigNetwork.ServerName.c_str(), sizeof(_name)); - SafeStrCpy(_description, gConfigNetwork.ServerDescription.c_str(), sizeof(_description)); - SafeStrCpy(_greeting, gConfigNetwork.ServerGreeting.c_str(), sizeof(_greeting)); + snprintf(_port, 7, "%u", Config::Get().network.DefaultPort); + SafeStrCpy(_name, Config::Get().network.ServerName.c_str(), sizeof(_name)); + SafeStrCpy(_description, Config::Get().network.ServerDescription.c_str(), sizeof(_description)); + SafeStrCpy(_greeting, Config::Get().network.ServerGreeting.c_str(), sizeof(_greeting)); } void OnMouseUp(WidgetIndex widgetIndex) override { @@ -110,24 +110,24 @@ static Widget _windowServerStartWidgets[] = { WindowStartTextbox(*this, widgetIndex, _password, 32); break; case WIDX_MAXPLAYERS_INCREASE: - if (gConfigNetwork.Maxplayers < 255) + if (Config::Get().network.Maxplayers < 255) { - gConfigNetwork.Maxplayers++; + Config::Get().network.Maxplayers++; } - ConfigSaveDefault(); + Config::Save(); Invalidate(); break; case WIDX_MAXPLAYERS_DECREASE: - if (gConfigNetwork.Maxplayers > 1) + if (Config::Get().network.Maxplayers > 1) { - gConfigNetwork.Maxplayers--; + Config::Get().network.Maxplayers--; } - ConfigSaveDefault(); + Config::Save(); Invalidate(); break; case WIDX_ADVERTISE_CHECKBOX: - gConfigNetwork.Advertise = !gConfigNetwork.Advertise; - ConfigSaveDefault(); + Config::Get().network.Advertise = !Config::Get().network.Advertise; + Config::Save(); Invalidate(); break; case WIDX_START_SERVER: @@ -147,10 +147,10 @@ static Widget _windowServerStartWidgets[] = { { ColourSchemeUpdateByClass(this, WindowClass::ServerList); - WidgetSetCheckboxValue(*this, WIDX_ADVERTISE_CHECKBOX, gConfigNetwork.Advertise); + WidgetSetCheckboxValue(*this, WIDX_ADVERTISE_CHECKBOX, Config::Get().network.Advertise); auto ft = Formatter::Common(); ft.Increment(18); - ft.Add(gConfigNetwork.Maxplayers); + ft.Add(Config::Get().network.Maxplayers); } void OnUpdate() override { @@ -180,8 +180,8 @@ static Widget _windowServerStartWidgets[] = { tempPort = atoi(_port); if (tempPort > 0) { - gConfigNetwork.DefaultPort = tempPort; - ConfigSaveDefault(); + Config::Get().network.DefaultPort = tempPort; + Config::Save(); } WidgetInvalidate(*this, WIDX_PORT_INPUT); @@ -195,8 +195,8 @@ static Widget _windowServerStartWidgets[] = { // Don't allow empty server names if (_name[0] != '\0') { - gConfigNetwork.ServerName = _name; - ConfigSaveDefault(); + Config::Get().network.ServerName = _name; + Config::Save(); } WidgetInvalidate(*this, WIDX_NAME_INPUT); @@ -206,8 +206,8 @@ static Widget _windowServerStartWidgets[] = { return; SafeStrCpy(_description, temp.c_str(), sizeof(_description)); - gConfigNetwork.ServerDescription = _description; - ConfigSaveDefault(); + Config::Get().network.ServerDescription = _description; + Config::Save(); WidgetInvalidate(*this, WIDX_DESCRIPTION_INPUT); break; @@ -216,8 +216,8 @@ static Widget _windowServerStartWidgets[] = { return; SafeStrCpy(_greeting, temp.c_str(), sizeof(_greeting)); - gConfigNetwork.ServerGreeting = _greeting; - ConfigSaveDefault(); + Config::Get().network.ServerGreeting = _greeting; + Config::Save(); WidgetInvalidate(*this, WIDX_GREETING_INPUT); break; @@ -266,7 +266,7 @@ static Widget _windowServerStartWidgets[] = { GameNotifyMapChange(); if (GetContext()->LoadParkFromFile(path, false, true)) { - NetworkBeginServer(gConfigNetwork.DefaultPort, gConfigNetwork.ListenAddress); + NetworkBeginServer(Config::Get().network.DefaultPort, Config::Get().network.ListenAddress); } } @@ -276,7 +276,7 @@ static Widget _windowServerStartWidgets[] = { { GameNotifyMapChange(); GetContext()->LoadParkFromFile(path); - NetworkBeginServer(gConfigNetwork.DefaultPort, gConfigNetwork.ListenAddress); + NetworkBeginServer(Config::Get().network.DefaultPort, Config::Get().network.ListenAddress); } } }; diff --git a/src/openrct2-ui/windows/ShortcutKeys.cpp b/src/openrct2-ui/windows/ShortcutKeys.cpp index cc9f3d7339..ca356659ca 100644 --- a/src/openrct2-ui/windows/ShortcutKeys.cpp +++ b/src/openrct2-ui/windows/ShortcutKeys.cpp @@ -10,6 +10,7 @@ #include "../input/ShortcutManager.h" #include "Window.h" +#include #include #include #include @@ -263,7 +264,7 @@ static Widget window_shortcut_change_widgets[] = { ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - auto h = static_cast(_list.size() * SCROLLABLE_ROW_HEIGHT); + auto h = static_cast(_list.size() * kScrollableRowHeight); auto bottom = std::max(0, h - widgets[WIDX_SCROLL].bottom + widgets[WIDX_SCROLL].top + 21); if (bottom < scrolls[0].v_top) { @@ -275,7 +276,7 @@ static Widget window_shortcut_change_widgets[] = { void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - auto index = static_cast((screenCoords.y - 1) / SCROLLABLE_ROW_HEIGHT); + auto index = static_cast((screenCoords.y - 1) / kScrollableRowHeight); if (static_cast(index) < _list.size()) { _highlightedItem = index; @@ -289,7 +290,7 @@ static Widget window_shortcut_change_widgets[] = { void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - auto selectedItem = static_cast((screenCoords.y - 1) / SCROLLABLE_ROW_HEIGHT); + auto selectedItem = static_cast((screenCoords.y - 1) / kScrollableRowHeight); if (selectedItem < _list.size()) { // Is this a separator? @@ -306,7 +307,7 @@ static Widget window_shortcut_change_widgets[] = { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; GfxFillRect( dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, - ColourMapA[colours[1]].mid_light); + ColourMapA[colours[1].colour].mid_light); // TODO: the line below is a workaround for what is presumably a bug with dpi->width // see https://github.com/OpenRCT2/OpenRCT2/issues/11238 for details @@ -314,13 +315,13 @@ static Widget window_shortcut_change_widgets[] = { for (size_t i = 0; i < _list.size(); ++i) { - auto y = static_cast(1 + i * SCROLLABLE_ROW_HEIGHT); + auto y = static_cast(1 + i * kScrollableRowHeight); if (y > dpi.y + dpi.height) { break; } - if (y + SCROLLABLE_ROW_HEIGHT < dpi.y) + if (y + kScrollableRowHeight < dpi.y) { continue; } @@ -504,9 +505,9 @@ static Widget window_shortcut_change_widgets[] = { void DrawSeparator(DrawPixelInfo& dpi, int32_t y, int32_t scrollWidth) { - const int32_t top = y + (SCROLLABLE_ROW_HEIGHT / 2) - 1; - GfxFillRect(dpi, { { 0, top }, { scrollWidth, top } }, ColourMapA[colours[0]].mid_dark); - GfxFillRect(dpi, { { 0, top + 1 }, { scrollWidth, top + 1 } }, ColourMapA[colours[0]].lightest); + const int32_t top = y + (kScrollableRowHeight / 2) - 1; + GfxFillRect(dpi, { { 0, top }, { scrollWidth, top } }, ColourMapA[colours[0].colour].mid_dark); + GfxFillRect(dpi, { { 0, top + 1 }, { scrollWidth, top + 1 } }, ColourMapA[colours[0].colour].lightest); } void DrawItem( @@ -516,7 +517,7 @@ static Widget window_shortcut_change_widgets[] = { if (isHighlighted) { format = STR_WINDOW_COLOUR_2_STRINGID; - GfxFilterRect(dpi, { 0, y - 1, scrollWidth, y + (SCROLLABLE_ROW_HEIGHT - 2) }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(dpi, { 0, y - 1, scrollWidth, y + (kScrollableRowHeight - 2) }, FilterPaletteID::PaletteDarken1); } auto bindingOffset = (scrollWidth * 2) / 3; diff --git a/src/openrct2-ui/windows/Sign.cpp b/src/openrct2-ui/windows/Sign.cpp index 5e21545df7..c79839ada3 100644 --- a/src/openrct2-ui/windows/Sign.cpp +++ b/src/openrct2-ui/windows/Sign.cpp @@ -7,6 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include @@ -18,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include + namespace OpenRCT2::Ui::Windows { static constexpr StringId WINDOW_TITLE = STR_SIGN; @@ -47,11 +49,11 @@ enum WindowSignWidgetIdx { // 0x9AEE00 static Widget _signWidgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget({ 3, 17}, {85, 60}, WindowWidgetType::Viewport, WindowColour::Secondary, STR_VIEWPORT ), // Viewport + MakeWidget({ 3, 17}, {85, 60}, WindowWidgetType::Viewport, WindowColour::Secondary ), // Viewport MakeWidget({WW - 25, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RENAME), STR_CHANGE_SIGN_TEXT_TIP ), // change sign button MakeWidget({WW - 25, 67}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_DEMOLISH_SIGN_TIP ), // demolish button - MakeWidget({ 5, WH - 16}, {12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_MAIN_SIGN_COLOUR_TIP), // Main colour - MakeWidget({ 17, WH - 16}, {12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_TEXT_COLOUR_TIP ), // Text colour + MakeWidget({ 5, WH - 16}, {12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, kWidgetContentEmpty, STR_SELECT_MAIN_SIGN_COLOUR_TIP), // Main colour + MakeWidget({ 17, WH - 16}, {12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, kWidgetContentEmpty, STR_SELECT_TEXT_COLOUR_TIP ), // Text colour kWidgetsEnd, }; @@ -139,7 +141,7 @@ static Widget _signWidgets[] = { this, windowPos + ScreenCoordsXY{ viewportWidget.left + 1, viewportWidget.top + 1 }, viewportWidget.width() - 1, viewportWidget.height() - 1, Focus(CoordsXYZ{ signViewPosition, viewZ })); - viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; + viewport->flags = Config::Get().general.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; Invalidate(); return true; @@ -195,10 +197,10 @@ static Widget _signWidgets[] = { switch (widgetIndex) { case WIDX_MAIN_COLOUR: - WindowDropdownShowColour(this, widget, TRANSLUCENT(colours[1]), static_cast(_mainColour)); + WindowDropdownShowColour(this, widget, colours[1].withFlag(ColourFlag::translucent, true), _mainColour); break; case WIDX_TEXT_COLOUR: - WindowDropdownShowColour(this, widget, TRANSLUCENT(colours[1]), static_cast(_textColour)); + WindowDropdownShowColour(this, widget, colours[1].withFlag(ColourFlag::translucent, true), _textColour); break; } } @@ -317,7 +319,7 @@ static Widget _signWidgets[] = { this, windowPos + ScreenCoordsXY{ viewportWidget->left + 1, viewportWidget->top + 1 }, viewportWidget->width() - 1, viewportWidget->height() - 1, Focus(CoordsXYZ{ signViewPos })); if (viewport != nullptr) - viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; + viewport->flags = Config::Get().general.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; Invalidate(); } diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index f9eceef08e..a4e4d1a6d2 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -822,14 +822,22 @@ static Widget _staffOptionsWidgets[] = { switch (staff->AssignedStaffType) { case StaffType::Entertainer: + { widgets[WIDX_CHECKBOX_1].type = WindowWidgetType::Empty; widgets[WIDX_CHECKBOX_2].type = WindowWidgetType::Empty; widgets[WIDX_CHECKBOX_3].type = WindowWidgetType::Empty; widgets[WIDX_CHECKBOX_4].type = WindowWidgetType::Empty; widgets[WIDX_COSTUME_BOX].type = WindowWidgetType::DropdownMenu; widgets[WIDX_COSTUME_BTN].type = WindowWidgetType::Button; - widgets[WIDX_COSTUME_BOX].text = StaffCostumeNames[EnumValue(staff->SpriteType) - 4]; + + // TODO: retrieve string from object instead + auto costumeType = EnumValue(staff->SpriteType) - EnumValue(PeepSpriteType::EntertainerPanda); + if (costumeType >= 0) + widgets[WIDX_COSTUME_BOX].text = StaffCostumeNames[costumeType]; + else + widgets[WIDX_COSTUME_BOX].text = STR_UNKNOWN_OBJECT_TYPE; break; + } case StaffType::Handyman: widgets[WIDX_CHECKBOX_1].type = WindowWidgetType::Checkbox; widgets[WIDX_CHECKBOX_1].text = STR_STAFF_OPTION_SWEEP_FOOTPATHS; @@ -1157,7 +1165,7 @@ static Widget _staffOptionsWidgets[] = { else { viewport_flags = 0; - if (gConfigGeneral.AlwaysShowGridlines) + if (Config::Get().general.AlwaysShowGridlines) viewport_flags |= VIEWPORT_FLAG_GRIDLINES; } diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 33aa616c1b..cc0d6a7d5a 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -323,7 +323,7 @@ static Widget _staffListWidgets[] = { Invalidate(); } - auto scrollHeight = static_cast(_staffList.size()) * SCROLLABLE_ROW_HEIGHT; + auto scrollHeight = static_cast(_staffList.size()) * kScrollableRowHeight; auto i = scrollHeight - widgets[WIDX_STAFF_LIST_LIST].bottom + widgets[WIDX_STAFF_LIST_LIST].top + 21; if (i < 0) i = 0; @@ -339,7 +339,7 @@ static Widget _staffListWidgets[] = { void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - auto i = static_cast(screenCoords.y / SCROLLABLE_ROW_HEIGHT); + auto i = static_cast(screenCoords.y / kScrollableRowHeight); if (i != _highlightedIndex) { _highlightedIndex = static_cast(i); @@ -349,7 +349,7 @@ static Widget _staffListWidgets[] = { void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - int32_t i = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + int32_t i = screenCoords.y / kScrollableRowHeight; for (const auto& entry : _staffList) { if (i == 0) @@ -381,7 +381,7 @@ static Widget _staffListWidgets[] = { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; GfxFillRect( dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, - ColourMapA[colours[1]].mid_light); + ColourMapA[colours[1].colour].mid_light); // How much space do we have for the name and action columns? (Discount scroll area and icons.) const int32_t nonIconSpace = widgets[WIDX_STAFF_LIST_LIST].width() - 15 - 68; @@ -405,12 +405,18 @@ static Widget _staffListWidgets[] = { { continue; } - int32_t format = (_quickFireMode ? STR_RED_STRINGID : STR_BLACK_STRING); + + StringId format = STR_BLACK_STRING; + if (_quickFireMode) + format = STR_RED_STRINGID; if (i == _highlightedIndex) { - GfxFilterRect(dpi, { 0, y, 800, y + (SCROLLABLE_ROW_HEIGHT - 1) }, FilterPaletteID::PaletteDarken1); - format = (_quickFireMode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID); + GfxFilterRect(dpi, { 0, y, 800, y + (kScrollableRowHeight - 1) }, FilterPaletteID::PaletteDarken1); + + format = STR_WINDOW_COLOUR_2_STRINGID; + if (_quickFireMode) + format = STR_LIGHTPINK_STRINGID; } auto ft = Formatter(); @@ -451,7 +457,7 @@ static Widget _staffListWidgets[] = { } } - y += SCROLLABLE_ROW_HEIGHT; + y += kScrollableRowHeight; i++; } } @@ -517,7 +523,7 @@ static Widget _staffListWidgets[] = { */ void HireNewMember(StaffType staffType, EntertainerCostume entertainerType) { - bool autoPosition = gConfigGeneral.AutoStaffPlacement; + bool autoPosition = Config::Get().general.AutoStaffPlacement; if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_SHIFT_Z) { autoPosition = autoPosition ^ 1; @@ -528,7 +534,7 @@ static Widget _staffListWidgets[] = { if (staffType == StaffType::Handyman) { staffOrders = STAFF_ORDERS_SWEEPING | STAFF_ORDERS_WATER_FLOWERS | STAFF_ORDERS_EMPTY_BINS; - if (gConfigGeneral.HandymenMowByDefault) + if (Config::Get().general.HandymenMowByDefault) { staffOrders |= STAFF_ORDERS_MOWING; } @@ -723,7 +729,6 @@ static Widget _staffListWidgets[] = { { switch (type) { - default: case PeepSpriteType::EntertainerPanda: return SPR_STAFF_COSTUME_PANDA; case PeepSpriteType::EntertainerTiger: @@ -746,6 +751,9 @@ static Widget _staffListWidgets[] = { return SPR_STAFF_COSTUME_SHERIFF; case PeepSpriteType::EntertainerPirate: return SPR_STAFF_COSTUME_PIRATE; + case PeepSpriteType::Normal: + default: + return SPR_PEEP_SMALL_FACE_HAPPY; } } }; diff --git a/src/openrct2-ui/windows/TextInput.cpp b/src/openrct2-ui/windows/TextInput.cpp index 43e61be79f..4730a1b6ad 100644 --- a/src/openrct2-ui/windows/TextInput.cpp +++ b/src/openrct2-ui/windows/TextInput.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -267,7 +266,7 @@ namespace OpenRCT2::Ui::Windows if (_cursorBlink > 15) { - uint8_t colour = ColourMapA[colours[1]].mid_light; + uint8_t colour = ColourMapA[colours[1].colour].mid_light; // TODO: palette index addition GfxFillRect( dpi, { { cursorX, screenCoords.y + 9 }, { cursorX + textWidth, screenCoords.y + 9 } }, colour + 5); diff --git a/src/openrct2-ui/windows/Themes.cpp b/src/openrct2-ui/windows/Themes.cpp index 52958a812c..bef54652d2 100644 --- a/src/openrct2-ui/windows/Themes.cpp +++ b/src/openrct2-ui/windows/Themes.cpp @@ -15,8 +15,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -219,6 +218,7 @@ static WindowClass window_themes_tab_7_classes[] = { WindowClass::FirePrompt, WindowClass::TrackDeletePrompt, WindowClass::LoadsaveOverwritePrompt, + WindowClass::ProgressWindow, WindowClass::NetworkStatus, }; // clang-format on @@ -613,11 +613,11 @@ static WindowClass window_themes_tab_7_classes[] = { case WIDX_THEMES_LIST: if (selectedIndex != -1) { - const auto newColour = ThemeOverrideExtendedColour(ColourDropDownIndexToColour(selectedIndex)); + ColourWithFlags newColour = { ColourDropDownIndexToColour(selectedIndex) }; WindowClass wc = GetWindowClassTabIndex(_colour_index_1); - uint8_t colour = ThemeGetColour(wc, _colour_index_2); - colour = (colour & COLOUR_FLAG_TRANSLUCENT) | newColour; - ThemeSetColour(wc, _colour_index_2, colour); + auto oldColour = ThemeGetColour(wc, _colour_index_2); + newColour.flags = oldColour.flags; + ThemeSetColour(wc, _colour_index_2, newColour); ColourSchemeUpdateAll(); WindowInvalidateAll(); _colour_index_1 = -1; @@ -716,8 +716,9 @@ static WindowClass window_themes_tab_7_classes[] = { widgets[WIDX_THEMES_COLOURBTN_MASK].right = widgets[WIDX_THEMES_COLOURBTN_MASK].left + 12; widgets[WIDX_THEMES_COLOURBTN_MASK].bottom = widgets[WIDX_THEMES_COLOURBTN_MASK].top + 12; - uint8_t colour = ThemeGetColour(wc, _colour_index_2); - WindowDropdownShowColour(this, &(widgets[WIDX_THEMES_COLOURBTN_MASK]), colours[1], colour); + auto colour = ThemeGetColour(wc, _colour_index_2); + WindowDropdownShowColour( + this, &(widgets[WIDX_THEMES_COLOURBTN_MASK]), colours[1], colour.colour, true); WidgetInvalidate(*this, WIDX_THEMES_LIST); } } @@ -731,15 +732,8 @@ static WindowClass window_themes_tab_7_classes[] = { } else { - uint8_t colour = ThemeGetColour(wc, _colour_index_2); - if (colour & COLOUR_FLAG_TRANSLUCENT) - { - colour &= ~COLOUR_FLAG_TRANSLUCENT; - } - else - { - colour |= COLOUR_FLAG_TRANSLUCENT; - } + auto colour = ThemeGetColour(wc, _colour_index_2); + colour.setFlag(ColourFlag::translucent, !colour.hasFlag(ColourFlag::translucent)); ThemeSetColour(wc, _colour_index_2, colour); ColourSchemeUpdateAll(); WindowInvalidateAll(); @@ -756,10 +750,10 @@ static WindowClass window_themes_tab_7_classes[] = { if (_selected_tab == WINDOW_THEMES_TAB_SETTINGS || _selected_tab == WINDOW_THEMES_TAB_FEATURES) return; - if ((colours[1] & 0x80) == 0) + if (!colours[1].hasFlag(ColourFlag::translucent)) // GfxFillRect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, - // ColourMapA[colours[1]].mid_light); - GfxClear(dpi, ColourMapA[colours[1]].mid_light); + // ColourMapA[colours[1].colour].mid_light); + GfxClear(dpi, ColourMapA[colours[1].colour].mid_light); screenCoords.y = 0; for (int32_t i = 0; i < GetColourSchemeTabCount(); i++) { @@ -771,26 +765,26 @@ static WindowClass window_themes_tab_7_classes[] = { { if (i + 1 < GetColourSchemeTabCount()) { - int32_t colour = colours[1]; + auto colour = colours[1]; auto leftTop = ScreenCoordsXY{ 0, screenCoords.y + _row_height - 2 }; auto rightBottom = ScreenCoordsXY{ widgets[WIDX_THEMES_LIST].right, screenCoords.y + _row_height - 2 }; auto yPixelOffset = ScreenCoordsXY{ 0, 1 }; - if (colour & COLOUR_FLAG_TRANSLUCENT) + if (colour.hasFlag(ColourFlag::translucent)) { - TranslucentWindowPalette windowPalette = TranslucentWindowPalettes[BASE_COLOUR(colour)]; + TranslucentWindowPalette windowPalette = TranslucentWindowPalettes[colour.colour]; GfxFilterRect(dpi, { leftTop, rightBottom }, windowPalette.highlight); GfxFilterRect(dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, windowPalette.shadow); } else { - colour = ColourMapA[colours[1]].mid_dark; - GfxFillRect(dpi, { leftTop, rightBottom }, colour); + colour = ColourMapA[colours[1].colour].mid_dark; + GfxFillRect(dpi, { leftTop, rightBottom }, colour.colour); - colour = ColourMapA[colours[1]].lightest; - GfxFillRect(dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, colour); + colour = ColourMapA[colours[1].colour].lightest; + GfxFillRect(dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, colour.colour); } } @@ -800,20 +794,19 @@ static WindowClass window_themes_tab_7_classes[] = { { DrawTextBasic(dpi, { 2, screenCoords.y + 4 }, ThemeDescGetName(wc), {}, { colours[1] }); - uint8_t colour = ThemeGetColour(wc, j); + auto colour = ThemeGetColour(wc, j); const bool isPressed = (i == _colour_index_1 && j == _colour_index_2); - auto image = ImageId( - isPressed ? SPR_PALETTE_BTN_PRESSED : SPR_PALETTE_BTN, colour & ~COLOUR_FLAG_TRANSLUCENT); + auto image = ImageId(isPressed ? SPR_PALETTE_BTN_PRESSED : SPR_PALETTE_BTN, colour.colour); GfxDrawSprite(dpi, image, { _button_offset_x + 12 * j, screenCoords.y + _button_offset_y }); ScreenCoordsXY topLeft{ _button_offset_x + 12 * j, screenCoords.y + _check_offset_y }; ScreenCoordsXY bottomRight{ _button_offset_x + 12 * j + 9, screenCoords.y + _check_offset_y + 10 }; GfxFillRectInset(dpi, { topLeft, bottomRight }, colours[1], INSET_RECT_F_E0); - if (colour & COLOUR_FLAG_TRANSLUCENT) + if (colour.hasFlag(ColourFlag::translucent)) { - GfxDrawString( - dpi, topLeft, static_cast(CheckBoxMarkString), - { static_cast(colours[1] & 0x7F), FontStyle::Medium, TextDarkness::Dark }); + DrawText( + dpi, topLeft, { colours[1].colour, FontStyle::Medium, TextDarkness::Dark }, + static_cast(CheckBoxMarkString)); } } } diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 84eb33b92e..3101e7deae 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -7,6 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../UiStringIds.h" + #include #include #include @@ -18,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -40,6 +41,7 @@ #include #include #include +#include namespace OpenRCT2::Ui::Windows { @@ -993,7 +995,7 @@ static uint64_t PageDisabledWidgets[] = { ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - return ScreenSize(WW - 30, windowTileInspectorElementCount * SCROLLABLE_ROW_HEIGHT); + return ScreenSize(WW - 30, windowTileInspectorElementCount * kScrollableRowHeight); } void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override @@ -1003,7 +1005,7 @@ static uint64_t PageDisabledWidgets[] = { return; // Because the list items are displayed in reverse order, subtract the calculated index from the amount of elements - const int16_t index = windowTileInspectorElementCount - (screenCoords.y - 1) / SCROLLABLE_ROW_HEIGHT - 1; + const int16_t index = windowTileInspectorElementCount - (screenCoords.y - 1) / kScrollableRowHeight - 1; const ScreenRect checkboxColumnRect{ { 2, 0 }, { 15, screenCoords.y } }; if (index >= 0 && checkboxColumnRect.Contains(screenCoords)) { // Checkbox was clicked @@ -1017,7 +1019,7 @@ static uint64_t PageDisabledWidgets[] = { void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - int16_t index = windowTileInspectorElementCount - (screenCoords.y - 1) / SCROLLABLE_ROW_HEIGHT - 1; + int16_t index = windowTileInspectorElementCount - (screenCoords.y - 1) / kScrollableRowHeight - 1; if (index < 0 || index >= windowTileInspectorElementCount) _highlightedIndex = -1; else @@ -1031,8 +1033,8 @@ static uint64_t PageDisabledWidgets[] = { ScreenCoordsXY screenCoords(windowPos.x, windowPos.y); // Draw coordinates - GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 24), "X:", { colours[1] }); - GfxDrawString(dpi, screenCoords + ScreenCoordsXY(74, 24), "Y:", { colours[1] }); + DrawText(dpi, screenCoords + ScreenCoordsXY(5, 24), { colours[1] }, "X:"); + DrawText(dpi, screenCoords + ScreenCoordsXY(74, 24), { colours[1] }, "Y:"); if (_tileSelected) { auto tileCoords = TileCoordsXY{ _toolMap }; @@ -1048,8 +1050,8 @@ static uint64_t PageDisabledWidgets[] = { } else { - GfxDrawString(dpi, screenCoords + ScreenCoordsXY(43 - 7, 24), "-", { colours[1] }); - GfxDrawString(dpi, screenCoords + ScreenCoordsXY(113 - 7, 24), "-", { colours[1] }); + DrawText(dpi, screenCoords + ScreenCoordsXY(43 - 7, 24), { colours[1] }, "-"); + DrawText(dpi, screenCoords + ScreenCoordsXY(113 - 7, 24), { colours[1] }, "-"); } if (windowTileInspectorSelectedIndex != -1) @@ -1466,10 +1468,10 @@ static uint64_t PageDisabledWidgets[] = { DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_WALL_ANIMATION_FRAME, {}, { colours[1] }); // Current animation frame - colour_t colour = colours[1]; + auto colour = colours[1]; if (IsWidgetDisabled(WIDX_WALL_SPINNER_ANIMATION_FRAME)) { - colour = colours[0] | COLOUR_FLAG_INSET; + colour = colours[0].withFlag(ColourFlag::inset, true); } screenCoords.x = windowPos.x + widgets[WIDX_WALL_SPINNER_ANIMATION_FRAME].left + 3; ft = Formatter(); @@ -1569,7 +1571,8 @@ static uint64_t PageDisabledWidgets[] = { { const int32_t listWidth = widgets[WIDX_LIST].width(); GfxFillRect( - dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); + dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, + ColourMapA[colours[1].colour].mid_light); // Show usage hint when nothing is selected if (!_tileSelected) @@ -1584,7 +1587,7 @@ static uint64_t PageDisabledWidgets[] = { } ScreenCoordsXY screenCoords{}; - screenCoords.y = SCROLLABLE_ROW_HEIGHT * (windowTileInspectorElementCount - 1); + screenCoords.y = kScrollableRowHeight * (windowTileInspectorElementCount - 1); int32_t i = 0; char buffer[256]; @@ -1601,16 +1604,19 @@ static uint64_t PageDisabledWidgets[] = { // Draw row background colour auto fillRectangle = ScreenRect{ { 0, screenCoords.y }, - { listWidth, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } }; + { listWidth, screenCoords.y + kScrollableRowHeight - 1 } }; if (selectedRow) - GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); + GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1].colour].mid_dark); else if (hoveredRow) - GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1]].mid_dark | 0x1000000); + GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1].colour].mid_dark | 0x1000000); // Zebra stripes else if (((windowTileInspectorElementCount - i) & 1) == 0) - GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1]].light | 0x1000000); + GfxFillRect(dpi, fillRectangle, ColourMapA[colours[1].colour].light | 0x1000000); + + StringId stringFormat = STR_WINDOW_COLOUR_2_STRINGID; + if (selectedRow || hoveredRow) + stringFormat = STR_WHITE_STRING; - const StringId stringFormat = (selectedRow || hoveredRow) ? STR_WHITE_STRING : STR_WINDOW_COLOUR_2_STRINGID; auto checkboxFormatter = Formatter(); checkboxFormatter.Add(STR_STRING); checkboxFormatter.Add(CheckBoxMarkString); @@ -1718,7 +1724,7 @@ static uint64_t PageDisabledWidgets[] = { if (last) DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ LastFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); - screenCoords.y -= SCROLLABLE_ROW_HEIGHT; + screenCoords.y -= kScrollableRowHeight; i++; } while (!(tileElement++)->IsLastForTile()); } @@ -2177,7 +2183,7 @@ static uint64_t PageDisabledWidgets[] = { WIDX_SURFACE_CHECK_CORNER_W, tileElement->AsSurface()->GetSlope() & (1 << ((1 - GetCurrentRotation()) & 3))); SetCheckboxValue( - WIDX_SURFACE_CHECK_DIAGONAL, tileElement->AsSurface()->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT); + WIDX_SURFACE_CHECK_DIAGONAL, tileElement->AsSurface()->GetSlope() & kTileSlopeDiagonalFlag); break; case TileElementType::Path: diff --git a/src/openrct2-ui/windows/TitleExit.cpp b/src/openrct2-ui/windows/TitleExit.cpp index 8f08fe9280..9c70018115 100644 --- a/src/openrct2-ui/windows/TitleExit.cpp +++ b/src/openrct2-ui/windows/TitleExit.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/src/openrct2-ui/windows/TitleLogo.cpp b/src/openrct2-ui/windows/TitleLogo.cpp index 16bd5bb8cd..f2709a69c1 100644 --- a/src/openrct2-ui/windows/TitleLogo.cpp +++ b/src/openrct2-ui/windows/TitleLogo.cpp @@ -40,9 +40,9 @@ namespace OpenRCT2::Ui::Windows { widgets = _titleLogoWidgets; WindowInitScrollWidgets(*this); - colours[0] = TRANSLUCENT(COLOUR_GREY); - colours[1] = TRANSLUCENT(COLOUR_GREY); - colours[2] = TRANSLUCENT(COLOUR_GREY); + colours[0] = ColourWithFlags{ COLOUR_GREY }.withFlag(ColourFlag::translucent, true); + colours[1] = ColourWithFlags{ COLOUR_GREY }.withFlag(ColourFlag::translucent, true); + colours[2] = ColourWithFlags{ COLOUR_GREY }.withFlag(ColourFlag::translucent, true); } void OnMouseUp(WidgetIndex widgetIndex) override diff --git a/src/openrct2-ui/windows/TitleMenu.cpp b/src/openrct2-ui/windows/TitleMenu.cpp index e506ac4cf1..4dc075b6b6 100644 --- a/src/openrct2-ui/windows/TitleMenu.cpp +++ b/src/openrct2-ui/windows/TitleMenu.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -113,7 +112,7 @@ static Widget _titleMenuWidgets[] = { width = x; widgets[WIDX_NEW_VERSION].right = width; windowPos.x = (ContextGetWidth() - width) / 2; - colours[1] = TRANSLUCENT(COLOUR_LIGHT_ORANGE); + colours[1] = ColourWithFlags{ COLOUR_LIGHT_ORANGE }.withFlag(ColourFlag::translucent, true); InitScrollWidgets(); } @@ -215,7 +214,7 @@ static Widget _titleMenuWidgets[] = { WindowDropdownShowText( windowPos + ScreenCoordsXY{ widget->left, widget->top + yOffset }, widget->height() + 1, - TRANSLUCENT(colours[0]), Dropdown::Flag::StayOpen, i); + colours[0].withFlag(ColourFlag::translucent, true), Dropdown::Flag::StayOpen, i); } } diff --git a/src/openrct2-ui/windows/TitleOptions.cpp b/src/openrct2-ui/windows/TitleOptions.cpp index cbde63d877..9693256075 100644 --- a/src/openrct2-ui/windows/TitleOptions.cpp +++ b/src/openrct2-ui/windows/TitleOptions.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Tooltip.cpp b/src/openrct2-ui/windows/Tooltip.cpp index b9bd764502..8417ba037b 100644 --- a/src/openrct2-ui/windows/Tooltip.cpp +++ b/src/openrct2-ui/windows/Tooltip.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include #include #include #include diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index b5f4492d07..2cf2689c76 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -122,13 +122,13 @@ namespace OpenRCT2::Ui::Windows DDIDX_SAVE_GAME = 3, DDIDX_SAVE_GAME_AS = 4, // separator - DDIDX_ABOUT = 6, - DDIDX_OPTIONS = 7, - DDIDX_SCREENSHOT = 8, - DDIDX_GIANT_SCREENSHOT = 9, + DDIDX_SCREENSHOT = 6, + DDIDX_GIANT_SCREENSHOT = 7, // separator - DDIDX_FILE_BUG_ON_GITHUB = 11, - DDIDX_UPDATE_AVAILABLE = 12, + DDIDX_ABOUT = 9, + DDIDX_FILE_BUG_ON_GITHUB = 10, + DDIDX_UPDATE_AVAILABLE = 11, + DDIDX_OPTIONS = 12, // separator DDIDX_QUIT_TO_MENU = 14, DDIDX_EXIT_OPENRCT2 = 15, @@ -209,78 +209,89 @@ namespace OpenRCT2::Ui::Windows #pragma region Toolbar_widget_ordering // clang-format off -// from left to right -static constexpr int32_t left_aligned_widgets_order[] = { - WIDX_PAUSE, - WIDX_FASTFORWARD, - WIDX_FILE_MENU, - WIDX_MUTE, - WIDX_NETWORK, - WIDX_CHAT, - WIDX_CHEATS, - WIDX_DEBUG, + static constexpr std::array kWidgetOrderLeftGroup = { + WIDX_PAUSE, + WIDX_FASTFORWARD, + WIDX_FILE_MENU, + WIDX_MUTE, + WIDX_NETWORK, + WIDX_CHAT, + WIDX_CHEATS, + WIDX_DEBUG, - WIDX_SEPARATOR, + WIDX_SEPARATOR, - WIDX_ZOOM_OUT, - WIDX_ZOOM_IN, - WIDX_ROTATE, - WIDX_VIEW_MENU, - WIDX_MAP, -}; + WIDX_ZOOM_OUT, + WIDX_ZOOM_IN, + WIDX_ROTATE, + WIDX_VIEW_MENU, + WIDX_MAP, + }; -// from right to left -static constexpr int32_t right_aligned_widgets_order[] = { - WIDX_NEWS, - WIDX_GUESTS, - WIDX_STAFF, - WIDX_PARK, - WIDX_RIDES, - WIDX_RESEARCH, - WIDX_FINANCES, + static constexpr std::array kWidgetOrderRightGroup = { + WIDX_CLEAR_SCENERY, + WIDX_LAND, + WIDX_WATER, + WIDX_SCENERY, + WIDX_PATH, + WIDX_CONSTRUCT_RIDE, - WIDX_SEPARATOR, + WIDX_SEPARATOR, - WIDX_CONSTRUCT_RIDE, - WIDX_PATH, - WIDX_SCENERY, - WIDX_WATER, - WIDX_LAND, - WIDX_CLEAR_SCENERY, -}; + WIDX_FINANCES, + WIDX_RESEARCH, + WIDX_RIDES, + WIDX_PARK, + WIDX_STAFF, + WIDX_GUESTS, + WIDX_NEWS, + }; + + static constexpr size_t _totalToolbarElements = kWidgetOrderLeftGroup.size() + kWidgetOrderRightGroup.size(); + + // Make a combined version of both halves of the toolbar, with a separator halfway. + static constexpr std::array kWidgetOrderCombined = []() { + std::array combined; + + auto halfWayPoint = std::copy(kWidgetOrderLeftGroup.begin(), kWidgetOrderLeftGroup.end(), combined.begin()); + *halfWayPoint = WIDX_SEPARATOR; + std::copy(kWidgetOrderRightGroup.begin(), kWidgetOrderRightGroup.end(), halfWayPoint + 1); + + return combined; + }(); #pragma endregion -static Widget _topToolbarWidgets[] = { - MakeRemapWidget({ 0, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TOOLBAR_PAUSE, STR_PAUSE_GAME_TIP ), // Pause - MakeRemapWidget({ 60, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TOOLBAR_FILE, STR_DISC_AND_GAME_OPTIONS_TIP ), // File menu - MakeRemapWidget({250, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_G2_TOOLBAR_MUTE, STR_TOOLBAR_MUTE_TIP ), // Mute - MakeRemapWidget({100, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_ZOOM_OUT, STR_ZOOM_OUT_TIP ), // Zoom out - MakeRemapWidget({130, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_ZOOM_IN, STR_ZOOM_IN_TIP ), // Zoom in - MakeRemapWidget({160, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_ROTATE, STR_ROTATE_TIP ), // Rotate camera - MakeRemapWidget({190, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_VIEW, STR_VIEW_OPTIONS_TIP ), // Transparency menu - MakeRemapWidget({220, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_MAP, STR_SHOW_MAP_TIP ), // Map - MakeRemapWidget({267, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_LAND, STR_ADJUST_LAND_TIP ), // Land - MakeRemapWidget({297, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_WATER, STR_ADJUST_WATER_TIP ), // Water - MakeRemapWidget({327, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_SCENERY, STR_PLACE_SCENERY_TIP ), // Scenery - MakeRemapWidget({357, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_FOOTPATH, STR_BUILD_FOOTPATH_TIP ), // Path - MakeRemapWidget({387, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_CONSTRUCT_RIDE, STR_BUILD_RIDE_TIP ), // Construct ride - MakeRemapWidget({490, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TOOLBAR_RIDES, STR_RIDES_IN_PARK_TIP ), // Rides - MakeRemapWidget({520, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TOOLBAR_PARK, STR_PARK_INFORMATION_TIP ), // Park - MakeRemapWidget({550, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TAB_TOOLBAR, STR_STAFF_TIP ), // Staff - MakeRemapWidget({560, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TOOLBAR_GUESTS, STR_GUESTS_TIP ), // Guests - MakeRemapWidget({560, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_CLEAR_SCENERY, STR_CLEAR_SCENERY_TIP ), // Clear scenery - MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TAB_TOOLBAR, STR_GAME_SPEED_TIP ), // Fast forward - MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TAB_TOOLBAR, STR_CHEATS_TIP ), // Cheats - MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TAB_TOOLBAR, STR_DEBUG_TIP ), // Debug - MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TAB_TOOLBAR, STR_SCENARIO_OPTIONS_FINANCIAL_TIP), // Finances - MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TAB_TOOLBAR, STR_FINANCES_RESEARCH_TIP ), // Research - MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TAB_TOOLBAR, STR_SHOW_RECENT_MESSAGES_TIP ), // News - MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_G2_TOOLBAR_MULTIPLAYER, STR_SHOW_MULTIPLAYER_STATUS_TIP ), // Network - MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TAB_TOOLBAR, STR_TOOLBAR_CHAT_TIP ), // Chat - MakeWidget ({ 0, 0}, {10, 1}, WindowWidgetType::Empty, WindowColour::Primary ), // Artificial widget separator - kWidgetsEnd, -}; + static Widget _topToolbarWidgets[] = { + MakeRemapWidget({ 0, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TOOLBAR_PAUSE, STR_PAUSE_GAME_TIP ), // Pause + MakeRemapWidget({ 60, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TOOLBAR_FILE, STR_DISC_AND_GAME_OPTIONS_TIP ), // File menu + MakeRemapWidget({250, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_G2_TOOLBAR_MUTE, STR_TOOLBAR_MUTE_TIP ), // Mute + MakeRemapWidget({100, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_ZOOM_OUT, STR_ZOOM_OUT_TIP ), // Zoom out + MakeRemapWidget({130, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_ZOOM_IN, STR_ZOOM_IN_TIP ), // Zoom in + MakeRemapWidget({160, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_ROTATE, STR_ROTATE_TIP ), // Rotate camera + MakeRemapWidget({190, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_VIEW, STR_VIEW_OPTIONS_TIP ), // Transparency menu + MakeRemapWidget({220, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Secondary , SPR_TOOLBAR_MAP, STR_SHOW_MAP_TIP ), // Map + MakeRemapWidget({267, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_LAND, STR_ADJUST_LAND_TIP ), // Land + MakeRemapWidget({297, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_WATER, STR_ADJUST_WATER_TIP ), // Water + MakeRemapWidget({327, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_SCENERY, STR_PLACE_SCENERY_TIP ), // Scenery + MakeRemapWidget({357, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_FOOTPATH, STR_BUILD_FOOTPATH_TIP ), // Path + MakeRemapWidget({387, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_CONSTRUCT_RIDE, STR_BUILD_RIDE_TIP ), // Construct ride + MakeRemapWidget({490, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TOOLBAR_RIDES, STR_RIDES_IN_PARK_TIP ), // Rides + MakeRemapWidget({520, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TOOLBAR_PARK, STR_PARK_INFORMATION_TIP ), // Park + MakeRemapWidget({550, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TAB_TOOLBAR, STR_STAFF_TIP ), // Staff + MakeRemapWidget({560, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TOOLBAR_GUESTS, STR_GUESTS_TIP ), // Guests + MakeRemapWidget({560, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Tertiary , SPR_TOOLBAR_CLEAR_SCENERY, STR_CLEAR_SCENERY_TIP ), // Clear scenery + MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TAB_TOOLBAR, STR_GAME_SPEED_TIP ), // Fast forward + MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TAB_TOOLBAR, STR_CHEATS_TIP ), // Cheats + MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TAB_TOOLBAR, STR_DEBUG_TIP ), // Debug + MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TAB_TOOLBAR, STR_SCENARIO_OPTIONS_FINANCIAL_TIP), // Finances + MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TAB_TOOLBAR, STR_FINANCES_RESEARCH_TIP ), // Research + MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Quaternary, SPR_TAB_TOOLBAR, STR_SHOW_RECENT_MESSAGES_TIP ), // News + MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_G2_TOOLBAR_MULTIPLAYER, STR_SHOW_MULTIPLAYER_STATUS_TIP ), // Network + MakeRemapWidget({ 30, 0}, {30, kTopToolbarHeight + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TAB_TOOLBAR, STR_TOOLBAR_CHAT_TIP ), // Chat + MakeWidget ({ 0, 0}, {10, 1}, WindowWidgetType::Empty, WindowColour::Primary ), // Artificial widget separator + kWidgetsEnd, + }; // clang-format on static void ScenarioSelectCallback(const utf8* path); @@ -862,7 +873,7 @@ static Widget _topToolbarWidgets[] = { MapInvalidateSelectionRect(); MapInvalidateMapSelectionTiles(); - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorInvalidate(); } @@ -1795,7 +1806,7 @@ static Widget _topToolbarWidgets[] = { rotation -= GetCurrentRotation(); rotation &= 0x3; - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -1879,7 +1890,7 @@ static Widget _topToolbarWidgets[] = { rotation -= GetCurrentRotation(); rotation &= 0x3; - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -1913,7 +1924,7 @@ static Widget _topToolbarWidgets[] = { return; } - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2003,7 +2014,7 @@ static Widget _topToolbarWidgets[] = { if (gridPos.IsNull()) return; - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2103,7 +2114,7 @@ static Widget _topToolbarWidgets[] = { rotation -= GetCurrentRotation(); rotation &= 0x3; - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2151,7 +2162,7 @@ static Widget _topToolbarWidgets[] = { } } - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2613,9 +2624,9 @@ static Widget _topToolbarWidgets[] = { if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR) && selectedIndex > DDIDX_LOAD_GAME) selectedIndex += 1; - // Track designer and track designs manager start with About, not Load/save + // Track designer and track designs manager start with Screenshot, not Load/save if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) - selectedIndex += DDIDX_ABOUT; + selectedIndex += DDIDX_SCREENSHOT; // The "Update available" menu item is only available when there is one if (selectedIndex >= DDIDX_UPDATE_AVAILABLE && !OpenRCT2::GetContext()->HasNewVersionInfo()) @@ -2916,11 +2927,8 @@ static Widget _topToolbarWidgets[] = { } } - void OnPrepareDraw() override + void ResetWidgetToDefaultState() { - int32_t x, widgetIndex, widgetWidth, firstAlignment; - Widget* widget; - // Enable / disable buttons widgets[WIDX_PAUSE].type = WindowWidgetType::TrnBtn; widgets[WIDX_FILE_MENU].type = WindowWidgetType::TrnBtn; @@ -2945,26 +2953,30 @@ static Widget _topToolbarWidgets[] = { widgets[WIDX_RESEARCH].type = WindowWidgetType::TrnBtn; widgets[WIDX_FASTFORWARD].type = WindowWidgetType::TrnBtn; widgets[WIDX_CHEATS].type = WindowWidgetType::TrnBtn; - widgets[WIDX_DEBUG].type = gConfigGeneral.DebuggingTools ? WindowWidgetType::TrnBtn : WindowWidgetType::Empty; + widgets[WIDX_DEBUG].type = Config::Get().general.DebuggingTools ? WindowWidgetType::TrnBtn + : WindowWidgetType::Empty; widgets[WIDX_NEWS].type = WindowWidgetType::TrnBtn; widgets[WIDX_NETWORK].type = WindowWidgetType::TrnBtn; + } - if (!gConfigInterface.ToolbarShowMute) + void HideDisabledButtons() + { + if (!Config::Get().interface.ToolbarShowMute) widgets[WIDX_MUTE].type = WindowWidgetType::Empty; - if (!gConfigInterface.ToolbarShowChat) + if (!Config::Get().interface.ToolbarShowChat) widgets[WIDX_CHAT].type = WindowWidgetType::Empty; - if (!gConfigInterface.ToolbarShowResearch) + if (!Config::Get().interface.ToolbarShowResearch) widgets[WIDX_RESEARCH].type = WindowWidgetType::Empty; - if (!gConfigInterface.ToolbarShowCheats) + if (!Config::Get().interface.ToolbarShowCheats) widgets[WIDX_CHEATS].type = WindowWidgetType::Empty; - if (!gConfigInterface.ToolbarShowNews) + if (!Config::Get().interface.ToolbarShowNews) widgets[WIDX_NEWS].type = WindowWidgetType::Empty; - if (!gConfigInterface.ToolbarShowZoom) + if (!Config::Get().interface.ToolbarShowZoom) { widgets[WIDX_ZOOM_IN].type = WindowWidgetType::Empty; widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::Empty; @@ -2975,48 +2987,56 @@ static Widget _topToolbarWidgets[] = { widgets[WIDX_PAUSE].type = WindowWidgetType::Empty; } - if ((GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) || !gConfigInterface.ToolbarShowFinances) + if ((GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) || !Config::Get().interface.ToolbarShowFinances) widgets[WIDX_FINANCES].type = WindowWidgetType::Empty; + } - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + void ApplyEditorMode() + { + if ((gScreenFlags & SCREEN_FLAGS_EDITOR) == 0) { - widgets[WIDX_PARK].type = WindowWidgetType::Empty; - widgets[WIDX_STAFF].type = WindowWidgetType::Empty; - widgets[WIDX_GUESTS].type = WindowWidgetType::Empty; - widgets[WIDX_FINANCES].type = WindowWidgetType::Empty; - widgets[WIDX_RESEARCH].type = WindowWidgetType::Empty; - widgets[WIDX_NEWS].type = WindowWidgetType::Empty; - widgets[WIDX_NETWORK].type = WindowWidgetType::Empty; - - 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) - { - 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) - { - widgets[WIDX_MAP].type = WindowWidgetType::Empty; - widgets[WIDX_SCENERY].type = WindowWidgetType::Empty; - widgets[WIDX_PATH].type = WindowWidgetType::Empty; - widgets[WIDX_CLEAR_SCENERY].type = WindowWidgetType::Empty; - - widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::Empty; - widgets[WIDX_ZOOM_IN].type = WindowWidgetType::Empty; - widgets[WIDX_ROTATE].type = WindowWidgetType::Empty; - widgets[WIDX_VIEW_MENU].type = WindowWidgetType::Empty; - } + return; } + widgets[WIDX_PARK].type = WindowWidgetType::Empty; + widgets[WIDX_STAFF].type = WindowWidgetType::Empty; + widgets[WIDX_GUESTS].type = WindowWidgetType::Empty; + widgets[WIDX_FINANCES].type = WindowWidgetType::Empty; + widgets[WIDX_RESEARCH].type = WindowWidgetType::Empty; + widgets[WIDX_NEWS].type = WindowWidgetType::Empty; + widgets[WIDX_NETWORK].type = WindowWidgetType::Empty; + + 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) + { + 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) + { + widgets[WIDX_MAP].type = WindowWidgetType::Empty; + widgets[WIDX_SCENERY].type = WindowWidgetType::Empty; + widgets[WIDX_PATH].type = WindowWidgetType::Empty; + widgets[WIDX_CLEAR_SCENERY].type = WindowWidgetType::Empty; + + widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::Empty; + widgets[WIDX_ZOOM_IN].type = WindowWidgetType::Empty; + widgets[WIDX_ROTATE].type = WindowWidgetType::Empty; + widgets[WIDX_VIEW_MENU].type = WindowWidgetType::Empty; + } + } + + void ApplyNetworkMode() + { switch (NetworkGetMode()) { case NETWORK_MODE_NONE: @@ -3030,85 +3050,10 @@ static Widget _topToolbarWidgets[] = { widgets[WIDX_FASTFORWARD].type = WindowWidgetType::Empty; break; } + } - // Align left hand side toolbar buttons - firstAlignment = 1; - x = 0; - for (size_t i = 0; i < std::size(left_aligned_widgets_order); ++i) - { - widgetIndex = left_aligned_widgets_order[i]; - widget = &widgets[widgetIndex]; - if (widget->type == WindowWidgetType::Empty && widgetIndex != WIDX_SEPARATOR) - continue; - - if (firstAlignment && widgetIndex == WIDX_SEPARATOR) - continue; - - widgetWidth = widget->width(); - widget->left = x; - x += widgetWidth; - widget->right = x; - x += 1; - firstAlignment = 0; - } - - // Align right hand side toolbar buttons if necessary - int32_t screenWidth = ContextGetWidth(); - firstAlignment = 1; - x = std::max(640, screenWidth); - for (size_t i = 0; i < std::size(right_aligned_widgets_order); ++i) - { - widgetIndex = right_aligned_widgets_order[i]; - widget = &widgets[widgetIndex]; - if (widget->type == WindowWidgetType::Empty && widgetIndex != WIDX_SEPARATOR) - continue; - - if (firstAlignment && widgetIndex == WIDX_SEPARATOR) - continue; - - widgetWidth = widget->width(); - x -= 1; - widget->right = x; - x -= widgetWidth; - widget->left = x; - firstAlignment = 0; - } - - // Footpath button pressed down - if (WindowFindByClass(WindowClass::Footpath) == nullptr) - pressed_widgets &= ~(1uLL << WIDX_PATH); - else - pressed_widgets |= (1uLL << WIDX_PATH); - - bool paused = (gGamePaused & GAME_PAUSED_NORMAL); - if (paused || _waitingForPause) - { - pressed_widgets |= (1uLL << WIDX_PAUSE); - if (paused) - _waitingForPause = false; - } - else - pressed_widgets &= ~(1uLL << WIDX_PAUSE); - - if (!OpenRCT2::Audio::gGameSoundsOff) - widgets[WIDX_MUTE].image = ImageId(SPR_G2_TOOLBAR_MUTE, FilterPaletteID::PaletteNull); - else - widgets[WIDX_MUTE].image = ImageId(SPR_G2_TOOLBAR_UNMUTE, FilterPaletteID::PaletteNull); - - // Set map button to the right image. - if (widgets[WIDX_MAP].type != WindowWidgetType::Empty) - { - static constexpr uint32_t _imageIdByRotation[] = { - SPR_G2_MAP_NORTH, - SPR_G2_MAP_WEST, - SPR_G2_MAP_SOUTH, - SPR_G2_MAP_EAST, - }; - - uint32_t mapImageId = _imageIdByRotation[GetCurrentRotation()]; - widgets[WIDX_MAP].image = ImageId(mapImageId, FilterPaletteID::PaletteNull); - } - + void ApplyZoomState() + { // Zoomed out/in disable. Not sure where this code is in the original. const auto* mainWindow = WindowGetMain(); if (mainWindow == nullptr || mainWindow->viewport == nullptr) @@ -3131,6 +3076,139 @@ static Widget _topToolbarWidgets[] = { } } + void ApplyPausedState() + { + bool paused = (gGamePaused & GAME_PAUSED_NORMAL); + if (paused || _waitingForPause) + { + pressed_widgets |= (1uLL << WIDX_PAUSE); + if (paused) + _waitingForPause = false; + } + else + pressed_widgets &= ~(1uLL << WIDX_PAUSE); + } + + void ApplyMapRotation() + { + // Set map button to the right image. + if (widgets[WIDX_MAP].type != WindowWidgetType::Empty) + { + static constexpr uint32_t _imageIdByRotation[] = { + SPR_G2_MAP_NORTH, + SPR_G2_MAP_WEST, + SPR_G2_MAP_SOUTH, + SPR_G2_MAP_EAST, + }; + + uint32_t mapImageId = _imageIdByRotation[GetCurrentRotation()]; + widgets[WIDX_MAP].image = ImageId(mapImageId, FilterPaletteID::PaletteNull); + } + } + + void ApplyAudioState() + { + if (!OpenRCT2::Audio::gGameSoundsOff) + widgets[WIDX_MUTE].image = ImageId(SPR_G2_TOOLBAR_MUTE, FilterPaletteID::PaletteNull); + else + widgets[WIDX_MUTE].image = ImageId(SPR_G2_TOOLBAR_UNMUTE, FilterPaletteID::PaletteNull); + } + + void ApplyFootpathPressed() + { + // Footpath button pressed down + if (WindowFindByClass(WindowClass::Footpath) == nullptr) + pressed_widgets &= ~(1uLL << WIDX_PATH); + else + pressed_widgets |= (1uLL << WIDX_PATH); + } + + // TODO: look into using std::span + template uint16_t GetToolbarWidth(T toolbarItems) + { + bool firstItem = true; + auto totalWidth = 0; + for (auto widgetIndex : toolbarItems) + { + auto* widget = &widgets[widgetIndex]; + if (widget->type == WindowWidgetType::Empty && widgetIndex != WIDX_SEPARATOR) + continue; + + if (firstItem && widgetIndex == WIDX_SEPARATOR) + continue; + + totalWidth += widget->width() + 1; + firstItem = false; + } + return totalWidth; + } + + // TODO: look into using std::span + template void AlignButtons(T toolbarItems, uint16_t xPos) + { + bool firstItem = true; + for (auto widgetIndex : toolbarItems) + { + auto* widget = &widgets[widgetIndex]; + if (widget->type == WindowWidgetType::Empty && widgetIndex != WIDX_SEPARATOR) + continue; + + if (firstItem && widgetIndex == WIDX_SEPARATOR) + continue; + + auto widgetWidth = widget->width(); + widget->left = xPos; + xPos += widgetWidth; + widget->right = xPos; + xPos += 1; + + firstItem = false; + } + } + + void AlignButtonsLeftRight() + { + // Align left hand side toolbar buttons + AlignButtons(kWidgetOrderLeftGroup, 0); + + // Align right hand side toolbar buttons + auto totalWidth = GetToolbarWidth(kWidgetOrderRightGroup); + auto xPos = ContextGetWidth() - totalWidth; + AlignButtons(kWidgetOrderRightGroup, xPos); + } + + void AlignButtonsCentre() + { + // First, we figure out how much space we'll be needing + auto totalWidth = GetToolbarWidth(kWidgetOrderCombined); + + // We'll start from the centre of the UI... + auto xPos = (ContextGetWidth() - totalWidth) / 2; + + // And finally, align the buttons in the centre + AlignButtons(kWidgetOrderCombined, xPos); + } + + void OnPrepareDraw() override + { + ResetWidgetToDefaultState(); + HideDisabledButtons(); + ApplyEditorMode(); + + ApplyPausedState(); + ApplyAudioState(); + ApplyNetworkMode(); + + ApplyZoomState(); + ApplyMapRotation(); + ApplyFootpathPressed(); + + if (!Config::Get().interface.ToolbarButtonsCentred) + AlignButtonsLeftRight(); + else + AlignButtonsCentre(); + } + void OnDraw(DrawPixelInfo& dpi) override { const auto& gameState = GetGameState(); @@ -3179,7 +3257,7 @@ static Widget _topToolbarWidgets[] = { // Draw an overlay if clearance checks are disabled if (GetGameState().Cheats.DisableClearanceChecks) { - auto colour = static_cast(EnumValue(COLOUR_DARK_ORANGE) | EnumValue(COLOUR_FLAG_OUTLINE)); + auto colour = ColourWithFlags{ COLOUR_DARK_ORANGE }.withFlag(ColourFlag::withOutline, true); DrawTextBasic( dpi, screenPos + ScreenCoordsXY{ 26, 2 }, STR_OVERLAY_CLEARANCE_CHECKS_DISABLED, {}, { colour, TextAlignment::RIGHT }); @@ -3245,7 +3323,7 @@ static Widget _topToolbarWidgets[] = { // Draw number of players. auto ft = Formatter(); ft.Add(NetworkGetNumVisiblePlayers()); - auto colour = static_cast(EnumValue(COLOUR_WHITE) | EnumValue(COLOUR_FLAG_OUTLINE)); + auto colour = ColourWithFlags{ COLOUR_WHITE }.withFlag(ColourFlag::withOutline, true); DrawTextBasic(dpi, screenPos + ScreenCoordsXY{ 23, 1 }, STR_COMMA16, ft, { colour, TextAlignment::RIGHT }); } } @@ -3355,14 +3433,14 @@ static Widget _topToolbarWidgets[] = { SetItems(items); WindowDropdownShowText( - { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[1] | 0x80, 0, - TOP_TOOLBAR_VIEW_MENU_COUNT); + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, + colours[1].withFlag(ColourFlag::translucent, true), 0, TOP_TOOLBAR_VIEW_MENU_COUNT); // Set checkmarks auto* mainViewport = WindowGetMain()->viewport; if (mainViewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) Dropdown::SetChecked(DDIDX_UNDERGROUND_INSIDE, true); - if (gConfigGeneral.TransparentWater) + if (Config::Get().general.TransparentWater) Dropdown::SetChecked(DDIDX_TRANSPARENT_WATER, true); if (mainViewport->flags & VIEWPORT_FLAG_HIDE_BASE) Dropdown::SetChecked(DDIDX_HIDE_BASE, true); @@ -3415,8 +3493,8 @@ static Widget _topToolbarWidgets[] = { w->viewport->flags ^= VIEWPORT_FLAG_UNDERGROUND_INSIDE; break; case DDIDX_TRANSPARENT_WATER: - gConfigGeneral.TransparentWater ^= 1; - ConfigSaveDefault(); + Config::Get().general.TransparentWater ^= 1; + Config::Save(); break; case DDIDX_HIDE_BASE: w->viewport->flags ^= VIEWPORT_FLAG_HIDE_BASE; @@ -3510,7 +3588,8 @@ static Widget _topToolbarWidgets[] = { #endif WindowDropdownShowText( - { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[1] | 0x80, 0, i); + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, + colours[1].withFlag(ColourFlag::translucent, true), 0, i); gDropdownDefaultIndex = DDIDX_SHOW_MAP; } @@ -3566,7 +3645,7 @@ static Widget _topToolbarWidgets[] = { gDropdownItems[1].Format = STR_TOGGLE_OPTION; gDropdownItems[2].Format = STR_TOGGLE_OPTION; gDropdownItems[3].Format = STR_TOGGLE_OPTION; - if (gConfigGeneral.DebuggingTools) + if (Config::Get().general.DebuggingTools) { gDropdownItems[4].Format = STR_EMPTY; gDropdownItems[5].Format = STR_TOGGLE_OPTION; @@ -3580,7 +3659,8 @@ static Widget _topToolbarWidgets[] = { gDropdownItems[3].Args = STR_SPEED_TURBO; WindowDropdownShowText( - { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[0] | 0x80, 0, num_items); + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, + colours[0].withFlag(ColourFlag::translucent, true), 0, num_items); // Set checkmarks if (gGameSpeed <= 4) @@ -3592,7 +3672,7 @@ static Widget _topToolbarWidgets[] = { Dropdown::SetChecked(5, true); } - if (gConfigGeneral.DebuggingTools) + if (Config::Get().general.DebuggingTools) { gDropdownDefaultIndex = (gGameSpeed == 8 ? 0 : gGameSpeed); } @@ -3629,7 +3709,8 @@ static Widget _topToolbarWidgets[] = { gDropdownItems[1].Format = STR_ROTATE_ANTI_CLOCKWISE; WindowDropdownShowText( - { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[1] | 0x80, 0, 2); + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, + colours[1].withFlag(ColourFlag::translucent, true), 0, 2); gDropdownDefaultIndex = DDIDX_ROTATE_CLOCKWISE; } @@ -3651,16 +3732,16 @@ static Widget _topToolbarWidgets[] = { int32_t numItems = 0; if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) { - gDropdownItems[numItems++].Format = STR_ABOUT; - gDropdownItems[numItems++].Format = STR_OPTIONS; gDropdownItems[numItems++].Format = STR_SCREENSHOT; gDropdownItems[numItems++].Format = STR_GIANT_SCREENSHOT; gDropdownItems[numItems++].Format = STR_EMPTY; + gDropdownItems[numItems++].Format = STR_ABOUT; gDropdownItems[numItems++].Format = STR_FILE_BUG_ON_GITHUB; if (OpenRCT2::GetContext()->HasNewVersionInfo()) gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; + gDropdownItems[numItems++].Format = STR_OPTIONS; gDropdownItems[numItems++].Format = STR_EMPTY; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) @@ -3676,16 +3757,16 @@ static Widget _topToolbarWidgets[] = { gDropdownItems[numItems++].Format = STR_EMPTY; gDropdownItems[numItems++].Format = STR_SAVE_LANDSCAPE; gDropdownItems[numItems++].Format = STR_EMPTY; - gDropdownItems[numItems++].Format = STR_ABOUT; - gDropdownItems[numItems++].Format = STR_OPTIONS; gDropdownItems[numItems++].Format = STR_SCREENSHOT; gDropdownItems[numItems++].Format = STR_GIANT_SCREENSHOT; gDropdownItems[numItems++].Format = STR_EMPTY; + gDropdownItems[numItems++].Format = STR_ABOUT; gDropdownItems[numItems++].Format = STR_FILE_BUG_ON_GITHUB; if (OpenRCT2::GetContext()->HasNewVersionInfo()) gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; + gDropdownItems[numItems++].Format = STR_OPTIONS; gDropdownItems[numItems++].Format = STR_EMPTY; gDropdownItems[numItems++].Format = STR_QUIT_SCENARIO_EDITOR; gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; @@ -3698,24 +3779,24 @@ static Widget _topToolbarWidgets[] = { gDropdownItems[numItems++].Format = STR_SAVE_GAME; gDropdownItems[numItems++].Format = STR_SAVE_GAME_AS; gDropdownItems[numItems++].Format = STR_EMPTY; - gDropdownItems[numItems++].Format = STR_ABOUT; - gDropdownItems[numItems++].Format = STR_OPTIONS; gDropdownItems[numItems++].Format = STR_SCREENSHOT; gDropdownItems[numItems++].Format = STR_GIANT_SCREENSHOT; gDropdownItems[numItems++].Format = STR_EMPTY; + gDropdownItems[numItems++].Format = STR_ABOUT; gDropdownItems[numItems++].Format = STR_FILE_BUG_ON_GITHUB; if (OpenRCT2::GetContext()->HasNewVersionInfo()) gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; + gDropdownItems[numItems++].Format = STR_OPTIONS; gDropdownItems[numItems++].Format = STR_EMPTY; gDropdownItems[numItems++].Format = STR_QUIT_TO_MENU; gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; } WindowDropdownShowText( - { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[0] | 0x80, - Dropdown::Flag::StayOpen, numItems); + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, + colours[0].withFlag(ColourFlag::translucent, true), Dropdown::Flag::StayOpen, numItems); } void TopToolbar::InitCheatsMenu(Widget& widget) @@ -3739,8 +3820,8 @@ static Widget _topToolbarWidgets[] = { SetItems(items); WindowDropdownShowText( - { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[0] | 0x80, - Dropdown::Flag::StayOpen, TOP_TOOLBAR_CHEATS_COUNT); + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, + colours[0].withFlag(ColourFlag::translucent, true), Dropdown::Flag::StayOpen, TOP_TOOLBAR_CHEATS_COUNT); // Disable items that are not yet available in multiplayer if (NetworkGetMode() != NETWORK_MODE_NONE) @@ -3818,8 +3899,8 @@ static Widget _topToolbarWidgets[] = { gDropdownItems[DDIDX_DEBUG_PAINT].Args = STR_DEBUG_DROPDOWN_DEBUG_PAINT; WindowDropdownShowText( - { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[0] | 0x80, - Dropdown::Flag::StayOpen, TOP_TOOLBAR_DEBUG_COUNT); + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, + colours[0].withFlag(ColourFlag::translucent, true), Dropdown::Flag::StayOpen, TOP_TOOLBAR_DEBUG_COUNT); Dropdown::SetChecked(DDIDX_DEBUG_PAINT, WindowFindByClass(WindowClass::DebugPaint) != nullptr); } @@ -3857,8 +3938,8 @@ static Widget _topToolbarWidgets[] = { gDropdownItems[DDIDX_MULTIPLAYER_RECONNECT].Format = STR_MULTIPLAYER_RECONNECT; WindowDropdownShowText( - { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[0] | 0x80, 0, - TOP_TOOLBAR_NETWORK_COUNT); + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, + colours[0].withFlag(ColourFlag::translucent, true), 0, TOP_TOOLBAR_NETWORK_COUNT); Dropdown::SetDisabled(DDIDX_MULTIPLAYER_RECONNECT, !NetworkIsDesynchronised()); diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 6c2874b1ac..11941db92c 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include using namespace OpenRCT2::TrackMetaData; @@ -115,14 +116,14 @@ static Widget _trackPlaceWidgets[] = { _currentTrackPieceDirection = (_currentTrackPieceDirection + 1) & 3; Invalidate(); _placementLoc.SetNull(); - DrawMiniPreview(_trackDesign.get()); + DrawMiniPreview(*_trackDesign); break; case WIDX_MIRROR: - TrackDesignMirror(_trackDesign.get()); + TrackDesignMirror(*_trackDesign); _currentTrackPieceDirection = (0 - _currentTrackPieceDirection) & 3; Invalidate(); _placementLoc.SetNull(); - DrawMiniPreview(_trackDesign.get()); + DrawMiniPreview(*_trackDesign); break; case WIDX_SELECT_DIFFERENT_DESIGN: Close(); @@ -164,7 +165,7 @@ static Widget _trackPlaceWidgets[] = { if (mapCoords == _placementLoc) { TrackDesignPreviewDrawOutlines( - tds, _trackDesign.get(), RideGetTemporaryForPreview(), { mapCoords, 0, _currentTrackPieceDirection }); + tds, *_trackDesign, RideGetTemporaryForPreview(), { mapCoords, 0, _currentTrackPieceDirection }); return; } @@ -204,7 +205,7 @@ static Widget _trackPlaceWidgets[] = { WidgetInvalidate(*this, WIDX_PRICE); } - TrackDesignPreviewDrawOutlines(tds, _trackDesign.get(), RideGetTemporaryForPreview(), trackLoc); + TrackDesignPreviewDrawOutlines(tds, *_trackDesign, RideGetTemporaryForPreview(), trackLoc); } void OnToolDown(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override @@ -277,18 +278,18 @@ static Widget _trackPlaceWidgets[] = { void OnViewportRotate() override { - DrawMiniPreview(_trackDesign.get()); + DrawMiniPreview(*_trackDesign); } void OnPrepareDraw() override { - DrawMiniPreview(_trackDesign.get()); + DrawMiniPreview(*_trackDesign); } void OnDraw(DrawPixelInfo& dpi) override { auto ft = Formatter::Common(); - ft.Add(_trackDesign->name.c_str()); + ft.Add(_trackDesign->gameStateData.name.c_str()); WindowDrawWidgets(*this, dpi); // Draw mini tile preview @@ -301,7 +302,7 @@ static Widget _trackPlaceWidgets[] = { g1temp.height = TRACK_MINI_PREVIEW_HEIGHT; GfxSetG1Element(SPR_TEMP, &g1temp); DrawingEngineInvalidateImage(SPR_TEMP); - GfxDrawSprite(clippedDpi, ImageId(SPR_TEMP, NOT_TRANSLUCENT(this->colours[0])), { 0, 0 }); + GfxDrawSprite(clippedDpi, ImageId(SPR_TEMP, this->colours[0].colour), { 0, 0 }); } // Price @@ -325,7 +326,7 @@ static Widget _trackPlaceWidgets[] = { auto provRide = GetRide(_placementGhostRideId); if (provRide != nullptr) { - TrackDesignPreviewRemoveGhosts(_trackDesign.get(), *provRide, _placementGhostLoc); + TrackDesignPreviewRemoveGhosts(*_trackDesign, *provRide, _placementGhostLoc); } } } @@ -349,7 +350,7 @@ static Widget _trackPlaceWidgets[] = { _trackDesign = std::move(trackDesign); } - void DrawMiniPreview(TrackDesign* td6) + void DrawMiniPreview(const TrackDesign& td) { ClearMiniPreview(); @@ -365,14 +366,14 @@ static Widget _trackPlaceWidgets[] = { origin.y -= ((max.y + min.y) >> 6) * COORDS_XY_STEP; } - const auto& rtd = GetRideTypeDescriptor(td6->type); + const auto& rtd = GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - DrawMiniPreviewMaze(td6, pass, origin, min, max); + DrawMiniPreviewMaze(td, pass, origin, min, max); } else { - DrawMiniPreviewTrack(td6, pass, origin, min, max); + DrawMiniPreviewTrack(td, pass, origin, min, max); } } } @@ -401,7 +402,7 @@ static Widget _trackPlaceWidgets[] = { auto newRide = GetRide(_placementGhostRideId); if (newRide != nullptr) { - TrackDesignPreviewRemoveGhosts(_trackDesign.get(), *newRide, _placementGhostLoc); + TrackDesignPreviewRemoveGhosts(*_trackDesign, *newRide, _placementGhostLoc); _hasPlacementGhost = false; } } @@ -416,12 +417,12 @@ static Widget _trackPlaceWidgets[] = { auto z = surfaceElement->GetBaseZ(); // Increase Z above slope - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + if (surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) { z += 16; // Increase Z above double slope - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) z += 16; } @@ -431,15 +432,15 @@ static Widget _trackPlaceWidgets[] = { return z + TrackDesignGetZPlacement( - _trackDesign.get(), RideGetTemporaryForPreview(), { loc, z, _currentTrackPieceDirection }); + *_trackDesign, RideGetTemporaryForPreview(), { loc, z, _currentTrackPieceDirection }); } void DrawMiniPreviewEntrances( - const TrackDesign& td6, int32_t pass, const CoordsXY& origin, CoordsXY& min, CoordsXY& max, Direction rotation) + const TrackDesign& td, int32_t pass, const CoordsXY& origin, CoordsXY& min, CoordsXY& max, Direction rotation) { - for (const auto& entrance : td6.entrance_elements) + for (const auto& entrance : td.entranceElements) { - auto rotatedAndOffsetEntrance = origin + entrance.Location.ToCoordsXY().Rotate(rotation); + auto rotatedAndOffsetEntrance = origin + entrance.location.ToCoordsXY().Rotate(rotation); if (pass == 0) { @@ -454,7 +455,7 @@ static Widget _trackPlaceWidgets[] = { if (DrawMiniPreviewIsPixelInBounds(pixelPosition)) { uint8_t* pixel = DrawMiniPreviewGetPixelPtr(pixelPosition); - uint8_t colour = entrance.IsExit ? _PaletteIndexColourExit : _PaletteIndexColourEntrance; + uint8_t colour = entrance.isExit ? _PaletteIndexColourExit : _PaletteIndexColourEntrance; for (int32_t i = 0; i < 4; i++) { pixel[338 + i] = colour; // x + 2, y + 2 @@ -467,16 +468,16 @@ static Widget _trackPlaceWidgets[] = { } } - void DrawMiniPreviewTrack(TrackDesign* td6, int32_t pass, const CoordsXY& origin, CoordsXY& min, CoordsXY& max) + void DrawMiniPreviewTrack(const TrackDesign& td, int32_t pass, const CoordsXY& origin, CoordsXY& min, CoordsXY& max) { const uint8_t rotation = (_currentTrackPieceDirection + GetCurrentRotation()) & 3; CoordsXY curTrackStart = origin; uint8_t curTrackRotation = rotation; - for (const auto& trackElement : td6->track_elements) + for (const auto& trackElement : td.trackElements) { // Follow a single track piece shape - const auto& ted = GetTrackElementDescriptor(trackElement.Type); + const auto& ted = GetTrackElementDescriptor(trackElement.type); const PreviewTrack* trackBlock = ted.Block; while (trackBlock->index != 255) { @@ -538,15 +539,15 @@ static Widget _trackPlaceWidgets[] = { } } - DrawMiniPreviewEntrances(*td6, pass, origin, min, max, rotation); + DrawMiniPreviewEntrances(td, pass, origin, min, max, rotation); } - void DrawMiniPreviewMaze(TrackDesign* td6, int32_t pass, const CoordsXY& origin, CoordsXY& min, CoordsXY& max) + void DrawMiniPreviewMaze(const TrackDesign& td, int32_t pass, const CoordsXY& origin, CoordsXY& min, CoordsXY& max) { uint8_t rotation = (_currentTrackPieceDirection + GetCurrentRotation()) & 3; - for (const auto& mazeElement : td6->maze_elements) + for (const auto& mazeElement : td.mazeElements) { - auto rotatedMazeCoords = origin + TileCoordsXY{ mazeElement.x, mazeElement.y }.ToCoordsXY().Rotate(rotation); + auto rotatedMazeCoords = origin + mazeElement.location.ToCoordsXY().Rotate(rotation); if (pass == 0) { @@ -574,7 +575,7 @@ static Widget _trackPlaceWidgets[] = { } } - DrawMiniPreviewEntrances(*td6, pass, origin, min, max, rotation); + DrawMiniPreviewEntrances(td, pass, origin, min, max, rotation); } ScreenCoordsXY DrawMiniPreviewGetPixelPosition(const CoordsXY& location) diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index 19a050b57e..65d1c7ace1 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -74,7 +74,7 @@ static Widget _trackListWidgets[] = { { private: std::vector _trackDesigns; - utf8 _filterString[USER_STRING_MAX_LENGTH]{}; + utf8 _filterString[kUserStringMaxLength]{}; std::vector _filteredTrackIds; uint16_t _loadedTrackDesignIndex; std::unique_ptr _loadedTrackDesign; @@ -136,7 +136,7 @@ static Widget _trackListWidgets[] = { return; } - if (_loadedTrackDesign->track_flags & TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE) + if (_loadedTrackDesign->gameStateData.hasFlag(TrackDesignGameStateFlag::SceneryUnavailable)) { gTrackDesignSceneryToggle = true; } @@ -152,7 +152,7 @@ static Widget _trackListWidgets[] = { else { if (_loadedTrackDesignIndex != TRACK_DESIGN_INDEX_UNLOADED - && (_loadedTrackDesign->track_flags & TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE)) + && (_loadedTrackDesign->gameStateData.hasFlag(TrackDesignGameStateFlag::VehicleUnavailable))) { ContextShowError(STR_THIS_DESIGN_WILL_BE_BUILT_WITH_AN_ALTERNATIVE_VEHICLE_TYPE, STR_NONE, {}); } @@ -172,7 +172,7 @@ static Widget _trackListWidgets[] = { maxItems++; } - int32_t index = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + int32_t index = screenCoords.y / kScrollableRowHeight; if (index < 0 || static_cast(index) >= maxItems) { index = -1; @@ -201,7 +201,7 @@ static Widget _trackListWidgets[] = { _loadedTrackDesign = TrackDesignImport(path.c_str()); if (_loadedTrackDesign != nullptr) { - TrackDesignDrawPreview(_loadedTrackDesign.get(), _trackDesignPreviewPixels.data()); + TrackDesignDrawPreview(*_loadedTrackDesign, _trackDesignPreviewPixels.data()); return true; } return false; @@ -328,7 +328,7 @@ static Widget _trackListWidgets[] = { // Extra item: custom design numItems++; } - int32_t scrollHeight = static_cast(numItems * SCROLLABLE_ROW_HEIGHT); + int32_t scrollHeight = static_cast(numItems * kScrollableRowHeight); return { width, scrollHeight }; } @@ -422,7 +422,8 @@ static Widget _trackListWidgets[] = { } // When debugging tools are on, shift everything up a bit to make room for displaying the path. - const int32_t bottomMargin = gConfigGeneral.DebuggingTools ? (WINDOW_PADDING + DEBUG_PATH_HEIGHT) : WINDOW_PADDING; + const int32_t bottomMargin = Config::Get().general.DebuggingTools ? (WINDOW_PADDING + DEBUG_PATH_HEIGHT) + : WINDOW_PADDING; widgets[WIDX_TRACK_LIST].bottom = height - bottomMargin; widgets[WIDX_ROTATE].bottom = height - bottomMargin; widgets[WIDX_ROTATE].top = widgets[WIDX_ROTATE].bottom - ROTATE_AND_SCENERY_BUTTON_SIZE; @@ -465,11 +466,11 @@ static Widget _trackListWidgets[] = { // Track preview auto& tdWidget = widgets[WIDX_TRACK_PREVIEW]; - int32_t colour = ColourMapA[colours[0]].darkest; + int32_t colour = ColourMapA[colours[0].colour].darkest; u8string path = _trackDesigns[trackIndex].path; // Show track file path (in debug mode) - if (gConfigGeneral.DebuggingTools) + if (Config::Get().general.DebuggingTools) { const auto shortPath = ShortenPath(path, width, FontStyle::Medium); auto ft = Formatter(); @@ -514,22 +515,22 @@ static Widget _trackListWidgets[] = { screenPos.y = windowPos.y + tdWidget.bottom - 12; // Warnings - if ((_loadedTrackDesign->track_flags & TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE) + if ((_loadedTrackDesign->gameStateData.hasFlag(TrackDesignGameStateFlag::VehicleUnavailable)) && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) { // Vehicle design not available DrawTextEllipsised(dpi, screenPos, 368, STR_VEHICLE_DESIGN_UNAVAILABLE, {}, { TextAlignment::CENTRE }); - screenPos.y -= SCROLLABLE_ROW_HEIGHT; + screenPos.y -= kScrollableRowHeight; } - if (_loadedTrackDesign->track_flags & TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE) + if (_loadedTrackDesign->gameStateData.hasFlag(TrackDesignGameStateFlag::SceneryUnavailable)) { if (!gTrackDesignSceneryToggle) { // Scenery not available DrawTextEllipsised( dpi, screenPos, 368, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, { TextAlignment::CENTRE }); - screenPos.y -= SCROLLABLE_ROW_HEIGHT; + screenPos.y -= kScrollableRowHeight; } } @@ -543,31 +544,31 @@ static Widget _trackListWidgets[] = { // Stats ft = Formatter(); - ft.Add(_loadedTrackDesign->excitement * 10); + ft.Add(_loadedTrackDesign->statistics.ratings.excitement); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); screenPos.y += kListRowHeight; ft = Formatter(); - ft.Add(_loadedTrackDesign->intensity * 10); + ft.Add(_loadedTrackDesign->statistics.ratings.intensity); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); screenPos.y += kListRowHeight; ft = Formatter(); - ft.Add(_loadedTrackDesign->nausea * 10); + ft.Add(_loadedTrackDesign->statistics.ratings.nausea); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); screenPos.y += kListRowHeight + 4; // Information for tracked rides. - if (GetRideTypeDescriptor(_loadedTrackDesign->type).HasFlag(RIDE_TYPE_FLAG_HAS_TRACK)) + if (GetRideTypeDescriptor(_loadedTrackDesign->trackAndVehicle.rtdIndex).HasFlag(RIDE_TYPE_FLAG_HAS_TRACK)) { - const auto& rtd = GetRideTypeDescriptor(_loadedTrackDesign->type); + const auto& rtd = GetRideTypeDescriptor(_loadedTrackDesign->trackAndVehicle.rtdIndex); if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - if (_loadedTrackDesign->type == RIDE_TYPE_MINI_GOLF) + if (_loadedTrackDesign->trackAndVehicle.rtdIndex == RIDE_TYPE_MINI_GOLF) { // Holes ft = Formatter(); - ft.Add(_loadedTrackDesign->holes & 0x1F); + ft.Add(_loadedTrackDesign->statistics.holes); DrawTextBasic(dpi, screenPos, STR_HOLES, ft); screenPos.y += kListRowHeight; } @@ -575,13 +576,13 @@ static Widget _trackListWidgets[] = { { // Maximum speed ft = Formatter(); - ft.Add(((_loadedTrackDesign->max_speed << 16) * 9) >> 18); + ft.Add(((_loadedTrackDesign->statistics.maxSpeed << 16) * 9) >> 18); DrawTextBasic(dpi, screenPos, STR_MAX_SPEED, ft); screenPos.y += kListRowHeight; // Average speed ft = Formatter(); - ft.Add(((_loadedTrackDesign->average_speed << 16) * 9) >> 18); + ft.Add(((_loadedTrackDesign->statistics.averageSpeed << 16) * 9) >> 18); DrawTextBasic(dpi, screenPos, STR_AVERAGE_SPEED, ft); screenPos.y += kListRowHeight; } @@ -589,92 +590,88 @@ static Widget _trackListWidgets[] = { // Ride length ft = Formatter(); ft.Add(STR_RIDE_LENGTH_ENTRY); - ft.Add(_loadedTrackDesign->ride_length); + ft.Add(_loadedTrackDesign->statistics.rideLength); DrawTextEllipsised(dpi, screenPos, 214, STR_TRACK_LIST_RIDE_LENGTH, ft); screenPos.y += kListRowHeight; } - if (GetRideTypeDescriptor(_loadedTrackDesign->type).HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES)) + if (GetRideTypeDescriptor(_loadedTrackDesign->trackAndVehicle.rtdIndex).HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES)) { // Maximum positive vertical Gs ft = Formatter(); - ft.Add(_loadedTrackDesign->max_positive_vertical_g * 32); + ft.Add(_loadedTrackDesign->statistics.maxPositiveVerticalG); DrawTextBasic(dpi, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); screenPos.y += kListRowHeight; // Maximum negative vertical Gs ft = Formatter(); - ft.Add(_loadedTrackDesign->max_negative_vertical_g * 32); + ft.Add(_loadedTrackDesign->statistics.maxNegativeVerticalG); DrawTextBasic(dpi, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); screenPos.y += kListRowHeight; // Maximum lateral Gs ft = Formatter(); - ft.Add(_loadedTrackDesign->max_lateral_g * 32); + ft.Add(_loadedTrackDesign->statistics.maxLateralG); DrawTextBasic(dpi, screenPos, STR_MAX_LATERAL_G, ft); screenPos.y += kListRowHeight; - if (_loadedTrackDesign->total_air_time != 0) + if (_loadedTrackDesign->statistics.totalAirTime != 0) { // Total air time ft = Formatter(); - ft.Add(_loadedTrackDesign->total_air_time * 25); + ft.Add(_loadedTrackDesign->statistics.totalAirTime * 3); DrawTextBasic(dpi, screenPos, STR_TOTAL_AIR_TIME, ft); screenPos.y += kListRowHeight; } } - if (GetRideTypeDescriptor(_loadedTrackDesign->type).HasFlag(RIDE_TYPE_FLAG_HAS_DROPS)) + if (GetRideTypeDescriptor(_loadedTrackDesign->trackAndVehicle.rtdIndex).HasFlag(RIDE_TYPE_FLAG_HAS_DROPS)) { // Drops ft = Formatter(); - ft.Add(_loadedTrackDesign->drops & 0x3F); + ft.Add(_loadedTrackDesign->statistics.drops); DrawTextBasic(dpi, screenPos, STR_DROPS, ft); screenPos.y += kListRowHeight; // Drop height is multiplied by 0.75 ft = Formatter(); - ft.Add((_loadedTrackDesign->highest_drop_height * 3) / 4); + ft.Add((_loadedTrackDesign->statistics.highestDropHeight * 3) / 4); DrawTextBasic(dpi, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); screenPos.y += kListRowHeight; } - if (_loadedTrackDesign->type != RIDE_TYPE_MINI_GOLF) + if (_loadedTrackDesign->statistics.inversions != 0) { - uint16_t inversions = _loadedTrackDesign->inversions & 0x1F; - if (inversions != 0) - { - ft = Formatter(); - ft.Add(inversions); - // Inversions - DrawTextBasic(dpi, screenPos, STR_INVERSIONS, ft); - screenPos.y += kListRowHeight; - } + ft = Formatter(); + ft.Add(_loadedTrackDesign->statistics.inversions); + DrawTextBasic(dpi, screenPos, STR_INVERSIONS, ft); + screenPos.y += kListRowHeight; } + screenPos.y += 4; } - if (_loadedTrackDesign->space_required_x != 0xFF) + if (!_loadedTrackDesign->statistics.spaceRequired.IsNull()) { // Space required ft = Formatter(); - ft.Add(_loadedTrackDesign->space_required_x); - ft.Add(_loadedTrackDesign->space_required_y); + ft.Add(_loadedTrackDesign->statistics.spaceRequired.x); + ft.Add(_loadedTrackDesign->statistics.spaceRequired.y); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); screenPos.y += kListRowHeight; } - if (_loadedTrackDesign->cost != 0) + if (_loadedTrackDesign->gameStateData.cost != 0) { ft = Formatter(); - ft.Add(_loadedTrackDesign->cost); + ft.Add(_loadedTrackDesign->gameStateData.cost); DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_COST_AROUND, ft); } } void OnScrollDraw(const int32_t scrollIndex, DrawPixelInfo& dpi) override { - uint8_t paletteIndex = ColourMapA[colours[0]].mid_light; + uint8_t paletteIndex = ColourMapA[colours[0].colour].mid_light; GfxClear(dpi, paletteIndex); auto screenCoords = ScreenCoordsXY{ 0, 0 }; @@ -696,7 +693,7 @@ static Widget _trackListWidgets[] = { { // Highlight GfxFilterRect( - dpi, { screenCoords, { width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } }, + dpi, { screenCoords, { width, screenCoords.y + kScrollableRowHeight - 1 } }, FilterPaletteID::PaletteDarken1); stringId = STR_WINDOW_COLOUR_2_STRINGID; } @@ -708,20 +705,20 @@ static Widget _trackListWidgets[] = { auto ft = Formatter(); ft.Add(STR_BUILD_CUSTOM_DESIGN); DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); - screenCoords.y += SCROLLABLE_ROW_HEIGHT; + screenCoords.y += kScrollableRowHeight; listIndex++; } for (auto i : _filteredTrackIds) { - if (screenCoords.y + SCROLLABLE_ROW_HEIGHT >= dpi.y && screenCoords.y < dpi.y + dpi.height) + if (screenCoords.y + kScrollableRowHeight >= dpi.y && screenCoords.y < dpi.y + dpi.height) { StringId stringId; if (listIndex == static_cast(selected_list_item)) { // Highlight GfxFilterRect( - dpi, { screenCoords, { width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } }, + dpi, { screenCoords, { width, screenCoords.y + kScrollableRowHeight - 1 } }, FilterPaletteID::PaletteDarken1); stringId = STR_WINDOW_COLOUR_2_STRINGID; } @@ -737,7 +734,7 @@ static Widget _trackListWidgets[] = { DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); } - screenCoords.y += SCROLLABLE_ROW_HEIGHT; + screenCoords.y += kScrollableRowHeight; listIndex++; } } diff --git a/src/openrct2-ui/windows/Transparency.cpp b/src/openrct2-ui/windows/Transparency.cpp index 6b817e6bbf..57e18fe124 100644 --- a/src/openrct2-ui/windows/Transparency.cpp +++ b/src/openrct2-ui/windows/Transparency.cpp @@ -236,13 +236,13 @@ static Widget _transparancyWidgets[] = void SaveInConfig(uint32_t wflags) { - gConfigGeneral.InvisibleRides = wflags & VIEWPORT_FLAG_INVISIBLE_RIDES; - gConfigGeneral.InvisibleVehicles = wflags & VIEWPORT_FLAG_INVISIBLE_VEHICLES; - gConfigGeneral.InvisibleScenery = wflags & VIEWPORT_FLAG_INVISIBLE_SCENERY; - gConfigGeneral.InvisibleTrees = wflags & VIEWPORT_FLAG_INVISIBLE_VEGETATION; - gConfigGeneral.InvisiblePaths = wflags & VIEWPORT_FLAG_INVISIBLE_PATHS; - gConfigGeneral.InvisibleSupports = wflags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS; - ConfigSaveDefault(); + Config::Get().general.InvisibleRides = wflags & VIEWPORT_FLAG_INVISIBLE_RIDES; + Config::Get().general.InvisibleVehicles = wflags & VIEWPORT_FLAG_INVISIBLE_VEHICLES; + Config::Get().general.InvisibleScenery = wflags & VIEWPORT_FLAG_INVISIBLE_SCENERY; + Config::Get().general.InvisibleTrees = wflags & VIEWPORT_FLAG_INVISIBLE_VEGETATION; + Config::Get().general.InvisiblePaths = wflags & VIEWPORT_FLAG_INVISIBLE_PATHS; + Config::Get().general.InvisibleSupports = wflags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS; + Config::Save(); } void OnResize() override diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index 513e5c463d..9a570dd4fb 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -299,7 +299,7 @@ static Widget _viewClippingWidgets[] = { case DisplayType::DisplayUnits: { // Print the value in the configured height label type: - if (gConfigGeneral.ShowHeightAsUnits) + if (Config::Get().general.ShowHeightAsUnits) { // Height label is Units. auto ft = Formatter(); @@ -312,7 +312,7 @@ static Widget _viewClippingWidgets[] = { { // Height label is Real Values. // Print the value in the configured measurement units. - switch (gConfigGeneral.MeasurementFormat) + switch (Config::Get().general.MeasurementFormat) { case MeasurementFormat::Metric: case MeasurementFormat::SI: diff --git a/src/openrct2-ui/windows/Window.h b/src/openrct2-ui/windows/Window.h index 2219833e1f..66cd1e03fc 100644 --- a/src/openrct2-ui/windows/Window.h +++ b/src/openrct2-ui/windows/Window.h @@ -16,6 +16,9 @@ #include #include +// TODO: only for WINDOW_SHIM_RAW below; we can do better. +#include "../UiStringIds.h" + struct Peep; struct TileElement; struct Vehicle; @@ -107,8 +110,8 @@ namespace OpenRCT2::Ui::Windows WindowBase* ScenarioselectOpen(scenarioselect_callback callback); WindowBase* ScenarioselectOpen(std::function callback); - WindowBase* ErrorOpen(StringId title, StringId message, const class Formatter& formatter); - WindowBase* ErrorOpen(std::string_view title, std::string_view message); + WindowBase* ErrorOpen(StringId title, StringId message, const class Formatter& formatter, bool autoClose = false); + WindowBase* ErrorOpen(std::string_view title, std::string_view message, bool autoClose = false); WindowBase* LoadsaveOpen( int32_t type, std::string_view defaultPath, std::function callback, @@ -164,6 +167,10 @@ namespace OpenRCT2::Ui::Windows WindowBase* NetworkStatusOpenPassword(); void WindowNetworkStatusClose(); + WindowBase* ProgressWindowOpen(const std::string& text, close_callback onClose = nullptr); + void ProgressWindowSet(uint32_t currentProgress, uint32_t totalCount, StringId format = STR_NONE); + void ProgressWindowClose(); + void WindowTextInputKey(WindowBase* w, uint32_t keycode); void WindowTextInputOpen( WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, diff --git a/src/openrct2/AssetPackManager.cpp b/src/openrct2/AssetPackManager.cpp index 193be7c807..fbdd7ed41e 100644 --- a/src/openrct2/AssetPackManager.cpp +++ b/src/openrct2/AssetPackManager.cpp @@ -19,6 +19,7 @@ #include "core/String.hpp" #include "object/AudioSampleTable.h" +#include #include using namespace OpenRCT2; @@ -160,7 +161,7 @@ void AssetPackManager::LoadEnabledAssetPacks() { // Re-order asset packs std::vector> newAssetPacks; - EnumerateCommaSeparatedList(gConfigGeneral.AssetPackOrder, [&](std::string_view id) { + EnumerateCommaSeparatedList(Config::Get().general.AssetPackOrder, [&](std::string_view id) { auto index = GetAssetPackIndex(id); if (index != std::numeric_limits::max()) { @@ -177,7 +178,7 @@ void AssetPackManager::LoadEnabledAssetPacks() _assetPacks = std::move(newAssetPacks); // Set which asset packs are enabled - EnumerateCommaSeparatedList(gConfigGeneral.EnabledAssetPacks, [&](std::string_view id) { + EnumerateCommaSeparatedList(Config::Get().general.EnabledAssetPacks, [&](std::string_view id) { auto assetPack = GetAssetPack(id); if (assetPack != nullptr) { @@ -204,7 +205,7 @@ void AssetPackManager::SaveEnabledAssetPacks() orderList.pop_back(); if (enabledList.size() > 0) enabledList.pop_back(); - gConfigGeneral.AssetPackOrder = orderList; - gConfigGeneral.EnabledAssetPacks = enabledList; - ConfigSaveDefault(); + Config::Get().general.AssetPackOrder = orderList; + Config::Get().general.EnabledAssetPacks = enabledList; + Config::Save(); } diff --git a/src/openrct2/Cheats.cpp b/src/openrct2/Cheats.cpp index 6c14cd65c4..1ae25bba5d 100644 --- a/src/openrct2/Cheats.cpp +++ b/src/openrct2/Cheats.cpp @@ -12,7 +12,6 @@ #include "GameState.h" #include "actions/CheatSetAction.h" #include "actions/ParkSetLoanAction.h" -#include "config/Config.h" #include "core/DataSerialiser.h" #include "localisation/Localisation.h" #include "network/network.h" diff --git a/src/openrct2/Cheats.h b/src/openrct2/Cheats.h index 6f4680517f..a709d2c800 100644 --- a/src/openrct2/Cheats.h +++ b/src/openrct2/Cheats.h @@ -9,7 +9,7 @@ #pragma once -#include "common.h" +#include "core/Money.hpp" enum class StaffSpeedCheat { diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 466ba761d7..90d151db7d 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -68,6 +68,7 @@ #include "scenario/ScenarioRepository.h" #include "scenes/game/GameScene.h" #include "scenes/intro/IntroScene.h" +#include "scenes/preloader/PreloaderScene.h" #include "scenes/title/TitleScene.h" #include "scenes/title/TitleSequenceManager.h" #include "scripting/HookEngine.h" @@ -124,6 +125,7 @@ namespace OpenRCT2 #endif // Scenes + std::unique_ptr _preloaderScene; std::unique_ptr _introScene; std::unique_ptr _titleScene; std::unique_ptr _gameScene; @@ -175,9 +177,6 @@ namespace OpenRCT2 #ifndef DISABLE_NETWORK , _network(*this) #endif - , _introScene(std::make_unique(*this)) - , _titleScene(std::make_unique(*this)) - , _gameScene(std::make_unique(*this)) , _painter(std::make_unique(uiContext)) { // Can't have more than one context currently. @@ -311,24 +310,39 @@ namespace OpenRCT2 return EXIT_FAILURE; } - IScene* GetLoadingScene() override + IScene* GetPreloaderScene() override { - // TODO: Implement me. - return nullptr; + if (auto* scene = _preloaderScene.get()) + return scene; + + _preloaderScene = std::make_unique(*this); + return _preloaderScene.get(); } IScene* GetIntroScene() override { + if (auto* scene = _introScene.get()) + return scene; + + _introScene = std::make_unique(*this); return _introScene.get(); } IScene* GetTitleScene() override { + if (auto* scene = _titleScene.get()) + return scene; + + _titleScene = std::make_unique(*this); return _titleScene.get(); } IScene* GetGameScene() override { + if (auto* scene = _gameScene.get()) + return scene; + + _gameScene = std::make_unique(*this); return _gameScene.get(); } @@ -386,20 +400,20 @@ namespace OpenRCT2 CrashInit(); - if (String::Equals(gConfigGeneral.LastRunVersion, OPENRCT2_VERSION)) + if (String::Equals(Config::Get().general.LastRunVersion, OPENRCT2_VERSION)) { gOpenRCT2ShowChangelog = false; } else { gOpenRCT2ShowChangelog = true; - gConfigGeneral.LastRunVersion = OPENRCT2_VERSION; - ConfigSaveDefault(); + Config::Get().general.LastRunVersion = OPENRCT2_VERSION; + Config::Save(); } try { - _localisationService->OpenLanguage(gConfigGeneral.Language); + _localisationService->OpenLanguage(Config::Get().general.Language); } catch (const std::exception& e) { @@ -477,32 +491,12 @@ namespace OpenRCT2 EnsureUserContentDirectoriesExist(); - // TODO Ideally we want to delay this until we show the title so that we can - // still open the game window and draw a progress screen for the creation - // of the object cache. - _objectRepository->LoadOrConstruct(_localisationService->GetCurrentLanguage()); - - if (!gOpenRCT2Headless) - { - _assetPackManager->Scan(); - _assetPackManager->LoadEnabledAssetPacks(); - _assetPackManager->Reload(); - } - - // TODO Like objects, this can take a while if there are a lot of track designs - // its also really something really we might want to do in the background - // as its not required until the player wants to place a new ride. - _trackDesignRepository->Scan(_localisationService->GetCurrentLanguage()); - - _scenarioRepository->Scan(_localisationService->GetCurrentLanguage()); - TitleSequenceManager::Scan(); - if (!gOpenRCT2Headless) { Audio::Init(); Audio::PopulateDevices(); Audio::InitRideSoundsAndInfo(); - Audio::gGameSoundsOff = !gConfigSound.MasterSoundEnabled; + Audio::gGameSoundsOff = !Config::Get().sound.MasterSoundEnabled; } ChatInit(); @@ -520,7 +514,20 @@ namespace OpenRCT2 InputResetPlaceObjModifier(); ViewportInitAll(); - gameStateInitAll(GetGameState(), DEFAULT_MAP_SIZE); + ContextInit(); + + if (!gOpenRCT2Headless) + { + auto* preloaderScene = static_cast(GetPreloaderScene()); + SetActiveScene(preloaderScene); + + // TODO: preload the title scene in another (parallel) job. + preloaderScene->AddJob([this]() { InitialiseRepositories(); }); + } + else + { + InitialiseRepositories(); + } #ifdef ENABLE_SCRIPTING _scriptEngine.Initialise(); @@ -531,11 +538,48 @@ namespace OpenRCT2 return true; } + private: + void InitialiseRepositories() + { + if (!_initialised) + { + throw std::runtime_error("Context needs to be initialised first."); + } + + auto currentLanguage = _localisationService->GetCurrentLanguage(); + + OpenProgress(STR_CHECKING_OBJECT_FILES); + _objectRepository->LoadOrConstruct(currentLanguage); + + OpenProgress(STR_LOADING_GENERIC); + Audio::LoadAudioObjects(); + + if (!gOpenRCT2Headless) + { + OpenProgress(STR_CHECKING_ASSET_PACKS); + _assetPackManager->Scan(); + _assetPackManager->LoadEnabledAssetPacks(); + _assetPackManager->Reload(); + } + + OpenProgress(STR_CHECKING_TRACK_DESIGN_FILES); + _trackDesignRepository->Scan(currentLanguage); + + OpenProgress(STR_CHECKING_SCENARIO_FILES); + _scenarioRepository->Scan(currentLanguage); + + OpenProgress(STR_CHECKING_TITLE_SEQUENCES); + TitleSequenceManager::Scan(); + + OpenProgress(STR_LOADING_GENERIC); + } + + public: void InitialiseDrawingEngine() final override { assert(_drawingEngine == nullptr); - _drawingEngineType = gConfigGeneral.DrawingEngine; + _drawingEngineType = Config::Get().general.DrawingEngine; auto drawingEngineFactory = _uiContext->GetDrawingEngineFactory(); auto drawingEngine = drawingEngineFactory->Create(_drawingEngineType, _uiContext); @@ -553,8 +597,8 @@ namespace OpenRCT2 LOG_ERROR("Unable to create drawing engine. Falling back to software."); // Fallback to software - gConfigGeneral.DrawingEngine = DrawingEngine::Software; - ConfigSaveDefault(); + Config::Get().general.DrawingEngine = DrawingEngine::Software; + Config::Save(); DrawingEngineInit(); } } @@ -563,7 +607,7 @@ namespace OpenRCT2 try { drawingEngine->Initialise(); - drawingEngine->SetVSync(gConfigGeneral.UseVSync); + drawingEngine->SetVSync(Config::Get().general.UseVSync); _drawingEngine = std::move(drawingEngine); } catch (const std::exception& ex) @@ -581,8 +625,8 @@ namespace OpenRCT2 LOG_ERROR("Unable to initialise drawing engine. Falling back to software."); // Fallback to software - gConfigGeneral.DrawingEngine = DrawingEngine::Software; - ConfigSaveDefault(); + Config::Get().general.DrawingEngine = DrawingEngine::Software; + Config::Save(); DrawingEngineInit(); } } @@ -596,6 +640,29 @@ namespace OpenRCT2 _drawingEngine = nullptr; } + void OpenProgress(StringId captionStringId) override + { + auto captionString = _localisationService->GetString(captionStringId); + auto intent = Intent(INTENT_ACTION_PROGRESS_OPEN); + intent.PutExtra(INTENT_EXTRA_MESSAGE, captionString); + ContextOpenIntent(&intent); + } + + void SetProgress(uint32_t currentProgress, uint32_t totalCount, StringId format = STR_NONE) override + { + auto intent = Intent(INTENT_ACTION_PROGRESS_SET); + intent.PutExtra(INTENT_EXTRA_PROGRESS_OFFSET, currentProgress); + intent.PutExtra(INTENT_EXTRA_PROGRESS_TOTAL, totalCount); + intent.PutExtra(INTENT_EXTRA_STRING_ID, format); + ContextOpenIntent(&intent); + } + + void CloseProgress() override + { + auto intent = Intent(INTENT_ACTION_PROGRESS_CLOSE); + ContextOpenIntent(&intent); + } + bool LoadParkFromFile(const u8string& path, bool loadTitleScreenOnFail = false, bool asScenario = false) final override { LOG_VERBOSE("Context::LoadParkFromFile(%s)", path.c_str()); @@ -737,7 +804,7 @@ namespace OpenRCT2 } // This ensures that the newly loaded save reflects the user's // 'show real names of guests' option, now that it's a global setting - PeepUpdateNames(gConfigGeneral.ShowRealNamesOfGuests); + PeepUpdateNames(Config::Get().general.ShowRealNamesOfGuests); #ifndef DISABLE_NETWORK if (sendMap) { @@ -869,19 +936,20 @@ namespace OpenRCT2 if (gCustomRCT2DataPath.empty()) { // Check install directory - if (gConfigGeneral.RCT2Path.empty() || !Platform::OriginalGameDataExists(gConfigGeneral.RCT2Path)) + if (Config::Get().general.RCT2Path.empty() || !Platform::OriginalGameDataExists(Config::Get().general.RCT2Path)) { LOG_VERBOSE( - "install directory does not exist or invalid directory selected, %s", gConfigGeneral.RCT2Path.c_str()); - if (!ConfigFindOrBrowseInstallDirectory()) + "install directory does not exist or invalid directory selected, %s", + Config::Get().general.RCT2Path.c_str()); + if (!Config::FindOrBrowseInstallDirectory()) { - auto path = ConfigGetDefaultPath(); + auto path = Config::GetDefaultPath(); Console::Error::WriteLine( "An RCT2 install directory must be specified! Please edit \"game_path\" in %s.\n", path.c_str()); return std::string(); } } - result = gConfigGeneral.RCT2Path; + result = Config::Get().general.RCT2Path; } else { @@ -902,6 +970,162 @@ namespace OpenRCT2 return true; } + void SwitchToStartUpScene() + { + if (gOpenRCT2Headless) + { + // NONE or OPEN are the only allowed actions for headless mode + if (gOpenRCT2StartupAction != StartupAction::Open) + { + gOpenRCT2StartupAction = StartupAction::None; + } + } + else + { + if ((gOpenRCT2StartupAction == StartupAction::Title) && Config::Get().general.PlayIntro) + { + gOpenRCT2StartupAction = StartupAction::Intro; + } + } + + IScene* nextScene{}; + switch (gOpenRCT2StartupAction) + { + case StartupAction::Intro: + { + nextScene = GetIntroScene(); + break; + } + + case StartupAction::Title: + { + nextScene = GetTitleScene(); + break; + } + + case StartupAction::Open: + { + // A path that includes "://" is illegal with all common filesystems, so it is almost certainly a URL + // This way all cURL supported protocols, like http, ftp, scp and smb are automatically handled + if (strstr(gOpenRCT2StartupActionPath, "://") != nullptr) + { +#ifndef DISABLE_HTTP + // Download park and open it using its temporary filename + auto data = DownloadPark(gOpenRCT2StartupActionPath); + if (data.empty()) + { + nextScene = GetTitleScene(); + break; + } + + auto ms = MemoryStream(data.data(), data.size(), MEMORY_ACCESS::READ); + if (!LoadParkFromStream(&ms, gOpenRCT2StartupActionPath, true)) + { + Console::Error::WriteLine("Failed to load '%s'", gOpenRCT2StartupActionPath); + nextScene = GetTitleScene(); + break; + } +#endif + } + else + { + try + { + if (!LoadParkFromFile(gOpenRCT2StartupActionPath, true)) + { + nextScene = GetTitleScene(); + break; + } + } + catch (const std::exception& ex) + { + Console::Error::WriteLine("Failed to load '%s'", gOpenRCT2StartupActionPath); + Console::Error::WriteLine("%s", ex.what()); + nextScene = GetTitleScene(); + break; + } + } + + // Successfully loaded a file + nextScene = GetGameScene(); + break; + } + + case StartupAction::Edit: + { + if (String::SizeOf(gOpenRCT2StartupActionPath) == 0) + { + Editor::Load(); + nextScene = GetGameScene(); + } + else if (Editor::LoadLandscape(gOpenRCT2StartupActionPath)) + { + nextScene = GetGameScene(); + } + else + { + nextScene = GetTitleScene(); + } + break; + } + + default: + { + nextScene = GetTitleScene(); + } + } + + SetActiveScene(nextScene); + InitNetworkGame(nextScene == GetGameScene()); + } + + void InitNetworkGame(bool isGameScene) + { + if (isGameScene) + { +#ifndef DISABLE_NETWORK + if (gNetworkStart == NETWORK_MODE_SERVER) + { + if (gNetworkStartPort == 0) + { + gNetworkStartPort = Config::Get().network.DefaultPort; + } + + if (gNetworkStartAddress.empty()) + { + gNetworkStartAddress = Config::Get().network.ListenAddress; + } + + if (gCustomPassword.empty()) + { + _network.SetPassword(Config::Get().network.DefaultPassword.c_str()); + } + else + { + _network.SetPassword(gCustomPassword); + } + _network.BeginServer(gNetworkStartPort, gNetworkStartAddress); + } + else +#endif // DISABLE_NETWORK + { + GameLoadScripts(); + GameNotifyMapChanged(); + } + } + +#ifndef DISABLE_NETWORK + else if (gNetworkStart == NETWORK_MODE_CLIENT) + { + if (gNetworkStartPort == 0) + { + gNetworkStartPort = Config::Get().network.DefaultPort; + } + _network.BeginClient(gNetworkStartHost, gNetworkStartPort); + } +#endif // DISABLE_NETWORK + } + /** * Launches the game, after command line arguments have been parsed and processed. */ @@ -918,130 +1142,15 @@ namespace OpenRCT2 }); } - if (gOpenRCT2Headless) + if (!gOpenRCT2Headless) { - // NONE or OPEN are the only allowed actions for headless mode - if (gOpenRCT2StartupAction != StartupAction::Open) - { - gOpenRCT2StartupAction = StartupAction::None; - } + _preloaderScene->SetOnComplete([&]() { SwitchToStartUpScene(); }); } else { - if ((gOpenRCT2StartupAction == StartupAction::Title) && gConfigGeneral.PlayIntro) - { - gOpenRCT2StartupAction = StartupAction::Intro; - } + SwitchToStartUpScene(); } - switch (gOpenRCT2StartupAction) - { - case StartupAction::Intro: - SetActiveScene(GetIntroScene()); - break; - case StartupAction::Title: - SetActiveScene(GetTitleScene()); - break; - case StartupAction::Open: - { - // A path that includes "://" is illegal with all common filesystems, so it is almost certainly a URL - // This way all cURL supported protocols, like http, ftp, scp and smb are automatically handled - if (strstr(gOpenRCT2StartupActionPath, "://") != nullptr) - { -#ifndef DISABLE_HTTP - // Download park and open it using its temporary filename - auto data = DownloadPark(gOpenRCT2StartupActionPath); - if (data.empty()) - { - SetActiveScene(GetTitleScene()); - break; - } - - auto ms = MemoryStream(data.data(), data.size(), MEMORY_ACCESS::READ); - if (!LoadParkFromStream(&ms, gOpenRCT2StartupActionPath, true)) - { - Console::Error::WriteLine("Failed to load '%s'", gOpenRCT2StartupActionPath); - SetActiveScene(GetTitleScene()); - break; - } -#endif - } - else - { - try - { - if (!LoadParkFromFile(gOpenRCT2StartupActionPath, true)) - { - break; - } - } - catch (const std::exception& ex) - { - Console::Error::WriteLine("Failed to load '%s'", gOpenRCT2StartupActionPath); - Console::Error::WriteLine("%s", ex.what()); - SetActiveScene(GetTitleScene()); - break; - } - } - - SetActiveScene(GetGameScene()); - -#ifndef DISABLE_NETWORK - if (gNetworkStart == NETWORK_MODE_SERVER) - { - if (gNetworkStartPort == 0) - { - gNetworkStartPort = gConfigNetwork.DefaultPort; - } - - if (gNetworkStartAddress.empty()) - { - gNetworkStartAddress = gConfigNetwork.ListenAddress; - } - - if (gCustomPassword.empty()) - { - _network.SetPassword(gConfigNetwork.DefaultPassword.c_str()); - } - else - { - _network.SetPassword(gCustomPassword); - } - _network.BeginServer(gNetworkStartPort, gNetworkStartAddress); - } - else -#endif // DISABLE_NETWORK - { - GameLoadScripts(); - GameNotifyMapChanged(); - } - break; - } - case StartupAction::Edit: - if (String::SizeOf(gOpenRCT2StartupActionPath) == 0) - { - Editor::Load(); - } - else if (!Editor::LoadLandscape(gOpenRCT2StartupActionPath)) - { - SetActiveScene(GetTitleScene()); - } - break; - default: - break; - } - -#ifndef DISABLE_NETWORK - if (gNetworkStart == NETWORK_MODE_CLIENT) - { - if (gNetworkStartPort == 0) - { - gNetworkStartPort = gConfigNetwork.DefaultPort; - } - _network.BeginClient(gNetworkStartHost, gNetworkStartPort); - } -#endif // DISABLE_NETWORK - _stdInOutConsole.Start(); RunGameLoop(); } @@ -1059,7 +1168,7 @@ namespace OpenRCT2 { if (!ShouldDraw()) return false; - if (!gConfigGeneral.UncapFPS) + if (!Config::Get().general.UncapFPS) return false; if (gGameSpeed > 4) return false; @@ -1423,7 +1532,7 @@ void ContextSetCurrentCursor(CursorID cursor) void ContextUpdateCursorScale() { - GetContext()->GetUiContext()->SetCursorScale(static_cast(std::round(gConfigGeneral.WindowScale))); + GetContext()->GetUiContext()->SetCursorScale(static_cast(std::round(Config::Get().general.WindowScale))); } void ContextHideCursor() @@ -1445,8 +1554,8 @@ ScreenCoordsXY ContextGetCursorPositionScaled() { auto cursorCoords = ContextGetCursorPosition(); // Compensate for window scaling. - return { static_cast(std::ceil(cursorCoords.x / gConfigGeneral.WindowScale)), - static_cast(std::ceil(cursorCoords.y / gConfigGeneral.WindowScale)) }; + return { static_cast(std::ceil(cursorCoords.x / Config::Get().general.WindowScale)), + static_cast(std::ceil(cursorCoords.y / Config::Get().general.WindowScale)) }; } void ContextSetCursorPosition(const ScreenCoordsXY& cursorPosition) @@ -1555,10 +1664,10 @@ void ContextForceCloseWindowByClass(WindowClass windowClass) windowManager->ForceClose(windowClass); } -WindowBase* ContextShowError(StringId title, StringId message, const Formatter& args) +WindowBase* ContextShowError(StringId title, StringId message, const Formatter& args, const bool autoClose /* = false */) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); - return windowManager->ShowError(title, message, args); + return windowManager->ShowError(title, message, args, autoClose); } void ContextHandleInput() diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 380242729a..39335fb622 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -144,7 +144,7 @@ namespace OpenRCT2 virtual NetworkBase& GetNetwork() abstract; #endif - virtual IScene* GetLoadingScene() abstract; + virtual IScene* GetPreloaderScene() abstract; virtual IScene* GetIntroScene() abstract; virtual IScene* GetTitleScene() abstract; virtual IScene* GetGameScene() abstract; @@ -158,6 +158,11 @@ namespace OpenRCT2 virtual bool Initialise() abstract; virtual void InitialiseDrawingEngine() abstract; virtual void DisposeDrawingEngine() abstract; + + virtual void OpenProgress(StringId captionStringId) abstract; + virtual void SetProgress(uint32_t currentProgress, uint32_t totalCount, StringId format = STR_NONE) abstract; + virtual void CloseProgress() abstract; + virtual bool LoadParkFromFile( const u8string& path, bool loadTitleScreenOnFail = false, bool asScenario = false) abstract; virtual bool LoadParkFromStream( @@ -221,7 +226,7 @@ void ContextSetCursorTrap(bool value); WindowBase* ContextOpenWindow(WindowClass wc); WindowBase* ContextOpenDetailWindow(uint8_t type, int32_t id); WindowBase* ContextOpenWindowView(uint8_t view); -WindowBase* ContextShowError(StringId title, StringId message, const class Formatter& args); +WindowBase* ContextShowError(StringId title, StringId message, const class Formatter& args, bool autoClose = false); WindowBase* ContextOpenIntent(Intent* intent); void ContextBroadcastIntent(Intent* intent); void ContextForceCloseWindowByClass(WindowClass wc); diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 7645933d94..1ec5b86167 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -27,6 +27,7 @@ #include "core/Console.hpp" #include "core/File.h" #include "core/FileScanner.h" +#include "core/Money.hpp" #include "core/Path.hpp" #include "entity/EntityRegistry.h" #include "entity/PatrolArea.h" @@ -105,7 +106,7 @@ void GameResetSpeed() void GameIncreaseGameSpeed() { - auto newSpeed = std::min(gConfigGeneral.DebuggingTools ? 5 : 4, gGameSpeed + 1); + auto newSpeed = std::min(Config::Get().general.DebuggingTools ? 5 : 4, gGameSpeed + 1); if (newSpeed == 5) newSpeed = 8; @@ -228,7 +229,7 @@ static void FixPeepsWithInvalidRideReference() // Fix possibly invalid field values for (auto peep : EntityList()) { - if (peep->CurrentRideStation.ToUnderlying() >= OpenRCT2::Limits::MaxStationsPerRide) + if (peep->CurrentRideStation.ToUnderlying() >= OpenRCT2::Limits::kMaxStationsPerRide) { const auto srcStation = peep->CurrentRideStation; const auto rideIdx = peep->CurrentRide; @@ -479,7 +480,7 @@ void SaveGameWithName(u8string_view name) LOG_VERBOSE("Saving to %s", u8string(name).c_str()); auto& gameState = GetGameState(); - if (ScenarioSave(gameState, name, gConfigGeneral.SavePluginData ? 1 : 0)) + if (ScenarioSave(gameState, name, Config::Get().general.SavePluginData ? 1 : 0)) { LOG_VERBOSE("Saved to %s", u8string(name).c_str()); gCurrentLoadedPath = name; @@ -585,7 +586,7 @@ void GameAutosave() timeName, sizeof(timeName), "autosave_%04u-%02u-%02u_%02u-%02u-%02u%s", currentDate.year, currentDate.month, currentDate.day, currentTime.hour, currentTime.minute, currentTime.second, fileExtension); - int32_t autosavesToKeep = gConfigGeneral.AutosaveAmount; + int32_t autosavesToKeep = Config::Get().general.AutosaveAmount; LimitAutosaveCount(autosavesToKeep - 1, (gScreenFlags & SCREEN_FLAGS_EDITOR)); auto env = GetContext()->GetPlatformEnvironment(); diff --git a/src/openrct2/GameState.cpp b/src/openrct2/GameState.cpp index 91ee2bc5de..ae59a0a87b 100644 --- a/src/openrct2/GameState.cpp +++ b/src/openrct2/GameState.cpp @@ -146,7 +146,7 @@ namespace OpenRCT2 } bool isPaused = GameIsPaused(); - if (NetworkGetMode() == NETWORK_MODE_SERVER && gConfigNetwork.PauseServerIfNoClients) + if (NetworkGetMode() == NETWORK_MODE_SERVER && Config::Get().network.PauseServerIfNoClients) { // If we are headless we always have 1 player (host), pause if no one else is around. if (gOpenRCT2Headless && NetworkGetNumPlayers() == 1) diff --git a/src/openrct2/GameState.h b/src/openrct2/GameState.h index 564166c58a..bcf3db304e 100644 --- a/src/openrct2/GameState.h +++ b/src/openrct2/GameState.h @@ -16,6 +16,7 @@ #include "interface/ZoomLevel.h" #include "management/Award.h" #include "management/Finance.h" +#include "management/Marketing.h" #include "management/NewsItem.h" #include "ride/Ride.h" #include "ride/RideRatings.h" @@ -52,7 +53,7 @@ namespace OpenRCT2 ClimateState ClimateNext; uint16_t ClimateUpdateTimer; money64 Cash; - money64 CashHistory[FINANCE_GRAPH_SIZE]; + money64 CashHistory[kFinanceGraphSize]; money64 InitialCash; money64 GuestInitialCash; uint8_t GuestInitialHappiness; @@ -68,7 +69,7 @@ namespace OpenRCT2 money64 TotalIncomeFromAdmissions; money64 TotalRideValueForMoney; uint16_t WeeklyProfitAverageDivisor; - money64 WeeklyProfitHistory[FINANCE_GRAPH_SIZE]; + money64 WeeklyProfitHistory[kFinanceGraphSize]; Objective ScenarioObjective; uint16_t ScenarioParkRatingWarningDays; money64 ScenarioCompletedCompanyValue; @@ -76,7 +77,7 @@ namespace OpenRCT2 money64 BankLoan; uint8_t BankLoanInterestRate; money64 MaxBankLoan; - money64 ExpenditureTable[EXPENDITURE_TABLE_MONTH_COUNT][EnumValue(ExpenditureType::Count)]; + money64 ExpenditureTable[kExpenditureTableMonthCount][EnumValue(ExpenditureType::Count)]; random_engine_t ScenarioRand; TileCoordsXY MapSize; money64 LandPrice; @@ -91,7 +92,7 @@ namespace OpenRCT2 std::vector Banners; Entity_t Entities[MAX_ENTITIES]{}; // Ride storage for all the rides in the park, rides with RideId::Null are considered free. - std::array Rides{}; + std::array Rides{}; ::RideRatingUpdateStates RideRatingUpdateStates; std::vector TileElements; @@ -131,6 +132,8 @@ namespace OpenRCT2 std::vector CurrentAwards; + std::vector MarketingCampaigns; + /** * Probability out of 65535, of gaining a new guest per game tick. * new guests per second = 40 * (probability / 65535) diff --git a/src/openrct2/Limits.h b/src/openrct2/Limits.h index fac488b501..10d5a3d6a1 100644 --- a/src/openrct2/Limits.h +++ b/src/openrct2/Limits.h @@ -12,26 +12,26 @@ namespace OpenRCT2::Limits { - constexpr uint16_t MaxRidesInPark = 1000; - constexpr uint16_t MaxStationsPerRide = 255; - constexpr uint8_t CustomerHistorySize = RCT12::Limits::CustomerHistorySize; - constexpr uint16_t MaxGolfHoles = RCT12::Limits::MaxGolfHoles; - constexpr uint16_t MaxHelices = RCT12::Limits::MaxHelices; - constexpr uint16_t MaxInversions = RCT12::Limits::MaxInversions; - constexpr uint16_t MaxTrainsPerRide = 255; - constexpr uint16_t MaxCarsPerTrain = 255; - constexpr const uint16_t MaxVehicleColours = MaxTrainsPerRide; // this should really be MaxTrainsPerRide * MaxCarsPerTrain - // MaxVehicleColours should be set to MaxTrainsPerRide or MaxCarsPerTrain, whichever is higher. - // Sadly, using std::max() will cause compilation failures when using MaxVehicleColours as an array size, + constexpr uint16_t kMaxRidesInPark = 1000; + constexpr uint16_t kMaxStationsPerRide = 255; + constexpr uint8_t kCustomerHistorySize = RCT12::Limits::kCustomerHistorySize; + constexpr uint16_t kMaxGolfHoles = RCT12::Limits::kMaxGolfHoles; + constexpr uint16_t kMaxHelices = RCT12::Limits::kMaxHelices; + constexpr uint16_t kMaxInversions = RCT12::Limits::kMaxInversions; + constexpr uint16_t kMaxTrainsPerRide = 255; + constexpr uint16_t kMaxCarsPerTrain = 255; + constexpr const uint16_t kMaxVehicleColours = kMaxTrainsPerRide; // this should really be kMaxTrainsPerRide * + // kMaxCarsPerTrain + // kMaxVehicleColours should be set to kMaxTrainsPerRide or kMaxCarsPerTrain, whichever is higher. + // Sadly, using std::max() will cause compilation failures when using kMaxVehicleColours as an array size, // hence the usage of static asserts. - static_assert(MaxVehicleColours >= MaxTrainsPerRide); - static_assert(MaxVehicleColours >= MaxCarsPerTrain); - constexpr uint8_t MaxCircuitsPerRide = 20; - constexpr uint8_t MaxAwards = RCT12::Limits::MaxAwards; - constexpr uint8_t NumColourSchemes = RCT12::Limits::NumColourSchemes; - constexpr uint8_t DowntimeHistorySize = RCT2::Limits::DowntimeHistorySize; - constexpr uint16_t MaxPeepSpawns = 256; - constexpr uint16_t MaxParkEntrances = 256; - constexpr uint8_t MaxWaitingTime = RCT12::Limits::MaxWaitingTime; - constexpr uint8_t CheatsMaxOperatingLimit = 255; + static_assert(kMaxVehicleColours >= kMaxTrainsPerRide); + static_assert(kMaxVehicleColours >= kMaxCarsPerTrain); + constexpr uint8_t kMaxCircuitsPerRide = 20; + constexpr uint8_t kMaxAwards = RCT12::Limits::kMaxAwards; + constexpr uint8_t kDowntimeHistorySize = RCT2::Limits::kDowntimeHistorySize; + constexpr uint16_t kMaxPeepSpawns = 256; + constexpr uint16_t kMaxParkEntrances = 256; + constexpr uint8_t kMaxWaitingTime = RCT12::Limits::kMaxWaitingTime; + constexpr uint8_t kCheatsMaxOperatingLimit = 255; } // namespace OpenRCT2::Limits diff --git a/src/openrct2/PlatformEnvironment.cpp b/src/openrct2/PlatformEnvironment.cpp index 025695715a..9fa88c09a4 100644 --- a/src/openrct2/PlatformEnvironment.cpp +++ b/src/openrct2/PlatformEnvironment.cpp @@ -15,6 +15,7 @@ #include "core/Path.hpp" #include "core/String.hpp" #include "platform/Platform.h" +#include "util/Util.h" using namespace OpenRCT2; @@ -258,18 +259,18 @@ std::unique_ptr OpenRCT2::CreatePlatformEnvironment() // Now load the config so we can get the RCT1 and RCT2 paths auto configPath = env->GetFilePath(PATHID::CONFIG); - ConfigSetDefaults(); - if (!ConfigOpen(configPath)) + Config::SetDefaults(); + if (!Config::OpenFromPath(configPath)) { - ConfigSave(configPath); + Config::SaveToPath(configPath); } if (gCustomRCT1DataPath.empty()) { - env->SetBasePath(DIRBASE::RCT1, gConfigGeneral.RCT1Path); + env->SetBasePath(DIRBASE::RCT1, Config::Get().general.RCT1Path); } if (gCustomRCT2DataPath.empty()) { - env->SetBasePath(DIRBASE::RCT2, gConfigGeneral.RCT2Path); + env->SetBasePath(DIRBASE::RCT2, Config::Get().general.RCT2Path); } // Log base paths diff --git a/src/openrct2/ReplayManager.cpp b/src/openrct2/ReplayManager.cpp index ccf52be267..06302995e6 100644 --- a/src/openrct2/ReplayManager.cpp +++ b/src/openrct2/ReplayManager.cpp @@ -669,7 +669,7 @@ namespace OpenRCT2 serialiser << gameState.GuestGenerationProbability; serialiser << gameState.SuggestedGuestMaximum; - serialiser << gConfigGeneral.ShowRealNamesOfGuests; + serialiser << Config::Get().general.ShowRealNamesOfGuests; // To make this a little bit less volatile against updates // we reserve some space for future additions. diff --git a/src/openrct2/Version.cpp b/src/openrct2/Version.cpp index 8d4cba9cc6..0b1863e608 100644 --- a/src/openrct2/Version.cpp +++ b/src/openrct2/Version.cpp @@ -16,6 +16,8 @@ #include +using namespace OpenRCT2; + #ifdef OPENRCT2_BUILD_INFO_HEADER # include OPENRCT2_BUILD_INFO_HEADER #endif @@ -61,7 +63,7 @@ NewVersionInfo GetLatestVersion() NewVersionInfo verinfo{ tag, "", "", "" }; #ifndef DISABLE_HTTP auto now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); - auto then = gConfigGeneral.LastVersionCheckTime; + auto then = Config::Get().general.LastVersionCheckTime; if (then < now - 24 * 60 * 60) { Http::Request request; @@ -88,8 +90,8 @@ NewVersionInfo GetLatestVersion() verinfo.changelog = Json::GetString(root["body"]); verinfo.url = Json::GetString(root["html_url"]); - gConfigGeneral.LastVersionCheckTime = now; - ConfigSaveDefault(); + Config::Get().general.LastVersionCheckTime = now; + Config::Save(); } #endif return verinfo; diff --git a/src/openrct2/actions/BannerPlaceAction.cpp b/src/openrct2/actions/BannerPlaceAction.cpp index 19830294b6..1e5e736392 100644 --- a/src/openrct2/actions/BannerPlaceAction.cpp +++ b/src/openrct2/actions/BannerPlaceAction.cpp @@ -103,6 +103,7 @@ GameActions::Result BannerPlaceAction::Query() const GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_ERR_BANNER_ELEMENT_NOT_FOUND); } res.Cost = bannerEntry->price; + res.SetData(BannerPlaceActionResult{}); return res; } diff --git a/src/openrct2/actions/CheatSetAction.cpp b/src/openrct2/actions/CheatSetAction.cpp index 194e505e10..fbfcde548d 100644 --- a/src/openrct2/actions/CheatSetAction.cpp +++ b/src/openrct2/actions/CheatSetAction.cpp @@ -274,7 +274,7 @@ GameActions::Result CheatSetAction::Execute() const if (NetworkGetMode() == NETWORK_MODE_NONE) { - ConfigSaveDefault(); + Config::Save(); } WindowInvalidateByClass(WindowClass::Cheats); @@ -598,7 +598,7 @@ void CheatSetAction::SetMoney(money64 amount) const void CheatSetAction::AddMoney(money64 amount) const { - GetGameState().Cash = AddClamp_money64(GetGameState().Cash, amount); + GetGameState().Cash = AddClamp(GetGameState().Cash, amount); WindowInvalidateByClass(WindowClass::Finances); WindowInvalidateByClass(WindowClass::BottomToolbar); @@ -711,10 +711,14 @@ void CheatSetAction::RemoveAllGuests() const for (Vehicle* vehicle = TryGetEntity(trainIndex); vehicle != nullptr; vehicle = TryGetEntity(vehicle->next_vehicle_on_train)) { + auto i = 0; for (auto& peepInTrainIndex : vehicle->peep) { + if (i >= vehicle->num_peeps) + break; + auto peep = TryGetEntity(peepInTrainIndex); - if (peep != nullptr) + if (peep != nullptr && peep->CurrentRide == ride.id) { if ((peep->State == PeepState::OnRide && peep->RideSubState == PeepRideSubState::OnRide) || (peep->State == PeepState::LeavingRide && peep->RideSubState == PeepRideSubState::LeaveVehicle)) @@ -723,6 +727,7 @@ void CheatSetAction::RemoveAllGuests() const } } peepInTrainIndex = EntityId::GetNull(); + i++; } vehicle->num_peeps = 0; diff --git a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp index e49cdd8849..0b602f9fd0 100644 --- a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp +++ b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp @@ -121,7 +121,8 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const if (!(sceneryFlags & (PATH_ADDITION_FLAG_JUMPING_FOUNTAIN_WATER | PATH_ADDITION_FLAG_JUMPING_FOUNTAIN_SNOW)) && (pathElement->GetEdges()) == 0x0F) { - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_CAN_ONLY_BE_PLACED_ON_PATH_EDGES); } if ((sceneryFlags & PATH_ADDITION_FLAG_IS_QUEUE_SCREEN) && !pathElement->IsQueue()) diff --git a/src/openrct2/actions/FootpathLayoutPlaceAction.cpp b/src/openrct2/actions/FootpathLayoutPlaceAction.cpp index c24cfaac2e..15b1d594e3 100644 --- a/src/openrct2/actions/FootpathLayoutPlaceAction.cpp +++ b/src/openrct2/actions/FootpathLayoutPlaceAction.cpp @@ -23,6 +23,7 @@ #include "../world/Park.h" #include "../world/Surface.h" #include "../world/Wall.h" +#include "../world/tile_element/Slope.h" using namespace OpenRCT2; @@ -153,8 +154,7 @@ GameActions::Result FootpathLayoutPlaceAction::ElementInsertQuery(GameActions::R // Do not attempt to build a crossing with a queue or a sloped path. auto isQueue = _constructFlags & PathConstructFlag::IsQueue; - uint8_t crossingMode = isQueue || (_slope != TILE_ELEMENT_SLOPE_FLAT) ? CREATE_CROSSING_MODE_NONE - : CREATE_CROSSING_MODE_PATH_OVER_TRACK; + auto crossingMode = isQueue || (_slope != kTileSlopeFlat) ? CreateCrossingMode::none : CreateCrossingMode::pathOverTrack; auto canBuild = MapCanConstructWithClearAt( { _loc, zLow, zHigh }, &MapPlaceNonSceneryClearFunc, quarterTile, GetFlags(), crossingMode); if (!entrancePath && canBuild.Error != GameActions::Status::Ok) @@ -224,8 +224,7 @@ GameActions::Result FootpathLayoutPlaceAction::ElementInsertExecute(GameActions: // Do not attempt to build a crossing with a queue or a sloped path. auto isQueue = _constructFlags & PathConstructFlag::IsQueue; - uint8_t crossingMode = isQueue || (_slope != TILE_ELEMENT_SLOPE_FLAT) ? CREATE_CROSSING_MODE_NONE - : CREATE_CROSSING_MODE_PATH_OVER_TRACK; + auto crossingMode = isQueue || (_slope != kTileSlopeFlat) ? CreateCrossingMode::none : CreateCrossingMode::pathOverTrack; auto canBuild = MapCanConstructWithClearAt( { _loc, zLow, zHigh }, &MapPlaceNonSceneryClearFunc, quarterTile, GAME_COMMAND_FLAG_APPLY | GetFlags(), crossingMode); if (!entrancePath && canBuild.Error != GameActions::Status::Ok) diff --git a/src/openrct2/actions/FootpathPlaceAction.cpp b/src/openrct2/actions/FootpathPlaceAction.cpp index c8eab3d63a..b661c0b515 100644 --- a/src/openrct2/actions/FootpathPlaceAction.cpp +++ b/src/openrct2/actions/FootpathPlaceAction.cpp @@ -26,6 +26,9 @@ #include "../world/Surface.h" #include "../world/TileElementsView.h" #include "../world/Wall.h" +#include "../world/tile_element/Slope.h" + +#include using namespace OpenRCT2; @@ -139,8 +142,7 @@ GameActions::Result FootpathPlaceAction::Execute() const auto zLow = _loc.z; auto zHigh = zLow + PATH_CLEARANCE; WallRemoveIntersectingWalls( - { _loc, zLow, zHigh + ((_slope & kTileElementSurfaceRaisedCornersMask) ? 16 : 0) }, - DirectionReverse(_direction)); + { _loc, zLow, zHigh + ((_slope & kTileSlopeRaisedCornersMask) ? 16 : 0) }, DirectionReverse(_direction)); WallRemoveIntersectingWalls( { _loc.x - CoordsDirectionDelta[_direction].x, _loc.y - CoordsDirectionDelta[_direction].y, zLow, zHigh }, _direction); @@ -301,8 +303,7 @@ GameActions::Result FootpathPlaceAction::ElementInsertQuery(GameActions::Result // Do not attempt to build a crossing with a queue or a sloped path. auto isQueue = _constructFlags & PathConstructFlag::IsQueue; - uint8_t crossingMode = isQueue || (_slope != TILE_ELEMENT_SLOPE_FLAT) ? CREATE_CROSSING_MODE_NONE - : CREATE_CROSSING_MODE_PATH_OVER_TRACK; + auto crossingMode = isQueue || (_slope != kTileSlopeFlat) ? CreateCrossingMode::none : CreateCrossingMode::pathOverTrack; auto canBuild = MapCanConstructWithClearAt( { _loc, zLow, zHigh }, &MapPlaceNonSceneryClearFunc, quarterTile, GetFlags(), crossingMode); if (!entrancePath && canBuild.Error != GameActions::Status::Ok) @@ -371,8 +372,7 @@ GameActions::Result FootpathPlaceAction::ElementInsertExecute(GameActions::Resul // Do not attempt to build a crossing with a queue or a sloped. auto isQueue = _constructFlags & PathConstructFlag::IsQueue; - uint8_t crossingMode = isQueue || (_slope != TILE_ELEMENT_SLOPE_FLAT) ? CREATE_CROSSING_MODE_NONE - : CREATE_CROSSING_MODE_PATH_OVER_TRACK; + auto crossingMode = isQueue || (_slope != kTileSlopeFlat) ? CreateCrossingMode::none : CreateCrossingMode::pathOverTrack; auto canBuild = MapCanConstructWithClearAt( { _loc, zLow, zHigh }, &MapPlaceNonSceneryClearFunc, quarterTile, GAME_COMMAND_FLAG_APPLY | GetFlags(), crossingMode); if (!entrancePath && canBuild.Error != GameActions::Status::Ok) diff --git a/src/openrct2/actions/GameActionResult.h b/src/openrct2/actions/GameActionResult.h index 15b17bbfd9..77dae0978b 100644 --- a/src/openrct2/actions/GameActionResult.h +++ b/src/openrct2/actions/GameActionResult.h @@ -8,7 +8,6 @@ *****************************************************************************/ #pragma once -#include "../localisation/StringIds.h" #include "../management/Finance.h" #include "../world/Location.hpp" diff --git a/src/openrct2/actions/GameSetSpeedAction.cpp b/src/openrct2/actions/GameSetSpeedAction.cpp index 258ba06df6..1d72b3320c 100644 --- a/src/openrct2/actions/GameSetSpeedAction.cpp +++ b/src/openrct2/actions/GameSetSpeedAction.cpp @@ -11,6 +11,8 @@ #include "../config/Config.h" +using namespace OpenRCT2; + GameSetSpeedAction::GameSetSpeedAction(int32_t speed) : _speed(speed) { @@ -66,5 +68,5 @@ GameActions::Result GameSetSpeedAction::Execute() const bool GameSetSpeedAction::IsValidSpeed(int32_t speed) const { - return (speed >= 1 && speed <= 4) || (gConfigGeneral.DebuggingTools && speed == 8); + return (speed >= 1 && speed <= 4) || (Config::Get().general.DebuggingTools && speed == 8); } diff --git a/src/openrct2/actions/LandLowerAction.cpp b/src/openrct2/actions/LandLowerAction.cpp index 4e363d09bb..89c50e66c6 100644 --- a/src/openrct2/actions/LandLowerAction.cpp +++ b/src/openrct2/actions/LandLowerAction.cpp @@ -25,6 +25,7 @@ #include "../world/Scenery.h" #include "../world/Surface.h" #include "../world/SurfaceData.h" +#include "../world/tile_element/Slope.h" LandLowerAction::LandLowerAction(const CoordsXY& coords, MapRange range, uint8_t selectionType) : _coords(coords) @@ -104,9 +105,9 @@ GameActions::Result LandLowerAction::QueryExecute(bool isExecuting) const withinOwnership = true; uint8_t height = surfaceElement->BaseHeight; - if (surfaceElement->GetSlope() & kTileElementSurfaceRaisedCornersMask) + if (surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) height += 2; - if (surfaceElement->GetSlope() & kTileElementSurfaceDiagonalFlag) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) height += 2; if (height < maxHeight) @@ -115,10 +116,10 @@ GameActions::Result LandLowerAction::QueryExecute(bool isExecuting) const height = surfaceElement->BaseHeight; uint8_t currentSlope = surfaceElement->GetSlope(); uint8_t newSlope = LowerSurfaceCornerFlags(tableRow, currentSlope); - if (newSlope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (newSlope & kTileSlopeRaiseOrLowerBaseHeight) height -= 2; - newSlope &= kTileElementSurfaceSlopeMask; + newSlope &= kTileSlopeMask; auto landSetHeightAction = LandSetHeightAction({ x, y }, height, newSlope); landSetHeightAction.SetFlags(GetFlags()); diff --git a/src/openrct2/actions/LandRaiseAction.cpp b/src/openrct2/actions/LandRaiseAction.cpp index 3e0ccbdcb2..fd40337640 100644 --- a/src/openrct2/actions/LandRaiseAction.cpp +++ b/src/openrct2/actions/LandRaiseAction.cpp @@ -26,6 +26,7 @@ #include "../world/Scenery.h" #include "../world/Surface.h" #include "../world/SurfaceData.h" +#include "../world/tile_element/Slope.h" LandRaiseAction::LandRaiseAction(const CoordsXY& coords, MapRange range, uint8_t selectionType) : _coords(coords) @@ -111,7 +112,7 @@ GameActions::Result LandRaiseAction::QueryExecute(bool isExecuting) const uint8_t currentSlope = surfaceElement->GetSlope(); uint8_t newSlope = RaiseSurfaceCornerFlags(tableRow, currentSlope); - if (newSlope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (newSlope & kTileSlopeRaiseOrLowerBaseHeight) { if (height + 2 > UINT8_MAX) { @@ -122,7 +123,7 @@ GameActions::Result LandRaiseAction::QueryExecute(bool isExecuting) const height += 2; } } - newSlope &= kTileElementSurfaceSlopeMask; + newSlope &= kTileSlopeMask; auto landSetHeightAction = LandSetHeightAction({ x, y }, height, newSlope); landSetHeightAction.SetFlags(GetFlags()); diff --git a/src/openrct2/actions/LandSetHeightAction.cpp b/src/openrct2/actions/LandSetHeightAction.cpp index 64a9edebbe..5b7f07fe1b 100644 --- a/src/openrct2/actions/LandSetHeightAction.cpp +++ b/src/openrct2/actions/LandSetHeightAction.cpp @@ -24,6 +24,7 @@ #include "../world/Scenery.h" #include "../world/Surface.h" #include "../world/TileElementsView.h" +#include "../world/tile_element/Slope.h" using namespace OpenRCT2; @@ -127,10 +128,10 @@ GameActions::Result LandSetHeightAction::Query() const if (!GetGameState().Cheats.DisableClearanceChecks) { uint8_t zCorner = _height; - if (_style & kTileElementSurfaceRaisedCornersMask) + if (_style & kTileSlopeRaisedCornersMask) { zCorner += 2; - if (_style & kTileElementSurfaceDiagonalFlag) + if (_style & kTileSlopeDiagonalFlag) { zCorner += 2; } @@ -138,7 +139,7 @@ GameActions::Result LandSetHeightAction::Query() const auto clearResult = MapCanConstructWithClearAt( { _coords, _height * COORDS_Z_STEP, zCorner * COORDS_Z_STEP }, &MapSetLandHeightClearFunc, { 0b1111, 0 }, 0, - CREATE_CROSSING_MODE_NONE); + CreateCrossingMode::none); if (clearResult.Error != GameActions::Status::Ok) { clearResult.Error = GameActions::Status::Disallowed; @@ -197,12 +198,12 @@ StringId LandSetHeightAction::CheckParameters() const return STR_TOO_HIGH; } - if (_height > kMaximumLandHeight - 2 && (_style & kTileElementSurfaceSlopeMask) != 0) + if (_height > kMaximumLandHeight - 2 && (_style & kTileSlopeMask) != 0) { return STR_TOO_HIGH; } - if (_height == kMaximumLandHeight - 2 && (_style & kTileElementSurfaceDiagonalFlag)) + if (_height == kMaximumLandHeight - 2 && (_style & kTileSlopeDiagonalFlag)) { return STR_TOO_HIGH; } @@ -302,10 +303,10 @@ TileElement* LandSetHeightAction::CheckFloatingStructures(TileElement* surfaceEl uint32_t waterHeight = surfaceElement->AsSurface()->GetWaterHeight(); if (waterHeight != 0) { - if (_style & kTileElementSurfaceSlopeMask) + if (_style & kTileSlopeMask) { zCorner += 2; - if (_style & kTileElementSurfaceDiagonalFlag) + if (_style & kTileSlopeDiagonalFlag) { zCorner += 2; } @@ -325,7 +326,7 @@ money64 LandSetHeightAction::GetSurfaceHeightChangeCost(SurfaceElement* surfaceE for (Direction i : ALL_DIRECTIONS) { int32_t cornerHeight = TileElementGetCornerHeight(surfaceElement, i); - cornerHeight -= MapGetCornerHeight(_height, _style & kTileElementSurfaceSlopeMask, i); + cornerHeight -= MapGetCornerHeight(_height, _style & kTileSlopeMask, i); cost += 2.50_GBP * abs(cornerHeight); } return cost; diff --git a/src/openrct2/actions/LandSmoothAction.cpp b/src/openrct2/actions/LandSmoothAction.cpp index 581eac460a..ab608348ca 100644 --- a/src/openrct2/actions/LandSmoothAction.cpp +++ b/src/openrct2/actions/LandSmoothAction.cpp @@ -25,6 +25,9 @@ #include "../world/Scenery.h" #include "../world/Surface.h" #include "../world/SurfaceData.h" +#include "../world/tile_element/Slope.h" + +#include LandSmoothAction::LandSmoothAction(const CoordsXY& coords, MapRange range, uint8_t selectionType, bool isLowering) : _coords(coords) @@ -72,19 +75,19 @@ GameActions::Result LandSmoothAction::SmoothLandTile( if (_isLowering) { slope = LowerSurfaceCornerFlags(direction, slope); - if (slope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (slope & kTileSlopeRaiseOrLowerBaseHeight) { targetBaseZ -= 2; - slope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + slope &= ~kTileSlopeRaiseOrLowerBaseHeight; } } else { slope = RaiseSurfaceCornerFlags(direction, slope); - if (slope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (slope & kTileSlopeRaiseOrLowerBaseHeight) { targetBaseZ += 2; - slope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + slope &= ~kTileSlopeRaiseOrLowerBaseHeight; } } @@ -186,10 +189,10 @@ money64 LandSmoothAction::SmoothLandRowByEdge( if (shouldContinue & 0x4) { slope = LowerSurfaceCornerFlags(direction1, slope); - if (slope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (slope & kTileSlopeRaiseOrLowerBaseHeight) { targetBaseZ -= 2; - slope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + slope &= ~kTileSlopeRaiseOrLowerBaseHeight; } } if ((shouldContinue & 0x8) @@ -197,10 +200,10 @@ money64 LandSmoothAction::SmoothLandRowByEdge( == MapGetCornerHeight(targetBaseZ, slope, direction2)) { slope = LowerSurfaceCornerFlags(direction2, slope); - if (slope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (slope & kTileSlopeRaiseOrLowerBaseHeight) { targetBaseZ -= 2; - slope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + slope &= ~kTileSlopeRaiseOrLowerBaseHeight; } } } @@ -209,10 +212,10 @@ money64 LandSmoothAction::SmoothLandRowByEdge( if (shouldContinue & 0x4) { slope = RaiseSurfaceCornerFlags(direction1, slope); - if (slope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (slope & kTileSlopeRaiseOrLowerBaseHeight) { targetBaseZ += 2; - slope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + slope &= ~kTileSlopeRaiseOrLowerBaseHeight; } } if ((shouldContinue & 0x8) @@ -220,10 +223,10 @@ money64 LandSmoothAction::SmoothLandRowByEdge( == MapGetCornerHeight(targetBaseZ, slope, direction2)) { slope = RaiseSurfaceCornerFlags(direction2, slope); - if (slope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (slope & kTileSlopeRaiseOrLowerBaseHeight) { targetBaseZ += 2; - slope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + slope &= ~kTileSlopeRaiseOrLowerBaseHeight; } } } @@ -456,10 +459,10 @@ GameActions::Result LandSmoothAction::SmoothLand(bool isExecuting) const newSlope = LowerSurfaceCornerFlags(selectionType, newSlope); } - if (newSlope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) + if (newSlope & kTileSlopeRaiseOrLowerBaseHeight) { newBaseZ += heightOffset; - newSlope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + newSlope &= ~kTileSlopeRaiseOrLowerBaseHeight; } // Smooth the corners @@ -546,11 +549,11 @@ GameActions::Result LandSmoothAction::SmoothLand(bool isExecuting) const uint8_t newSlope = raiseLand ? RaiseSurfaceCornerFlags(rowIndex, oldSlope) : LowerSurfaceCornerFlags(rowIndex, oldSlope); - const bool changeBaseHeight = newSlope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + const bool changeBaseHeight = newSlope & kTileSlopeRaiseOrLowerBaseHeight; if (changeBaseHeight) { newBaseZ += heightOffset; - newSlope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; + newSlope &= ~kTileSlopeRaiseOrLowerBaseHeight; } const uint8_t edge = selectionType - MAP_SELECT_TYPE_EDGE_0; diff --git a/src/openrct2/actions/LargeSceneryPlaceAction.cpp b/src/openrct2/actions/LargeSceneryPlaceAction.cpp index 832afdd52e..cadc81488d 100644 --- a/src/openrct2/actions/LargeSceneryPlaceAction.cpp +++ b/src/openrct2/actions/LargeSceneryPlaceAction.cpp @@ -21,6 +21,7 @@ #include "../world/ConstructionClearance.h" #include "../world/MapAnimation.h" #include "../world/Surface.h" +#include "../world/tile_element/Slope.h" using namespace OpenRCT2; @@ -134,7 +135,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const QuarterTile quarterTile = QuarterTile{ static_cast(tile->flags >> 12), 0 }.Rotate(_loc.direction); const auto isTree = (sceneryEntry->flags & LARGE_SCENERY_FLAG_IS_TREE) != 0; auto canBuild = MapCanConstructWithClearAt( - { curTile, zLow, zHigh }, &MapPlaceSceneryClearFunc, quarterTile, GetFlags(), CREATE_CROSSING_MODE_NONE, isTree); + { curTile, zLow, zHigh }, &MapPlaceSceneryClearFunc, quarterTile, GetFlags(), CreateCrossingMode::none, isTree); if (canBuild.Error != GameActions::Status::Ok) { canBuild.ErrorTitle = STR_CANT_POSITION_THIS_HERE; @@ -272,7 +273,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const QuarterTile quarterTile = QuarterTile{ static_cast(tile->flags >> 12), 0 }.Rotate(_loc.direction); const auto isTree = (sceneryEntry->flags & LARGE_SCENERY_FLAG_IS_TREE) != 0; auto canBuild = MapCanConstructWithClearAt( - { curTile, zLow, zHigh }, &MapPlaceSceneryClearFunc, quarterTile, GetFlags(), CREATE_CROSSING_MODE_NONE, isTree); + { curTile, zLow, zHigh }, &MapPlaceSceneryClearFunc, quarterTile, GetFlags(), CreateCrossingMode::none, isTree); if (canBuild.Error != GameActions::Status::Ok) { if (banner != nullptr) @@ -374,10 +375,10 @@ int16_t LargeSceneryPlaceAction::GetMaxSurfaceHeight(LargeSceneryTile* tiles) co int32_t baseZ = surfaceElement->GetBaseZ(); int32_t slope = surfaceElement->GetSlope(); - if ((slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) != TILE_ELEMENT_SLOPE_FLAT) + if ((slope & kTileSlopeRaisedCornersMask) != kTileSlopeFlat) { baseZ += LAND_HEIGHT_STEP; - if (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (slope & kTileSlopeDiagonalFlag) { baseZ += LAND_HEIGHT_STEP; } diff --git a/src/openrct2/actions/MapChangeSizeAction.cpp b/src/openrct2/actions/MapChangeSizeAction.cpp index 04e28ac200..18f4d86c2c 100644 --- a/src/openrct2/actions/MapChangeSizeAction.cpp +++ b/src/openrct2/actions/MapChangeSizeAction.cpp @@ -18,7 +18,13 @@ #include "../world/Park.h" MapChangeSizeAction::MapChangeSizeAction(const TileCoordsXY& targetSize) + : MapChangeSizeAction(targetSize, TileCoordsXY()) +{ +} + +MapChangeSizeAction::MapChangeSizeAction(const TileCoordsXY& targetSize, const TileCoordsXY& shift) : _targetSize(targetSize) + , _shift(shift) { } @@ -31,6 +37,7 @@ void MapChangeSizeAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); stream << DS_TAG(_targetSize); + stream << DS_TAG(_shift); } GameActions::Result MapChangeSizeAction::Query() const @@ -63,6 +70,9 @@ GameActions::Result MapChangeSizeAction::Execute() const MapExtendBoundarySurfaceY(); } + // Shift the map (allows increasing the map at the 0,0 position + ShiftMap(_shift); + // Shrink map if (_targetSize.x < gameState.MapSize.x || _targetSize.y < gameState.MapSize.y) { @@ -84,4 +94,6 @@ void MapChangeSizeAction::AcceptParameters(GameActionParameterVisitor& visitor) { visitor.Visit("targetSizeX", _targetSize.x); visitor.Visit("targetSizeY", _targetSize.y); + visitor.Visit("shiftX", _shift.x); + visitor.Visit("shiftY", _shift.y); } diff --git a/src/openrct2/actions/MapChangeSizeAction.h b/src/openrct2/actions/MapChangeSizeAction.h index 81e8db3e64..e46bae208a 100644 --- a/src/openrct2/actions/MapChangeSizeAction.h +++ b/src/openrct2/actions/MapChangeSizeAction.h @@ -17,6 +17,7 @@ class MapChangeSizeAction final : public GameActionBase= OpenRCT2::Limits::MaxParkEntrances) + 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); diff --git a/src/openrct2/actions/ParkSetNameAction.cpp b/src/openrct2/actions/ParkSetNameAction.cpp index 668aa52dfb..57a9424a38 100644 --- a/src/openrct2/actions/ParkSetNameAction.cpp +++ b/src/openrct2/actions/ParkSetNameAction.cpp @@ -11,7 +11,6 @@ #include "../Context.h" #include "../GameState.h" -#include "../config/Config.h" #include "../core/MemoryStream.h" #include "../drawing/Drawing.h" #include "../localisation/Localisation.h" diff --git a/src/openrct2/actions/PeepSpawnPlaceAction.cpp b/src/openrct2/actions/PeepSpawnPlaceAction.cpp index 25a3732626..c27e534302 100644 --- a/src/openrct2/actions/PeepSpawnPlaceAction.cpp +++ b/src/openrct2/actions/PeepSpawnPlaceAction.cpp @@ -125,7 +125,7 @@ GameActions::Result PeepSpawnPlaceAction::Execute() const } // If we have reached our max peep spawns, remove the oldest spawns - while (gameState.PeepSpawns.size() >= Limits::MaxPeepSpawns) + while (gameState.PeepSpawns.size() >= Limits::kMaxPeepSpawns) { PeepSpawn oldestSpawn = *gameState.PeepSpawns.begin(); gameState.PeepSpawns.erase(gameState.PeepSpawns.begin()); diff --git a/src/openrct2/actions/ResultWithMessage.h b/src/openrct2/actions/ResultWithMessage.h index fd01d8e6c1..6a66e4980a 100644 --- a/src/openrct2/actions/ResultWithMessage.h +++ b/src/openrct2/actions/ResultWithMessage.h @@ -10,7 +10,6 @@ #pragma once #include "../common.h" -#include "../localisation/StringIds.h" struct ResultWithMessage { diff --git a/src/openrct2/actions/RideCreateAction.cpp b/src/openrct2/actions/RideCreateAction.cpp index 756ec806c8..67043789ed 100644 --- a/src/openrct2/actions/RideCreateAction.cpp +++ b/src/openrct2/actions/RideCreateAction.cpp @@ -176,7 +176,7 @@ GameActions::Result RideCreateAction::Execute() const { ride->ProposedNumTrains = 32; } - ride->max_trains = OpenRCT2::Limits::MaxTrainsPerRide; + 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; @@ -202,7 +202,7 @@ GameActions::Result RideCreateAction::Execute() const ride->lift_hill_speed = rtd.LiftData.minimum_speed; - ride->excitement = kRideRatingUndefined; + ride->ratings.setNull(); auto& gameState = GetGameState(); if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) diff --git a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp index 25c83501d6..41190da23c 100644 --- a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp +++ b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp @@ -62,7 +62,7 @@ GameActions::Result RideEntranceExitPlaceAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_ERR_RIDE_NOT_FOUND); } - if (_stationNum.ToUnderlying() >= Limits::MaxStationsPerRide) + if (_stationNum.ToUnderlying() >= Limits::kMaxStationsPerRide) { LOG_ERROR("Invalid station number for ride. stationNum: %u", _stationNum.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_ERR_VALUE_OUT_OF_RANGE); diff --git a/src/openrct2/actions/RideFreezeRatingAction.cpp b/src/openrct2/actions/RideFreezeRatingAction.cpp index 8d21ac88e4..db11ad4257 100644 --- a/src/openrct2/actions/RideFreezeRatingAction.cpp +++ b/src/openrct2/actions/RideFreezeRatingAction.cpp @@ -55,13 +55,13 @@ GameActions::Result RideFreezeRatingAction::Execute() const switch (_type) { case RideRatingType::Excitement: - ride->excitement = _value; + ride->ratings.excitement = _value; break; case RideRatingType::Intensity: - ride->intensity = _value; + ride->ratings.intensity = _value; break; case RideRatingType::Nausea: - ride->nausea = _value; + ride->ratings.nausea = _value; break; } diff --git a/src/openrct2/actions/RideSetAppearanceAction.cpp b/src/openrct2/actions/RideSetAppearanceAction.cpp index 3d6582103c..5527c20353 100644 --- a/src/openrct2/actions/RideSetAppearanceAction.cpp +++ b/src/openrct2/actions/RideSetAppearanceAction.cpp @@ -128,9 +128,7 @@ GameActions::Result RideSetAppearanceAction::Execute() const RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::VehicleColourScheme: - ride->colour_scheme_type &= ~( - RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN | RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_CAR); - ride->colour_scheme_type |= _value; + ride->vehicleColourSettings = static_cast(_value); for (uint32_t i = 1; i < std::size(ride->vehicle_colours); i++) { ride->vehicle_colours[i] = ride->vehicle_colours[0]; diff --git a/src/openrct2/actions/RideSetColourSchemeAction.cpp b/src/openrct2/actions/RideSetColourSchemeAction.cpp index 0f05019998..d0fe301bca 100644 --- a/src/openrct2/actions/RideSetColourSchemeAction.cpp +++ b/src/openrct2/actions/RideSetColourSchemeAction.cpp @@ -64,7 +64,7 @@ GameActions::Result RideSetColourSchemeAction::Query() const GameActions::Status::InvalidParameters, STR_CANT_SET_COLOUR_SCHEME, STR_INVALID_TRACK_PARAMETERS); } } - if (_newColourScheme >= OpenRCT2::Limits::NumColourSchemes) + if (_newColourScheme >= kNumRideColourSchemes) { return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_SET_COLOUR_SCHEME, STR_INVALID_COLOUR_SCHEME_PARAMETER); diff --git a/src/openrct2/actions/RideSetPriceAction.cpp b/src/openrct2/actions/RideSetPriceAction.cpp index 18c2361f3c..426a16f578 100644 --- a/src/openrct2/actions/RideSetPriceAction.cpp +++ b/src/openrct2/actions/RideSetPriceAction.cpp @@ -49,8 +49,6 @@ void RideSetPriceAction::Serialise(DataSerialiser& stream) GameActions::Result RideSetPriceAction::Query() const { - GameActions::Result res = GameActions::Result(); - auto ride = GetRide(_rideIndex); if (ride == nullptr) { @@ -66,7 +64,13 @@ GameActions::Result RideSetPriceAction::Query() const GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_OBJECT_ENTRY_NOT_FOUND); } - return res; + if (_price < kRideMinPrice || _price > kRideMaxPrice) + { + LOG_ERROR("Attempting to set an invalid price for rideIndex %u", _rideIndex.ToUnderlying()); + return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_EMPTY); + } + + return GameActions::Result(); } GameActions::Result RideSetPriceAction::Execute() const @@ -89,6 +93,12 @@ GameActions::Result RideSetPriceAction::Execute() const GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_OBJECT_ENTRY_NOT_FOUND); } + if (_price < kRideMinPrice || _price > kRideMaxPrice) + { + LOG_ERROR("Attempting to set an invalid price for rideIndex %u", _rideIndex.ToUnderlying()); + return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_EMPTY); + } + if (!ride->overall_view.IsNull()) { auto location = ride->overall_view.ToTileCentre(); diff --git a/src/openrct2/actions/RideSetSettingAction.cpp b/src/openrct2/actions/RideSetSettingAction.cpp index 8a8a8a12c8..a40aca3cb6 100644 --- a/src/openrct2/actions/RideSetSettingAction.cpp +++ b/src/openrct2/actions/RideSetSettingAction.cpp @@ -268,7 +268,7 @@ bool RideSetSettingAction::RideIsValidLiftHillSpeed(const Ride& ride) const bool RideSetSettingAction::RideIsValidNumCircuits() const { int32_t minNumCircuits = 1; - int32_t maxNumCircuits = GetGameState().Cheats.UnlockOperatingLimits ? 255 : Limits::MaxCircuitsPerRide; + int32_t maxNumCircuits = GetGameState().Cheats.UnlockOperatingLimits ? 255 : Limits::kMaxCircuitsPerRide; return _value >= minNumCircuits && _value <= maxNumCircuits; } diff --git a/src/openrct2/actions/SmallSceneryPlaceAction.cpp b/src/openrct2/actions/SmallSceneryPlaceAction.cpp index 4237b5b20a..43e7316ec1 100644 --- a/src/openrct2/actions/SmallSceneryPlaceAction.cpp +++ b/src/openrct2/actions/SmallSceneryPlaceAction.cpp @@ -28,6 +28,7 @@ #include "../world/Scenery.h" #include "../world/Surface.h" #include "../world/TileElement.h" +#include "../world/tile_element/Slope.h" #include "GameAction.h" #include "SmallSceneryRemoveAction.h" @@ -205,8 +206,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const } if (!GetGameState().Cheats.DisableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE)) - && !supportsRequired && !isOnWater && surfaceElement != nullptr - && (surfaceElement->GetSlope() != TILE_ELEMENT_SLOPE_FLAT)) + && !supportsRequired && !isOnWater && surfaceElement != nullptr && (surfaceElement->GetSlope() != kTileSlopeFlat)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_LEVEL_LAND_REQUIRED); } @@ -271,7 +271,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const QuarterTile quarterTile = QuarterTile{ collisionQuadrants, supports }.Rotate(quadRotation); const auto isTree = sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_IS_TREE); auto canBuild = MapCanConstructWithClearAt( - { _loc, zLow, zHigh }, &MapPlaceSceneryClearFunc, quarterTile, GetFlags(), CREATE_CROSSING_MODE_NONE, isTree); + { _loc, zLow, zHigh }, &MapPlaceSceneryClearFunc, quarterTile, GetFlags(), CreateCrossingMode::none, isTree); if (canBuild.Error != GameActions::Status::Ok) { canBuild.ErrorTitle = STR_CANT_POSITION_THIS_HERE; @@ -411,7 +411,7 @@ GameActions::Result SmallSceneryPlaceAction::Execute() const const auto isTree = sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_IS_TREE); auto canBuild = MapCanConstructWithClearAt( { _loc, zLow, zHigh }, &MapPlaceSceneryClearFunc, quarterTile, GetFlags() | GAME_COMMAND_FLAG_APPLY, - CREATE_CROSSING_MODE_NONE, isTree); + CreateCrossingMode::none, isTree); if (canBuild.Error != GameActions::Status::Ok) { canBuild.ErrorTitle = STR_CANT_POSITION_THIS_HERE; diff --git a/src/openrct2/actions/TrackDesignAction.cpp b/src/openrct2/actions/TrackDesignAction.cpp index 989294fac2..bbb84e3e27 100644 --- a/src/openrct2/actions/TrackDesignAction.cpp +++ b/src/openrct2/actions/TrackDesignAction.cpp @@ -66,10 +66,10 @@ GameActions::Result TrackDesignAction::Query() const auto& gameState = GetGameState(); auto& objManager = GetContext()->GetObjectManager(); - auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.vehicle_object); + auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.trackAndVehicle.vehicleObject); if (entryIndex == OBJECT_ENTRY_INDEX_NULL) { - // Force a fallback if the entry is not invented yet a td6 of it is selected, + // 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) { @@ -78,7 +78,7 @@ GameActions::Result TrackDesignAction::Query() const } // Colours do not matter as will be overwritten - auto rideCreateAction = RideCreateAction(_td.type, 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) @@ -103,11 +103,11 @@ GameActions::Result TrackDesignAction::Query() const if (GetFlags() & GAME_COMMAND_FLAG_REPLAY) flags |= GAME_COMMAND_FLAG_REPLAY; - auto queryRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, *ride, _loc); + auto queryRes = TrackDesignPlace(_td, flags, placeScenery, *ride, _loc); if (_trackDesignPlaceStateSceneryUnavailable) { placeScenery = false; - queryRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, *ride, _loc); + queryRes = TrackDesignPlace(_td, flags, placeScenery, *ride, _loc); } auto gameAction = RideDemolishAction(ride->id, RIDE_MODIFY_DEMOLISH); @@ -140,7 +140,7 @@ GameActions::Result TrackDesignAction::Execute() const auto& gameState = GetGameState(); auto& objManager = GetContext()->GetObjectManager(); - auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.vehicle_object); + auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.trackAndVehicle.vehicleObject); if (entryIndex != OBJECT_ENTRY_INDEX_NULL) { // Force a fallback if the entry is not invented yet a track design using it is selected. @@ -152,7 +152,7 @@ GameActions::Result TrackDesignAction::Execute() const } // Colours do not matter as will be overwritten - auto rideCreateAction = RideCreateAction(_td.type, 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) @@ -178,11 +178,11 @@ GameActions::Result TrackDesignAction::Execute() const if (GetFlags() & GAME_COMMAND_FLAG_REPLAY) flags |= GAME_COMMAND_FLAG_REPLAY; - auto queryRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, *ride, _loc); + auto queryRes = TrackDesignPlace(_td, flags, placeScenery, *ride, _loc); if (_trackDesignPlaceStateSceneryUnavailable) { placeScenery = false; - queryRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, *ride, _loc); + queryRes = TrackDesignPlace(_td, flags, placeScenery, *ride, _loc); } if (queryRes.Error != GameActions::Status::Ok) @@ -202,7 +202,7 @@ GameActions::Result TrackDesignAction::Execute() const // Execute. flags |= GAME_COMMAND_FLAG_APPLY; - auto execRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, *ride, _loc); + auto execRes = TrackDesignPlace(_td, flags, placeScenery, *ride, _loc); if (execRes.Error != GameActions::Status::Ok) { auto gameAction = RideDemolishAction(ride->id, RIDE_MODIFY_DEMOLISH); @@ -224,51 +224,47 @@ GameActions::Result TrackDesignAction::Execute() const GameActions::ExecuteNested(&rideSetVehicleAction); } - SetOperatingSettingNested(ride->id, RideSetSetting::Mode, static_cast(_td.ride_mode), GAME_COMMAND_FLAG_APPLY); - auto rideSetVehicleAction2 = RideSetVehicleAction(ride->id, RideSetVehicleType::NumTrains, _td.number_of_trains); + SetOperatingSettingNested( + ride->id, RideSetSetting::Mode, static_cast(_td.operation.rideMode), GAME_COMMAND_FLAG_APPLY); + auto rideSetVehicleAction2 = RideSetVehicleAction( + ride->id, RideSetVehicleType::NumTrains, _td.trackAndVehicle.numberOfTrains); GameActions::ExecuteNested(&rideSetVehicleAction2); auto rideSetVehicleAction3 = RideSetVehicleAction( - ride->id, RideSetVehicleType::NumCarsPerTrain, _td.number_of_cars_per_train); + ride->id, RideSetVehicleType::NumCarsPerTrain, _td.trackAndVehicle.numberOfCarsPerTrain); GameActions::ExecuteNested(&rideSetVehicleAction3); - SetOperatingSettingNested(ride->id, RideSetSetting::Departure, _td.depart_flags, GAME_COMMAND_FLAG_APPLY); - SetOperatingSettingNested(ride->id, RideSetSetting::MinWaitingTime, _td.min_waiting_time, GAME_COMMAND_FLAG_APPLY); - SetOperatingSettingNested(ride->id, RideSetSetting::MaxWaitingTime, _td.max_waiting_time, GAME_COMMAND_FLAG_APPLY); - SetOperatingSettingNested(ride->id, RideSetSetting::Operation, _td.operation_setting, GAME_COMMAND_FLAG_APPLY); - SetOperatingSettingNested(ride->id, RideSetSetting::LiftHillSpeed, _td.lift_hill_speed & 0x1F, GAME_COMMAND_FLAG_APPLY); + SetOperatingSettingNested(ride->id, RideSetSetting::Departure, _td.operation.departFlags, GAME_COMMAND_FLAG_APPLY); + SetOperatingSettingNested(ride->id, RideSetSetting::MinWaitingTime, _td.operation.minWaitingTime, GAME_COMMAND_FLAG_APPLY); + SetOperatingSettingNested(ride->id, RideSetSetting::MaxWaitingTime, _td.operation.maxWaitingTime, GAME_COMMAND_FLAG_APPLY); + SetOperatingSettingNested(ride->id, RideSetSetting::Operation, _td.operation.operationSetting, GAME_COMMAND_FLAG_APPLY); + SetOperatingSettingNested(ride->id, RideSetSetting::LiftHillSpeed, _td.operation.liftHillSpeed, GAME_COMMAND_FLAG_APPLY); - uint8_t num_circuits = _td.num_circuits; - if (num_circuits == 0) - { - num_circuits = 1; - } - SetOperatingSettingNested(ride->id, RideSetSetting::NumCircuits, num_circuits, GAME_COMMAND_FLAG_APPLY); + auto numCircuits = std::max(1, _td.operation.numCircuits); + SetOperatingSettingNested(ride->id, RideSetSetting::NumCircuits, numCircuits, GAME_COMMAND_FLAG_APPLY); ride->SetToDefaultInspectionInterval(); ride->lifecycle_flags |= RIDE_LIFECYCLE_NOT_CUSTOM_DESIGN; - ride->colour_scheme_type = _td.colour_scheme; + ride->vehicleColourSettings = _td.appearance.vehicleColourSettings; - ride->entrance_style = objManager.GetLoadedObjectEntryIndex(_td.StationObjectIdentifier); + ride->entrance_style = objManager.GetLoadedObjectEntryIndex(_td.appearance.stationObjectIdentifier); if (ride->entrance_style == OBJECT_ENTRY_INDEX_NULL) { ride->entrance_style = gameState.LastEntranceStyle; } - for (int32_t i = 0; i < Limits::NumColourSchemes; i++) + for (size_t i = 0; i < std::min(std::size(ride->track_colour), std::size(_td.appearance.trackColours)); i++) { - ride->track_colour[i].main = _td.track_spine_colour[i]; - ride->track_colour[i].additional = _td.track_rail_colour[i]; - ride->track_colour[i].supports = _td.track_support_colour[i]; + ride->track_colour[i] = _td.appearance.trackColours[i]; } - for (size_t i = 0; i < Limits::MaxVehicleColours; i++) + for (size_t i = 0; i < Limits::kMaxVehicleColours; i++) { - ride->vehicle_colours[i] = _td.vehicle_colours[i]; + ride->vehicle_colours[i] = _td.appearance.vehicleColours[i]; } for (int32_t count = 1; count == 1 || r.Error != GameActions::Status::Ok; ++count) { - auto name = count == 1 ? _td.name : (_td.name + " " + std::to_string(count)); + auto name = count == 1 ? _td.gameStateData.name : (_td.gameStateData.name + " " + std::to_string(count)); auto gameAction = RideSetNameAction(ride->id, name); gameAction.SetFlags(GetFlags()); r = GameActions::ExecuteNested(&gameAction); diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index 14a14e0117..2c769483fc 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -20,6 +20,7 @@ #include "../world/ConstructionClearance.h" #include "../world/MapAnimation.h" #include "../world/Surface.h" +#include "../world/tile_element/Slope.h" #include "RideSetSettingAction.h" using namespace OpenRCT2; @@ -104,7 +105,7 @@ GameActions::Result TrackPlaceAction::Query() const GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_ERR_VALUE_OUT_OF_RANGE); } - if (_brakeSpeed > kMaximumBrakeSpeed) + if (_brakeSpeed > kMaximumTrackSpeed) { LOG_WARNING("Invalid speed for track placement, speed = %d", _brakeSpeed); return GameActions::Result( @@ -260,10 +261,10 @@ GameActions::Result TrackPlaceAction::Query() const GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_TOO_HIGH); } - uint8_t crossingMode = (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SUPPORTS_LEVEL_CROSSINGS) - && _trackType == TrackElemType::Flat) - ? CREATE_CROSSING_MODE_TRACK_OVER_PATH - : CREATE_CROSSING_MODE_NONE; + auto crossingMode = (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SUPPORTS_LEVEL_CROSSINGS) + && _trackType == TrackElemType::Flat) + ? CreateCrossingMode::trackOverPath + : CreateCrossingMode::none; auto canBuild = MapCanConstructWithClearAt( { mapLoc, baseZ, clearanceZ }, &MapPlaceNonSceneryClearFunc, quarterTile, GetFlags(), crossingMode); if (canBuild.Error != GameActions::Status::Ok) @@ -340,9 +341,9 @@ GameActions::Result TrackPlaceAction::Query() const waterHeight -= LAND_HEIGHT_STEP; if (waterHeight == surfaceElement->GetBaseZ()) { - uint8_t slope = surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP; - if (slope == TILE_ELEMENT_SLOPE_W_CORNER_DN || slope == TILE_ELEMENT_SLOPE_S_CORNER_DN - || slope == TILE_ELEMENT_SLOPE_E_CORNER_DN || slope == TILE_ELEMENT_SLOPE_N_CORNER_DN) + uint8_t slope = surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask; + if (slope == kTileSlopeWCornerDown || slope == kTileSlopeSCornerDown || slope == kTileSlopeECornerDown + || slope == kTileSlopeNCornerDown) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, @@ -476,10 +477,10 @@ GameActions::Result TrackPlaceAction::Execute() const clearanceZ = Floor2(clearanceZ, COORDS_Z_STEP) + baseZ; const auto mapLocWithClearance = CoordsXYRangedZ(mapLoc, baseZ, clearanceZ); - uint8_t crossingMode = (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SUPPORTS_LEVEL_CROSSINGS) - && _trackType == TrackElemType::Flat) - ? CREATE_CROSSING_MODE_TRACK_OVER_PATH - : CREATE_CROSSING_MODE_NONE; + auto crossingMode = (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SUPPORTS_LEVEL_CROSSINGS) + && _trackType == TrackElemType::Flat) + ? CreateCrossingMode::trackOverPath + : CreateCrossingMode::none; auto canBuild = MapCanConstructWithClearAt( mapLocWithClearance, &MapPlaceNonSceneryClearFunc, quarterTile, GetFlags() | GAME_COMMAND_FLAG_APPLY, crossingMode); if (canBuild.Error != GameActions::Status::Ok) @@ -490,7 +491,7 @@ GameActions::Result TrackPlaceAction::Execute() const costs += canBuild.Cost; // When building a level crossing, remove any pre-existing path furniture. - if (crossingMode == CREATE_CROSSING_MODE_TRACK_OVER_PATH && !(GetFlags() & GAME_COMMAND_FLAG_GHOST)) + if (crossingMode == CreateCrossingMode::trackOverPath && !(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { auto footpathElement = MapGetFootpathElement(mapLoc); if (footpathElement != nullptr && footpathElement->HasAddition()) @@ -512,7 +513,7 @@ GameActions::Result TrackPlaceAction::Execute() const uint8_t intersectingDirections = wallEdges[blockIndex]; intersectingDirections ^= 0x0F; intersectingDirections = Numerics::rol4(intersectingDirections, _origin.direction); - for (int32_t i = 0; i < NumOrthogonalDirections; i++) + for (int32_t i = 0; i < kNumOrthogonalDirections; i++) { if (intersectingDirections & (1 << i)) { @@ -623,7 +624,7 @@ GameActions::Result TrackPlaceAction::Execute() const { trackElement->SetInverted(true); } - trackElement->SetColourScheme(_colour); + trackElement->SetColourScheme(static_cast(_colour)); entranceDirections = std::get<0>(ted.SequenceProperties); if (entranceDirections & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH) diff --git a/src/openrct2/actions/TrackRemoveAction.cpp b/src/openrct2/actions/TrackRemoveAction.cpp index b02824a06c..c294211e47 100644 --- a/src/openrct2/actions/TrackRemoveAction.cpp +++ b/src/openrct2/actions/TrackRemoveAction.cpp @@ -43,6 +43,18 @@ uint16_t TrackRemoveAction::GetActionFlags() const return GameAction::GetActionFlags(); } +static int32_t normaliseTrackType(int32_t trackType) +{ + switch (trackType) + { + case TrackElemType::BeginStation: + case TrackElemType::MiddleStation: + return TrackElemType::EndStation; + } + + return trackType; +} + void TrackRemoveAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); @@ -58,15 +70,7 @@ GameActions::Result TrackRemoveAction::Query() const res.Position.z = _origin.z; res.Expenditure = ExpenditureType::RideConstruction; - // Stations require some massaging of the track type for comparing - auto comparableTrackType = _trackType; - switch (_trackType) - { - case TrackElemType::BeginStation: - case TrackElemType::MiddleStation: - comparableTrackType = TrackElemType::EndStation; - break; - } + auto comparableTrackType = normaliseTrackType(_trackType); bool found = false; bool isGhost = GetFlags() & GAME_COMMAND_FLAG_GHOST; @@ -92,14 +96,7 @@ GameActions::Result TrackRemoveAction::Query() const if (tileElement->IsGhost() != isGhost) continue; - auto tileTrackType = tileElement->AsTrack()->GetTrackType(); - switch (tileTrackType) - { - case TrackElemType::BeginStation: - case TrackElemType::MiddleStation: - tileTrackType = TrackElemType::EndStation; - break; - } + auto tileTrackType = normaliseTrackType(tileElement->AsTrack()->GetTrackType()); if (tileTrackType != comparableTrackType) continue; @@ -265,15 +262,7 @@ GameActions::Result TrackRemoveAction::Execute() const res.Position.z = _origin.z; res.Expenditure = ExpenditureType::RideConstruction; - // Stations require some massaging of the track type for comparing - auto comparableTrackType = _trackType; - switch (_trackType) - { - case TrackElemType::BeginStation: - case TrackElemType::MiddleStation: - comparableTrackType = TrackElemType::EndStation; - break; - } + auto comparableTrackType = normaliseTrackType(_trackType); bool found = false; bool isGhost = GetFlags() & GAME_COMMAND_FLAG_GHOST; @@ -299,14 +288,7 @@ GameActions::Result TrackRemoveAction::Execute() const if (tileElement->IsGhost() != isGhost) continue; - auto tileTrackType = tileElement->AsTrack()->GetTrackType(); - switch (tileTrackType) - { - case TrackElemType::BeginStation: - case TrackElemType::MiddleStation: - tileTrackType = TrackElemType::EndStation; - break; - } + auto tileTrackType = normaliseTrackType(tileElement->AsTrack()->GetTrackType()); if (tileTrackType != comparableTrackType) continue; diff --git a/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp b/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp index b72d4a0e23..1c73514dcd 100644 --- a/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp +++ b/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp @@ -68,7 +68,7 @@ GameActions::Result TrackSetBrakeSpeedAction::QueryExecute(bool isExecuting) con GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_TILE_ELEMENT_NOT_FOUND); } - if (_brakeSpeed > kMaximumBrakeSpeed) + if (_brakeSpeed > kMaximumTrackSpeed) { LOG_WARNING("Invalid speed for track, speed = %d", _brakeSpeed); return GameActions::Result(GameActions::Status::InvalidParameters, STR_SPEED_TOO_HIGH, STR_NONE); diff --git a/src/openrct2/actions/WallPlaceAction.cpp b/src/openrct2/actions/WallPlaceAction.cpp index 3466dca401..cb9b3f5294 100644 --- a/src/openrct2/actions/WallPlaceAction.cpp +++ b/src/openrct2/actions/WallPlaceAction.cpp @@ -23,6 +23,7 @@ #include "../world/MapAnimation.h" #include "../world/Surface.h" #include "../world/Wall.h" +#include "../world/tile_element/Slope.h" using namespace OpenRCT2; using namespace OpenRCT2::TrackMetaData; @@ -170,7 +171,7 @@ GameActions::Result WallPlaceAction::Query() const GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND); } - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) { newEdge = (newEdge - 1) & 3; @@ -201,7 +202,7 @@ GameActions::Result WallPlaceAction::Query() const GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND); } - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) { newEdge = (newEdge - 1) & 3; diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index d3bb5947ea..91a2371d2b 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -65,7 +65,7 @@ namespace OpenRCT2::Audio return false; if (gGameSoundsOff) return false; - if (!gConfigSound.SoundEnabled) + if (!Config::Get().sound.SoundEnabled) return false; if (gOpenRCT2Headless) return false; @@ -75,25 +75,24 @@ namespace OpenRCT2::Audio void Init() { auto audioContext = GetContext()->GetAudioContext(); - if (gConfigSound.Device.empty()) + if (Config::Get().sound.Device.empty()) { audioContext->SetOutputDevice(""); _currentAudioDevice = 0; } else { - audioContext->SetOutputDevice(gConfigSound.Device); + audioContext->SetOutputDevice(Config::Get().sound.Device); PopulateDevices(); for (int32_t i = 0; i < GetDeviceCount(); i++) { - if (_audioDevices[i] == gConfigSound.Device) + if (_audioDevices[i] == Config::Get().sound.Device) { _currentAudioDevice = i; } } } - LoadAudioObjects(); } void LoadAudioObjects() @@ -305,7 +304,7 @@ namespace OpenRCT2::Audio } // Load title sequence audio object - auto descriptor = GetTitleMusicDescriptor(gConfigSound.TitleMusic); + auto descriptor = GetTitleMusicDescriptor(Config::Get().sound.TitleMusic); auto& objManager = GetContext()->GetObjectManager(); auto* audioObject = static_cast(objManager.LoadObject(descriptor)); if (audioObject != nullptr) @@ -385,7 +384,7 @@ namespace OpenRCT2::Audio } _currentAudioDevice = device; - ConfigSaveDefault(); + Config::Save(); } void Close() @@ -399,8 +398,8 @@ namespace OpenRCT2::Audio void ToggleAllSounds() { - gConfigSound.MasterSoundEnabled = !gConfigSound.MasterSoundEnabled; - if (gConfigSound.MasterSoundEnabled) + Config::Get().sound.MasterSoundEnabled = !Config::Get().sound.MasterSoundEnabled; + if (Config::Get().sound.MasterSoundEnabled) { Resume(); } diff --git a/src/openrct2/command_line/CommandLine.cpp b/src/openrct2/command_line/CommandLine.cpp index 3a204a7eb4..da05376047 100644 --- a/src/openrct2/command_line/CommandLine.cpp +++ b/src/openrct2/command_line/CommandLine.cpp @@ -12,6 +12,7 @@ #include "../OpenRCT2.h" #include "../core/Console.hpp" #include "../core/String.hpp" +#include "../drawing/Font.h" #include "../platform/Platform.h" #include diff --git a/src/openrct2/command_line/RootCommands.cpp b/src/openrct2/command_line/RootCommands.cpp index 9bf01e9b9e..36642024e3 100644 --- a/src/openrct2/command_line/RootCommands.cpp +++ b/src/openrct2/command_line/RootCommands.cpp @@ -31,6 +31,8 @@ #include #include +using namespace OpenRCT2; + #ifdef USE_BREAKPAD # define IMPLIES_SILENT_BREAKPAD ", implies --silent-breakpad" #else @@ -365,10 +367,10 @@ static exitcode_t HandleCommandSetRCT2(CommandLineArgEnumerator* enumerator) // Update RCT2 path in config auto env = OpenRCT2::CreatePlatformEnvironment(); auto configPath = env->GetFilePath(OpenRCT2::PATHID::CONFIG); - ConfigSetDefaults(); - ConfigOpen(configPath); - gConfigGeneral.RCT2Path = path; - if (ConfigSave(configPath)) + Config::SetDefaults(); + Config::OpenFromPath(configPath); + Config::Get().general.RCT2Path = path; + if (Config::SaveToPath(configPath)) { Console::WriteFormat("Updating RCT2 path to '%s'.", path.c_str()); Console::WriteLine(); @@ -394,7 +396,7 @@ static exitcode_t HandleCommandScanObjects([[maybe_unused]] CommandLineArgEnumer auto context = OpenRCT2::CreateContext(); auto env = context->GetPlatformEnvironment(); auto objectRepository = CreateObjectRepository(env); - objectRepository->Construct(gConfigGeneral.Language); + objectRepository->Construct(Config::Get().general.Language); return EXITCODE_OK; } diff --git a/src/openrct2/command_line/SimulateCommands.cpp b/src/openrct2/command_line/SimulateCommands.cpp index 9c6d3253a6..a1a39de33e 100644 --- a/src/openrct2/command_line/SimulateCommands.cpp +++ b/src/openrct2/command_line/SimulateCommands.cpp @@ -11,6 +11,7 @@ #include "../Game.h" #include "../GameState.h" #include "../OpenRCT2.h" +#include "../config/ConfigTypes.h" #include "../core/Console.hpp" #include "../entity/EntityRegistry.h" #include "../network/network.h" diff --git a/src/openrct2/common.h b/src/openrct2/common.h index e3851d17b5..14a2f3dea1 100644 --- a/src/openrct2/common.h +++ b/src/openrct2/common.h @@ -21,6 +21,7 @@ #endif #include "Diagnostic.h" +#include "localisation/StringIdType.h" #include #include @@ -38,83 +39,6 @@ using datetime64 = uint64_t; constexpr datetime64 DATETIME64_MIN = 0; -// Represent fixed point numbers. dp = decimal point -using fixed8_1dp = uint8_t; -using fixed8_2dp = uint8_t; -using fixed16_1dp = int16_t; -using fixed16_2dp = int16_t; -using fixed32_1dp = int32_t; -using fixed32_2dp = int32_t; -using fixed64_1dp = int64_t; - -// Money is stored as a multiple of 0.10. -using money16 = fixed16_1dp; -using money32 = fixed32_1dp; -using money64 = fixed64_1dp; - -// Construct a fixed point number. For example, to create the value 3.65 you -// would write FIXED_2DP(3,65) -#define FIXED_XDP(x, whole, fraction) ((whole) * (10 * (x)) + (fraction)) -#define FIXED_1DP(whole, fraction) FIXED_XDP(1, whole, fraction) -#define FIXED_2DP(whole, fraction) FIXED_XDP(10, whole, fraction) - -// For a user defined floating point literal, the parameter type must be a -// `long double` which is problematic on ppc64el, as the architecture uses a -// pair of `doubles` to represent that type. This cannot be converted to a -// `constexpr`. As a workaround, statically cast the `long double` down to a -// `double`. All of the uses of _GBP constants fit just fine, and if anyone -// really tries to use a gigantic constant that can't fit in a double, they are -// probably going to be breaking other things anyways. -// For more details, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26374 -constexpr money64 operator"" _GBP(long double money) noexcept -{ - return static_cast(money) * 10; -} - -constexpr money64 ToMoney64FromGBP(int32_t money) noexcept -{ - return money * 10; -} - -constexpr money64 ToMoney64FromGBP(int64_t money) noexcept -{ - return money * 10; -} - -constexpr money64 ToMoney64FromGBP(double money) noexcept -{ - return money * 10; -} - -constexpr money16 kMoney16Undefined = static_cast(static_cast(0xFFFF)); -constexpr money32 kMoney32Undefined = static_cast(0x80000000); -constexpr money64 kMoney64Undefined = static_cast(0x8000000000000000); - -constexpr money16 ToMoney16(money64 value) -{ - return value == kMoney64Undefined ? kMoney16Undefined : value; -} - -constexpr money64 ToMoney64(money32 value) -{ - return value == kMoney32Undefined ? kMoney64Undefined : value; -} - -constexpr money64 ToMoney64(money16 value) -{ - return value == kMoney16Undefined ? kMoney64Undefined : value; -} - -// Note: Only valid for 5 decimal places. -constexpr int32_t operator"" _mph(long double speedMph) -{ - uint32_t wholeNumber = speedMph; - uint64_t fraction = (speedMph - wholeNumber) * 100000; - return wholeNumber << 16 | ((fraction << 16) / 100000); -} - -using StringId = uint16_t; - #define abstract = 0 #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index 07a9aae467..b32c9ffc6c 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -10,6 +10,7 @@ #include "Config.h" #include "../Context.h" +#include "../Date.h" #include "../OpenRCT2.h" #include "../PlatformEnvironment.h" #include "../core/Console.hpp" @@ -26,7 +27,7 @@ #include "../network/network.h" #include "../paint/VirtualFloor.h" #include "../platform/Platform.h" -#include "../rct1/Limits.h" +#include "../rct1/Csg.h" #include "../scenario/Scenario.h" #include "../ui/UiContext.h" #include "../util/Util.h" @@ -42,9 +43,21 @@ static constexpr bool WindowButtonsOnTheLeftDefault = true; #else static constexpr bool WindowButtonsOnTheLeftDefault = false; #endif +#ifdef __ANDROID__ +static constexpr bool kEnlargedUiDefault = true; +#else +static constexpr bool kEnlargedUiDefault = false; +#endif -namespace Config +namespace OpenRCT2::Config { + static Config _config{}; + + Config& Get() + { + return _config; + } + #pragma region Enums static const auto Enum_MeasurementFormat = ConfigEnum({ @@ -142,7 +155,7 @@ namespace Config { if (reader->ReadSection("general")) { - auto model = &gConfigGeneral; + auto model = &_config.general; model->AlwaysShowGridlines = reader->GetBoolean("always_show_gridlines", false); model->AutosaveFrequency = reader->GetInt32("autosave", AUTOSAVE_EVERY_5MINUTES); model->AutosaveAmount = reader->GetInt32("autosave_amount", kDefaultNumAutosavesToKeep); @@ -241,7 +254,7 @@ namespace Config static void WriteGeneral(IIniWriter* writer) { - auto model = &gConfigGeneral; + auto model = &_config.general; writer->WriteSection("general"); writer->WriteBoolean("always_show_gridlines", model->AlwaysShowGridlines); writer->WriteInt32("autosave", model->AutosaveFrequency); @@ -326,7 +339,8 @@ namespace Config { if (reader->ReadSection("interface")) { - auto model = &gConfigInterface; + auto model = &_config.interface; + model->ToolbarButtonsCentred = reader->GetBoolean("toolbar_buttons_centred", false); model->ToolbarShowFinances = reader->GetBoolean("toolbar_show_finances", true); model->ToolbarShowResearch = reader->GetBoolean("toolbar_show_research", true); model->ToolbarShowCheats = reader->GetBoolean("toolbar_show_cheats", false); @@ -342,13 +356,16 @@ namespace Config model->ScenarioselectLastTab = reader->GetInt32("scenarioselect_last_tab", 0); model->ListRideVehiclesSeparately = reader->GetBoolean("list_ride_vehicles_separately", false); model->WindowButtonsOnTheLeft = reader->GetBoolean("window_buttons_on_the_left", WindowButtonsOnTheLeftDefault); + model->EnlargedUi = reader->GetBoolean("enlarged_ui", kEnlargedUiDefault); + model->TouchEnhancements = reader->GetBoolean("touch_enhancements", kEnlargedUiDefault); } } static void WriteInterface(IIniWriter* writer) { - auto model = &gConfigInterface; + auto model = &_config.interface; writer->WriteSection("interface"); + writer->WriteBoolean("toolbar_buttons_centred", model->ToolbarButtonsCentred); writer->WriteBoolean("toolbar_show_finances", model->ToolbarShowFinances); writer->WriteBoolean("toolbar_show_research", model->ToolbarShowResearch); writer->WriteBoolean("toolbar_show_cheats", model->ToolbarShowCheats); @@ -364,13 +381,15 @@ namespace Config writer->WriteInt32("scenarioselect_last_tab", model->ScenarioselectLastTab); writer->WriteBoolean("list_ride_vehicles_separately", model->ListRideVehiclesSeparately); writer->WriteBoolean("window_buttons_on_the_left", model->WindowButtonsOnTheLeft); + writer->WriteBoolean("enlarged_ui", model->EnlargedUi); + writer->WriteBoolean("touch_enhancements", model->TouchEnhancements); } static void ReadSound(IIniReader* reader) { if (reader->ReadSection("sound")) { - auto model = &gConfigSound; + auto model = &_config.sound; model->Device = reader->GetString("audio_device", ""); model->MasterSoundEnabled = reader->GetBoolean("master_sound", true); model->MasterVolume = reader->GetInt32("master_volume", 100); @@ -386,7 +405,7 @@ namespace Config static void WriteSound(IIniWriter* writer) { - auto model = &gConfigSound; + auto model = &_config.sound; writer->WriteSection("sound"); writer->WriteString("audio_device", model->Device); writer->WriteBoolean("master_sound", model->MasterSoundEnabled); @@ -419,7 +438,7 @@ namespace Config // to avoid people pretending to be someone else playerName = String::Trim(playerName); - auto model = &gConfigNetwork; + auto model = &_config.network; model->PlayerName = std::move(playerName); model->DefaultPort = reader->GetInt32("default_port", kNetworkDefaultPort); model->ListenAddress = reader->GetString("listen_address", ""); @@ -445,7 +464,7 @@ namespace Config static void WriteNetwork(IIniWriter* writer) { - auto model = &gConfigNetwork; + auto model = &_config.network; writer->WriteSection("network"); writer->WriteString("player_name", model->PlayerName); writer->WriteInt32("default_port", model->DefaultPort); @@ -473,7 +492,7 @@ namespace Config { if (reader->ReadSection("notifications")) { - auto model = &gConfigNotifications; + auto model = &_config.notifications; model->ParkAward = reader->GetBoolean("park_award", true); model->ParkMarketingCampaignFinished = reader->GetBoolean("park_marketing_campaign_finished", true); model->ParkWarnings = reader->GetBoolean("park_warnings", true); @@ -497,7 +516,7 @@ namespace Config static void WriteNotifications(IIniWriter* writer) { - auto model = &gConfigNotifications; + auto model = &_config.notifications; writer->WriteSection("notifications"); writer->WriteBoolean("park_award", model->ParkAward); writer->WriteBoolean("park_marketing_campaign_finished", model->ParkMarketingCampaignFinished); @@ -523,7 +542,7 @@ namespace Config { if (reader->ReadSection("font")) { - auto model = &gConfigFonts; + auto model = &_config.fonts; model->FileName = reader->GetString("file_name", ""); model->FontName = reader->GetString("font_name", ""); model->OffsetX = reader->GetInt32("x_offset", false); @@ -543,7 +562,7 @@ namespace Config static void WriteFont(IIniWriter* writer) { - auto model = &gConfigFonts; + auto model = &_config.fonts; writer->WriteSection("font"); writer->WriteString("file_name", model->FileName); writer->WriteString("font_name", model->FontName); @@ -565,7 +584,7 @@ namespace Config { if (reader->ReadSection("plugin")) { - auto model = &gConfigPlugin; + auto model = &_config.plugin; model->EnableHotReloading = reader->GetBoolean("enable_hot_reloading", false); model->AllowedHosts = reader->GetString("allowed_hosts", ""); } @@ -573,13 +592,13 @@ namespace Config static void WritePlugin(IIniWriter* writer) { - auto model = &gConfigPlugin; + auto model = &_config.plugin; writer->WriteSection("plugin"); writer->WriteBoolean("enable_hot_reloading", model->EnableHotReloading); writer->WriteString("allowed_hosts", model->AllowedHosts); } - static bool SetDefaults() + bool SetDefaults() { try { @@ -776,246 +795,158 @@ namespace Config LOG_INFO("Exit status %d", exit_status); return exit_status == 0; } -} // namespace Config -GeneralConfiguration gConfigGeneral; -InterfaceConfiguration gConfigInterface; -SoundConfiguration gConfigSound; -NetworkConfiguration gConfigNetwork; -NotificationConfiguration gConfigNotifications; -FontConfiguration gConfigFonts; -PluginConfiguration gConfigPlugin; - -void ConfigSetDefaults() -{ - Config::SetDefaults(); -} - -bool ConfigOpen(u8string_view path) -{ - if (!File::Exists(path)) + bool OpenFromPath(u8string_view path) { - return false; - } - - auto result = Config::ReadFile(path); - if (result) - { - CurrencyLoadCustomCurrencyConfig(); - } - return result; -} - -bool ConfigSave(u8string_view path) -{ - return Config::WriteFile(path); -} - -u8string ConfigGetDefaultPath() -{ - auto env = GetContext()->GetPlatformEnvironment(); - return Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"config.ini"); -} - -bool ConfigSaveDefault() -{ - auto path = ConfigGetDefaultPath(); - return ConfigSave(path); -} - -bool ConfigFindOrBrowseInstallDirectory() -{ - std::string path = Config::FindRCT2Path(); - if (!path.empty()) - { - gConfigGeneral.RCT2Path = path; - } - else - { - if (gOpenRCT2Headless) + if (!File::Exists(path)) { return false; } - auto uiContext = GetContext()->GetUiContext(); - if (!uiContext->HasFilePicker()) + auto result = ReadFile(path); + if (result) { - uiContext->ShowMessageBox(LanguageGetString(STR_NEEDS_RCT2_FILES_MANUAL)); - return false; + CurrencyLoadCustomCurrencyConfig(); } + return result; + } - try + u8string GetDefaultPath() + { + auto env = GetContext()->GetPlatformEnvironment(); + return Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"config.ini"); + } + + bool SaveToPath(u8string_view path) + { + return WriteFile(path); + } + + bool Save() + { + auto path = GetDefaultPath(); + return SaveToPath(path); + } + + bool FindOrBrowseInstallDirectory() + { + std::string path = FindRCT2Path(); + if (!path.empty()) { - const char* g1DatPath = PATH_SEPARATOR "Data" PATH_SEPARATOR "g1.dat"; - while (true) + Get().general.RCT2Path = path; + } + else + { + if (gOpenRCT2Headless) { - uiContext->ShowMessageBox(LanguageGetString(STR_NEEDS_RCT2_FILES)); - std::string gog = LanguageGetString(STR_OWN_ON_GOG); - std::string hdd = LanguageGetString(STR_INSTALLED_ON_HDD); + return false; + } - std::vector options; - std::string chosenOption; + auto uiContext = GetContext()->GetUiContext(); + if (!uiContext->HasFilePicker()) + { + uiContext->ShowMessageBox(LanguageGetString(STR_NEEDS_RCT2_FILES_MANUAL)); + return false; + } - if (uiContext->HasMenuSupport()) + try + { + const char* g1DatPath = PATH_SEPARATOR "Data" PATH_SEPARATOR "g1.dat"; + while (true) { - options.push_back(hdd); - options.push_back(gog); - int optionIndex = uiContext->ShowMenuDialog( - options, LanguageGetString(STR_OPENRCT2_SETUP), LanguageGetString(STR_WHICH_APPLIES_BEST)); - if (optionIndex < 0 || static_cast(optionIndex) >= options.size()) + uiContext->ShowMessageBox(LanguageGetString(STR_NEEDS_RCT2_FILES)); + std::string gog = LanguageGetString(STR_OWN_ON_GOG); + std::string hdd = LanguageGetString(STR_INSTALLED_ON_HDD); + + std::vector options; + std::string chosenOption; + + if (uiContext->HasMenuSupport()) { - // graceful fallback if app errors or user exits out of window - chosenOption = hdd; + options.push_back(hdd); + options.push_back(gog); + int optionIndex = uiContext->ShowMenuDialog( + options, LanguageGetString(STR_OPENRCT2_SETUP), LanguageGetString(STR_WHICH_APPLIES_BEST)); + if (optionIndex < 0 || static_cast(optionIndex) >= options.size()) + { + // graceful fallback if app errors or user exits out of window + chosenOption = hdd; + } + else + { + chosenOption = options[optionIndex]; + } } else { - chosenOption = options[optionIndex]; - } - } - else - { - chosenOption = hdd; - } - - std::string installPath; - if (chosenOption == hdd) - { - installPath = uiContext->ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR)); - } - else if (chosenOption == gog) - { - // Check if innoextract is installed. If not, prompt the user to install it. - std::string dummy; - if (!Platform::FindApp("innoextract", &dummy)) - { - uiContext->ShowMessageBox(LanguageGetString(STR_INSTALL_INNOEXTRACT)); - return false; + chosenOption = hdd; } - const std::string dest = Path::Combine( - GetContext()->GetPlatformEnvironment()->GetDirectoryPath(DIRBASE::CONFIG), "rct2"); - - while (true) + std::string installPath; + if (chosenOption == hdd) { - uiContext->ShowMessageBox(LanguageGetString(STR_PLEASE_SELECT_GOG_INSTALLER)); - utf8 gogPath[4096]; - if (!Config::SelectGogInstaller(gogPath)) + installPath = uiContext->ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR)); + } + else if (chosenOption == gog) + { + // Check if innoextract is installed. If not, prompt the user to install it. + std::string dummy; + if (!Platform::FindApp("innoextract", &dummy)) { - // The user clicked "Cancel", so stop trying. + uiContext->ShowMessageBox(LanguageGetString(STR_INSTALL_INNOEXTRACT)); return false; } - uiContext->ShowMessageBox(LanguageGetString(STR_THIS_WILL_TAKE_A_FEW_MINUTES)); + const std::string dest = Path::Combine( + GetContext()->GetPlatformEnvironment()->GetDirectoryPath(DIRBASE::CONFIG), "rct2"); - if (Config::ExtractGogInstaller(gogPath, dest)) - break; + while (true) + { + uiContext->ShowMessageBox(LanguageGetString(STR_PLEASE_SELECT_GOG_INSTALLER)); + utf8 gogPath[4096]; + if (!SelectGogInstaller(gogPath)) + { + // The user clicked "Cancel", so stop trying. + return false; + } - uiContext->ShowMessageBox(LanguageGetString(STR_NOT_THE_GOG_INSTALLER)); + uiContext->ShowMessageBox(LanguageGetString(STR_THIS_WILL_TAKE_A_FEW_MINUTES)); + + if (ExtractGogInstaller(gogPath, dest)) + break; + + uiContext->ShowMessageBox(LanguageGetString(STR_NOT_THE_GOG_INSTALLER)); + } + + installPath = Path::Combine(dest, u8"app"); + } + if (installPath.empty()) + { + return false; + } + Get().general.RCT2Path = installPath; + + if (Platform::OriginalGameDataExists(installPath)) + { + return true; } - installPath = Path::Combine(dest, u8"app"); + uiContext->ShowMessageBox(FormatStringIDLegacy(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath)); } - if (installPath.empty()) - { - return false; - } - gConfigGeneral.RCT2Path = installPath; - - if (Platform::OriginalGameDataExists(installPath)) - { - return true; - } - - uiContext->ShowMessageBox(FormatStringIDLegacy(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath)); + } + catch (const std::exception& ex) + { + Console::Error::WriteLine(ex.what()); + return false; } } - catch (const std::exception& ex) + // While we're at it, also check if the player has RCT1 + std::string rct1Path = FindRCT1Path(); + if (!rct1Path.empty()) { - Console::Error::WriteLine(ex.what()); - return false; + Get().general.RCT1Path = std::move(rct1Path); } + + return true; } - // While we're at it, also check if the player has RCT1 - std::string rct1Path = Config::FindRCT1Path(); - if (!rct1Path.empty()) - { - gConfigGeneral.RCT1Path = std::move(rct1Path); - } - - return true; -} - -std::string FindCsg1datAtLocation(u8string_view path) -{ - auto checkPath1 = Path::Combine(path, u8"Data", u8"CSG1.DAT"); - auto checkPath2 = Path::Combine(path, u8"Data", u8"CSG1.1"); - - // Since Linux is case sensitive (and macOS sometimes too), make sure we handle case properly. - std::string path1result = Path::ResolveCasing(checkPath1); - if (!path1result.empty()) - { - return path1result; - } - - std::string path2result = Path::ResolveCasing(checkPath2); - return path2result; -} - -bool Csg1datPresentAtLocation(u8string_view path) -{ - auto location = FindCsg1datAtLocation(path); - return !location.empty(); -} - -u8string FindCsg1idatAtLocation(u8string_view path) -{ - auto result1 = Path::ResolveCasing(Path::Combine(path, u8"Data", u8"CSG1I.DAT")); - if (!result1.empty()) - { - return result1; - } - auto result2 = Path::ResolveCasing(Path::Combine(path, u8"RCTdeluxe_install", u8"Data", u8"CSG1I.DAT")); - return result2; -} - -bool Csg1idatPresentAtLocation(u8string_view path) -{ - std::string location = FindCsg1idatAtLocation(path); - return !location.empty(); -} - -bool RCT1DataPresentAtLocation(u8string_view path) -{ - return Csg1datPresentAtLocation(path) && Csg1idatPresentAtLocation(path) && CsgAtLocationIsUsable(path); -} - -bool CsgIsUsable(const Gx& csg) -{ - return csg.header.total_size == RCT1::Limits::LL_CSG1_DAT_FileSize - && csg.header.num_entries == RCT1::Limits::Num_LL_CSG_Entries; -} - -bool CsgAtLocationIsUsable(u8string_view path) -{ - auto csg1HeaderPath = FindCsg1idatAtLocation(path); - if (csg1HeaderPath.empty()) - { - return false; - } - - auto csg1DataPath = FindCsg1datAtLocation(path); - if (csg1DataPath.empty()) - { - return false; - } - - auto fileHeader = FileStream(csg1HeaderPath, FILE_MODE_OPEN); - auto fileData = FileStream(csg1DataPath, FILE_MODE_OPEN); - size_t fileHeaderSize = fileHeader.GetLength(); - size_t fileDataSize = fileData.GetLength(); - - Gx csg = {}; - csg.header.num_entries = static_cast(fileHeaderSize / sizeof(RCTG1Element)); - csg.header.total_size = static_cast(fileDataSize); - return CsgIsUsable(csg); -} +} // namespace OpenRCT2::Config diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index 391b56fcb8..ba62b4201a 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -10,273 +10,239 @@ #pragma once #include "../core/String.hpp" -#include "../drawing/Drawing.h" -#include "../localisation/Currency.h" +#include "../localisation/CurrencyTypes.h" +#include "ConfigTypes.h" #include -#include -enum class MeasurementFormat : int32_t; -enum class TemperatureUnit : int32_t; -enum class ScaleQuality : int32_t; -enum class Sort : int32_t; -enum class VirtualFloorStyles : int32_t; -enum class DrawingEngine : int32_t; -enum class TitleMusicKind : int32_t; +// windows.h defines an interface keyword +#ifdef interface +# undef interface +#endif -struct GeneralConfiguration +namespace OpenRCT2::Config { - // Paths - u8string RCT1Path; - u8string RCT2Path; + struct General + { + // Paths + u8string RCT1Path; + u8string RCT2Path; - // Display - int32_t DefaultDisplay; - int32_t WindowWidth; - int32_t WindowHeight; - int32_t FullscreenMode; - int32_t FullscreenWidth; - int32_t FullscreenHeight; - float WindowScale; - ::DrawingEngine DrawingEngine; - bool UncapFPS; - bool UseVSync; - bool ShowFPS; - std::atomic_uint8_t MultiThreading; - bool MinimizeFullscreenFocusLoss; - bool DisableScreensaver; + // Display + int32_t DefaultDisplay; + int32_t WindowWidth; + int32_t WindowHeight; + int32_t FullscreenMode; + int32_t FullscreenWidth; + int32_t FullscreenHeight; + float WindowScale; + ::DrawingEngine DrawingEngine; + bool UncapFPS; + bool UseVSync; + bool ShowFPS; + std::atomic_uint8_t MultiThreading; + bool MinimizeFullscreenFocusLoss; + bool DisableScreensaver; - // Map rendering - bool LandscapeSmoothing; - bool AlwaysShowGridlines; - VirtualFloorStyles VirtualFloorStyle; - bool DayNightCycle; - bool EnableLightFx; - bool EnableLightFxForVehicles; - bool UpperCaseBanners; - bool RenderWeatherEffects; - bool RenderWeatherGloom; - bool DisableLightningEffect; - bool ShowGuestPurchases; - bool TransparentScreenshot; - bool TransparentWater; + // Map rendering + bool LandscapeSmoothing; + bool AlwaysShowGridlines; + VirtualFloorStyles VirtualFloorStyle; + bool DayNightCycle; + bool EnableLightFx; + bool EnableLightFxForVehicles; + bool UpperCaseBanners; + bool RenderWeatherEffects; + bool RenderWeatherGloom; + bool DisableLightningEffect; + bool ShowGuestPurchases; + bool TransparentScreenshot; + bool TransparentWater; - bool InvisibleRides; - bool InvisibleVehicles; - bool InvisibleTrees; - bool InvisibleScenery; - bool InvisiblePaths; - bool InvisibleSupports; + bool InvisibleRides; + bool InvisibleVehicles; + bool InvisibleTrees; + bool InvisibleScenery; + bool InvisiblePaths; + bool InvisibleSupports; - // Localisation - int32_t Language; - ::MeasurementFormat MeasurementFormat; - TemperatureUnit TemperatureFormat; - bool ShowHeightAsUnits; - int32_t DateFormat; - CurrencyType CurrencyFormat; - int32_t CustomCurrencyRate; - CurrencyAffix CustomCurrencyAffix; - u8string CustomCurrencySymbol; + // Localisation + int32_t Language; + ::MeasurementFormat MeasurementFormat; + TemperatureUnit TemperatureFormat; + bool ShowHeightAsUnits; + int32_t DateFormat; + CurrencyType CurrencyFormat; + int32_t CustomCurrencyRate; + CurrencyAffix CustomCurrencyAffix; + u8string CustomCurrencySymbol; - // Controls - bool EdgeScrolling; - int32_t EdgeScrollingSpeed; - bool TrapCursor; - bool InvertViewportDrag; - bool ZoomToCursor; + // Controls + bool EdgeScrolling; + int32_t EdgeScrollingSpeed; + bool TrapCursor; + bool InvertViewportDrag; + bool ZoomToCursor; - // Miscellaneous - bool PlayIntro; - int32_t WindowSnapProximity; - bool SavePluginData; - bool DebuggingTools; - int32_t AutosaveFrequency; - int32_t AutosaveAmount; - bool AutoStaffPlacement; - bool HandymenMowByDefault; - bool AutoOpenShops; - int32_t DefaultInspectionInterval; - int32_t WindowLimit; - int32_t ScenarioSelectMode; - bool ScenarioUnlockingEnabled; - bool ScenarioHideMegaPark; - bool SteamOverlayPause; - bool ShowRealNamesOfGuests; - bool AllowEarlyCompletion; - u8string AssetPackOrder; - u8string EnabledAssetPacks; + // Miscellaneous + bool PlayIntro; + int32_t WindowSnapProximity; + bool SavePluginData; + bool DebuggingTools; + int32_t AutosaveFrequency; + int32_t AutosaveAmount; + bool AutoStaffPlacement; + bool HandymenMowByDefault; + bool AutoOpenShops; + int32_t DefaultInspectionInterval; + int32_t WindowLimit; + int32_t ScenarioSelectMode; + bool ScenarioUnlockingEnabled; + bool ScenarioHideMegaPark; + bool SteamOverlayPause; + bool ShowRealNamesOfGuests; + bool AllowEarlyCompletion; + u8string AssetPackOrder; + u8string EnabledAssetPacks; - // Loading and saving - bool ConfirmationPrompt; - Sort LoadSaveSort; - u8string LastSaveGameDirectory; - u8string LastSaveLandscapeDirectory; - u8string LastSaveScenarioDirectory; - u8string LastSaveTrackDirectory; - u8string LastRunVersion; - bool UseNativeBrowseDialog; - int64_t LastVersionCheckTime; -}; + // Loading and saving + bool ConfirmationPrompt; + Sort LoadSaveSort; + u8string LastSaveGameDirectory; + u8string LastSaveLandscapeDirectory; + u8string LastSaveScenarioDirectory; + u8string LastSaveTrackDirectory; + u8string LastRunVersion; + bool UseNativeBrowseDialog; + int64_t LastVersionCheckTime; + }; -struct InterfaceConfiguration -{ - bool ToolbarShowFinances; - bool ToolbarShowResearch; - bool ToolbarShowCheats; - bool ToolbarShowNews; - bool ToolbarShowMute; - bool ToolbarShowChat; - bool ToolbarShowZoom; - bool ConsoleSmallFont; - bool RandomTitleSequence; - u8string CurrentThemePreset; - u8string CurrentTitleSequencePreset; - int32_t ObjectSelectionFilterFlags; - int32_t ScenarioselectLastTab; - bool ListRideVehiclesSeparately; - bool WindowButtonsOnTheLeft; -}; + struct Interface + { + bool ToolbarButtonsCentred; + bool ToolbarShowFinances; + bool ToolbarShowResearch; + bool ToolbarShowCheats; + bool ToolbarShowNews; + bool ToolbarShowMute; + bool ToolbarShowChat; + bool ToolbarShowZoom; + bool ConsoleSmallFont; + bool RandomTitleSequence; + u8string CurrentThemePreset; + u8string CurrentTitleSequencePreset; + int32_t ObjectSelectionFilterFlags; + int32_t ScenarioselectLastTab; + bool ListRideVehiclesSeparately; + bool WindowButtonsOnTheLeft; + bool EnlargedUi; + bool TouchEnhancements; + }; -struct SoundConfiguration -{ - u8string Device; - bool MasterSoundEnabled; - uint8_t MasterVolume; - TitleMusicKind TitleMusic; - bool SoundEnabled; - uint8_t SoundVolume; - bool RideMusicEnabled; - uint8_t AudioFocus; - bool audio_focus; -}; + struct Sound + { + u8string Device; + bool MasterSoundEnabled; + uint8_t MasterVolume; + TitleMusicKind TitleMusic; + bool SoundEnabled; + uint8_t SoundVolume; + bool RideMusicEnabled; + uint8_t AudioFocus; + bool audio_focus; + }; -struct NetworkConfiguration -{ - u8string PlayerName; - int32_t DefaultPort; - u8string ListenAddress; - u8string DefaultPassword; - bool StayConnected; - bool Advertise; - u8string AdvertiseAddress; - int32_t Maxplayers; - u8string ServerName; - u8string ServerDescription; - u8string ServerGreeting; - u8string MasterServerUrl; - u8string ProviderName; - u8string ProviderEmail; - u8string ProviderWebsite; - bool KnownKeysOnly; - bool LogChat; - bool LogServerActions; - bool PauseServerIfNoClients; - bool DesyncDebugging; -}; + struct Network + { + u8string PlayerName; + int32_t DefaultPort; + u8string ListenAddress; + u8string DefaultPassword; + bool StayConnected; + bool Advertise; + u8string AdvertiseAddress; + int32_t Maxplayers; + u8string ServerName; + u8string ServerDescription; + u8string ServerGreeting; + u8string MasterServerUrl; + u8string ProviderName; + u8string ProviderEmail; + u8string ProviderWebsite; + bool KnownKeysOnly; + bool LogChat; + bool LogServerActions; + bool PauseServerIfNoClients; + bool DesyncDebugging; + }; -struct NotificationConfiguration -{ - bool ParkAward; - bool ParkMarketingCampaignFinished; - bool ParkWarnings; - bool ParkRatingWarnings; - bool RideBrokenDown; - bool RideCrashed; - bool RideCasualties; - bool RideWarnings; - bool RideResearched; - bool RideStalledVehicles; - bool GuestWarnings; - bool GuestLeftPark; - bool GuestQueuingForRide; - bool GuestOnRide; - bool GuestLeftRide; - bool GuestBoughtItem; - bool GuestUsedFacility; - bool GuestDied; -}; + struct Notification + { + bool ParkAward; + bool ParkMarketingCampaignFinished; + bool ParkWarnings; + bool ParkRatingWarnings; + bool RideBrokenDown; + bool RideCrashed; + bool RideCasualties; + bool RideWarnings; + bool RideResearched; + bool RideStalledVehicles; + bool GuestWarnings; + bool GuestLeftPark; + bool GuestQueuingForRide; + bool GuestOnRide; + bool GuestLeftRide; + bool GuestBoughtItem; + bool GuestUsedFacility; + bool GuestDied; + }; -struct FontConfiguration -{ - u8string FileName; - u8string FontName; - int32_t OffsetX; - int32_t OffsetY; - int32_t SizeTiny; - int32_t SizeSmall; - int32_t SizeMedium; - int32_t SizeBig; - int32_t HeightTiny; - int32_t HeightSmall; - int32_t HeightMedium; - int32_t HeightBig; - bool EnableHinting; - int32_t HintingThreshold; -}; + struct Font + { + u8string FileName; + u8string FontName; + int32_t OffsetX; + int32_t OffsetY; + int32_t SizeTiny; + int32_t SizeSmall; + int32_t SizeMedium; + int32_t SizeBig; + int32_t HeightTiny; + int32_t HeightSmall; + int32_t HeightMedium; + int32_t HeightBig; + bool EnableHinting; + int32_t HintingThreshold; + }; -struct PluginConfiguration -{ - bool EnableHotReloading; - u8string AllowedHosts; -}; + struct Plugin + { + bool EnableHotReloading; + u8string AllowedHosts; + }; -enum class Sort : int32_t -{ - NameAscending, - NameDescending, - DateAscending, - DateDescending, -}; + struct Config + { + Config() = default; -enum class TemperatureUnit : int32_t -{ - Celsius, - Fahrenheit -}; + // Prevent accidental copies + Config(const Config&) = delete; -enum class ScaleQuality : int32_t -{ - NearestNeighbour, - Linear, - SmoothNearestNeighbour -}; + General general; + Interface interface; + Sound sound; + Network network; + Notification notifications; + Font fonts; + Plugin plugin; + }; -enum class MeasurementFormat : int32_t -{ - Imperial, - Metric, - SI -}; - -enum class TitleMusicKind : int32_t -{ - None, - Random, - OpenRCT2, - RCT1, - RCT2, -}; - -extern GeneralConfiguration gConfigGeneral; -extern InterfaceConfiguration gConfigInterface; -extern SoundConfiguration gConfigSound; -extern NetworkConfiguration gConfigNetwork; -extern NotificationConfiguration gConfigNotifications; -extern FontConfiguration gConfigFonts; -extern PluginConfiguration gConfigPlugin; - -bool ConfigOpen(u8string_view path); -bool ConfigSave(u8string_view path); -u8string ConfigGetDefaultPath(); -void ConfigSetDefaults(); -bool ConfigSaveDefault(); -bool ConfigFindOrBrowseInstallDirectory(); - -bool RCT1DataPresentAtLocation(u8string_view path); -std::string FindCsg1datAtLocation(u8string_view path); -bool Csg1datPresentAtLocation(u8string_view path); -std::string FindCsg1idatAtLocation(u8string_view path); -bool Csg1idatPresentAtLocation(u8string_view path); -bool CsgIsUsable(const Gx& csg); -bool CsgAtLocationIsUsable(u8string_view path); + Config& Get(); + bool OpenFromPath(u8string_view path); + bool SaveToPath(u8string_view path); + u8string GetDefaultPath(); + bool SetDefaults(); + bool Save(); + bool FindOrBrowseInstallDirectory(); +} // namespace OpenRCT2::Config diff --git a/src/openrct2/config/ConfigTypes.h b/src/openrct2/config/ConfigTypes.h new file mode 100644 index 0000000000..2d8f4fd8f3 --- /dev/null +++ b/src/openrct2/config/ConfigTypes.h @@ -0,0 +1,58 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +enum class MeasurementFormat : int32_t; +enum class TemperatureUnit : int32_t; +enum class CurrencyType : uint8_t; +enum class ScaleQuality : int32_t; +enum class Sort : int32_t; +enum class VirtualFloorStyles : int32_t; +enum class DrawingEngine : int32_t; +enum class TitleMusicKind : int32_t; + +enum class Sort : int32_t +{ + NameAscending, + NameDescending, + DateAscending, + DateDescending, +}; + +enum class TemperatureUnit : int32_t +{ + Celsius, + Fahrenheit +}; + +enum class ScaleQuality : int32_t +{ + NearestNeighbour, + Linear, + SmoothNearestNeighbour +}; + +enum class MeasurementFormat : int32_t +{ + Imperial, + Metric, + SI +}; + +enum class TitleMusicKind : int32_t +{ + None, + Random, + OpenRCT2, + RCT1, + RCT2, +}; diff --git a/src/openrct2/core/Algorithm.hpp b/src/openrct2/core/Algorithm.hpp index a7072ca1e3..a245a345b6 100644 --- a/src/openrct2/core/Algorithm.hpp +++ b/src/openrct2/core/Algorithm.hpp @@ -9,6 +9,7 @@ #pragma once +#include #include template> diff --git a/src/openrct2/core/DataSerialiserTraits.h b/src/openrct2/core/DataSerialiserTraits.h index 10a685da5b..d393efec3d 100644 --- a/src/openrct2/core/DataSerialiserTraits.h +++ b/src/openrct2/core/DataSerialiserTraits.h @@ -675,26 +675,26 @@ template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TrackDesignTrackElement& val) { - stream->Write(&val.Type); - stream->Write(&val.Flags); - stream->Write(&val.ColourScheme); - stream->Write(&val.StationIndex); - stream->Write(&val.BrakeBoosterSpeed); - stream->Write(&val.SeatRotation); + stream->Write(&val.type); + stream->Write(&val.flags); + stream->Write(&val.colourScheme); + stream->Write(&val.stationIndex); + stream->Write(&val.brakeBoosterSpeed); + stream->Write(&val.seatRotation); } static void decode(OpenRCT2::IStream* stream, TrackDesignTrackElement& val) { - stream->Read(&val.Type); - stream->Read(&val.Flags); - stream->Read(&val.ColourScheme); - stream->Read(&val.StationIndex); - stream->Read(&val.BrakeBoosterSpeed); - stream->Read(&val.SeatRotation); + stream->Read(&val.type); + stream->Read(&val.flags); + stream->Read(&val.colourScheme); + stream->Read(&val.stationIndex); + stream->Read(&val.brakeBoosterSpeed); + stream->Read(&val.seatRotation); } static void log(OpenRCT2::IStream* stream, const TrackDesignTrackElement& val) { char msg[128] = {}; - snprintf(msg, sizeof(msg), "TrackDesignTrackElement(type = %d, flags = %d)", val.Type, val.Flags); + snprintf(msg, sizeof(msg), "TrackDesignTrackElement(type = %d, flags = %d)", val.type, val.flags); stream->Write(msg, strlen(msg)); } }; @@ -703,19 +703,20 @@ template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TrackDesignMazeElement& val) { - uint32_t temp = ByteSwapBE(val.all); - stream->Write(&temp); + stream->Write(&val.location); + stream->Write(&val.mazeEntry); } static void decode(OpenRCT2::IStream* stream, TrackDesignMazeElement& val) { - uint32_t temp; - stream->Read(&temp); - val.all = ByteSwapBE(temp); + stream->Read(&val.location); + stream->Read(&val.mazeEntry); } static void log(OpenRCT2::IStream* stream, const TrackDesignMazeElement& val) { char msg[128] = {}; - snprintf(msg, sizeof(msg), "TrackDesignMazeElement(all = %d)", val.all); + snprintf( + msg, sizeof(msg), "TrackDesignMazeElement(x = %d, y = %d, entry = %d)", val.location.x, val.location.y, + val.mazeEntry); stream->Write(msg, strlen(msg)); } }; @@ -724,20 +725,20 @@ template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TrackDesignEntranceElement& val) { - stream->Write(&val.Location); - stream->Write(&val.IsExit); + stream->Write(&val.location); + stream->Write(&val.isExit); } static void decode(OpenRCT2::IStream* stream, TrackDesignEntranceElement& val) { - stream->Read(&val.Location); - stream->Read(&val.IsExit); + stream->Read(&val.location); + stream->Read(&val.isExit); } static void log(OpenRCT2::IStream* stream, const TrackDesignEntranceElement& val) { char msg[128] = {}; snprintf( - msg, sizeof(msg), "TrackDesignEntranceElement(x = %d, y = %d, z = %d, dir = %d, isExit = %d)", val.Location.x, - val.Location.y, val.Location.z, val.Location.direction, val.IsExit); + msg, sizeof(msg), "TrackDesignEntranceElement(x = %d, y = %d, z = %d, dir = %d, isExit = %d)", val.location.x, + val.location.y, val.location.z, val.location.direction, val.isExit); stream->Write(msg, strlen(msg)); } }; @@ -748,33 +749,59 @@ template<> struct DataSerializerTraitsT { stream->Write(&val.loc); stream->Write(&val.flags); - stream->Write(&val.primary_colour); - stream->Write(&val.secondary_colour); + stream->Write(&val.primaryColour); + stream->Write(&val.secondaryColour); + stream->Write(&val.tertiaryColour); DataSerializerTraits s; - s.encode(stream, val.scenery_object); + s.encode(stream, val.sceneryObject); } static void decode(OpenRCT2::IStream* stream, TrackDesignSceneryElement& val) { stream->Read(&val.loc); stream->Read(&val.flags); - stream->Read(&val.primary_colour); - stream->Read(&val.secondary_colour); + stream->Read(&val.primaryColour); + stream->Read(&val.secondaryColour); + stream->Read(&val.tertiaryColour); DataSerializerTraits s; - s.decode(stream, val.scenery_object); + s.decode(stream, val.sceneryObject); } static void log(OpenRCT2::IStream* stream, const TrackDesignSceneryElement& val) { char msg[128] = {}; snprintf( - msg, sizeof(msg), "TrackDesignSceneryElement(x = %d, y = %d, z = %d, flags = %d, colour1 = %d, colour2 = %d)", - val.loc.x, val.loc.y, val.loc.z, val.flags, val.primary_colour, val.secondary_colour); + msg, sizeof(msg), + "TrackDesignSceneryElement(x = %d, y = %d, z = %d, flags = %d, colour1 = %d, colour2 = %d, colour3 = %d)", + val.loc.x, val.loc.y, val.loc.z, val.flags, val.primaryColour, val.secondaryColour, val.tertiaryColour); stream->Write(msg, strlen(msg)); - auto identifier = val.scenery_object.GetName(); + auto identifier = val.sceneryObject.GetName(); stream->WriteArray(identifier.data(), identifier.size()); } }; +template<> struct DataSerializerTraitsT +{ + static void encode(OpenRCT2::IStream* stream, const TrackColour& val) + { + stream->Write(&val.main); + stream->Write(&val.additional); + stream->Write(&val.supports); + } + static void decode(OpenRCT2::IStream* stream, TrackColour& val) + { + stream->Read(&val.main); + stream->Read(&val.additional); + stream->Read(&val.supports); + } + static void log(OpenRCT2::IStream* stream, const TrackColour& val) + { + char msg[128] = {}; + snprintf( + msg, sizeof(msg), "TrackColour(main = %d, additional = %d, supports = %d)", val.main, val.additional, val.supports); + stream->Write(msg, strlen(msg)); + } +}; + template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const VehicleColour& val) @@ -797,6 +824,30 @@ template<> struct DataSerializerTraitsT } }; +template<> struct DataSerializerTraitsT +{ + static void encode(OpenRCT2::IStream* stream, const RatingTuple& val) + { + stream->Write(&val.excitement); + stream->Write(&val.intensity); + stream->Write(&val.nausea); + } + static void decode(OpenRCT2::IStream* stream, RatingTuple& val) + { + stream->Read(&val.excitement); + stream->Read(&val.intensity); + stream->Read(&val.nausea); + } + static void log(OpenRCT2::IStream* stream, const RatingTuple& val) + { + char msg[128] = {}; + snprintf( + msg, sizeof(msg), "RatingTuple(excitement = %d, intensity = %d, nausea = %d)", val.excitement, val.intensity, + val.nausea); + stream->Write(msg, strlen(msg)); + } +}; + template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const IntensityRange& val) diff --git a/src/openrct2/core/EnumMap.hpp b/src/openrct2/core/EnumMap.hpp index bcf96ffb2b..f34562c163 100644 --- a/src/openrct2/core/EnumMap.hpp +++ b/src/openrct2/core/EnumMap.hpp @@ -62,7 +62,7 @@ public: { std::sort(_map.begin(), _map.end(), [](const auto& a, const auto& b) { return a.second < b.second; }); - if constexpr (ValueIndexable()) + if (ValueIndexable() && _map.size() > 1) { _continiousValueIndex = true; T cur{}; diff --git a/src/openrct2/core/FileIndex.hpp b/src/openrct2/core/FileIndex.hpp index 18c9256a8d..0a9b9b31a3 100644 --- a/src/openrct2/core/FileIndex.hpp +++ b/src/openrct2/core/FileIndex.hpp @@ -9,6 +9,7 @@ #pragma once +#include "../Context.h" #include "../common.h" #include "Console.hpp" #include "DataSerialiser.h" @@ -211,6 +212,7 @@ private: auto reportProgress = [&]() { const size_t completed = processed; Console::WriteFormat("File %5zu of %zu, done %3d%%\r", completed, totalCount, completed * 100 / totalCount); + OpenRCT2::GetContext()->SetProgress(static_cast(completed), static_cast(totalCount)); }; for (size_t rangeStart = 0; rangeStart < totalCount; rangeStart += stepSize) diff --git a/src/openrct2/core/FileWatcher.cpp b/src/openrct2/core/FileWatcher.cpp index afb9177c18..b3c24db6c6 100644 --- a/src/openrct2/core/FileWatcher.cpp +++ b/src/openrct2/core/FileWatcher.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include #include #include #include diff --git a/src/openrct2/core/FixedPoint.hpp b/src/openrct2/core/FixedPoint.hpp new file mode 100644 index 0000000000..b6bdaa849f --- /dev/null +++ b/src/openrct2/core/FixedPoint.hpp @@ -0,0 +1,27 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +// Represent fixed point numbers. dp = decimal point +using fixed8_1dp = uint8_t; +using fixed8_2dp = uint8_t; +using fixed16_1dp = int16_t; +using fixed16_2dp = int16_t; +using fixed32_1dp = int32_t; +using fixed32_2dp = int32_t; +using fixed64_1dp = int64_t; + +// Construct a fixed point number. For example, to create the value 3.65 you +// would write FIXED_2DP(3,65) +#define FIXED_XDP(x, whole, fraction) ((whole) * (10 * (x)) + (fraction)) +#define FIXED_1DP(whole, fraction) FIXED_XDP(1, whole, fraction) +#define FIXED_2DP(whole, fraction) FIXED_XDP(10, whole, fraction) diff --git a/src/openrct2/core/Imaging.cpp b/src/openrct2/core/Imaging.cpp index 7a7bc3f6b6..a0b3f351e8 100644 --- a/src/openrct2/core/Imaging.cpp +++ b/src/openrct2/core/Imaging.cpp @@ -19,6 +19,7 @@ #include "Memory.hpp" #include "String.hpp" +#include #include #include #include diff --git a/src/openrct2/core/JobPool.cpp b/src/openrct2/core/JobPool.cpp index e4038663ab..ca757ca3fa 100644 --- a/src/openrct2/core/JobPool.cpp +++ b/src/openrct2/core/JobPool.cpp @@ -95,6 +95,12 @@ size_t JobPool::CountPending() return _pending.size(); } +size_t JobPool::CountProcessing() +{ + unique_lock lock(_mutex); + return _processing; +} + void JobPool::ProcessQueue() { unique_lock lock(_mutex); diff --git a/src/openrct2/core/JobPool.h b/src/openrct2/core/JobPool.h index aa558929fc..bfd51ad71c 100644 --- a/src/openrct2/core/JobPool.h +++ b/src/openrct2/core/JobPool.h @@ -46,6 +46,7 @@ public: void AddTask(std::function workFn, std::function completionFn = nullptr); void Join(std::function reportFn = nullptr); size_t CountPending(); + size_t CountProcessing(); private: void ProcessQueue(); diff --git a/src/openrct2/core/Json.cpp b/src/openrct2/core/Json.cpp index cd459d41ce..b1d28b8c23 100644 --- a/src/openrct2/core/Json.cpp +++ b/src/openrct2/core/Json.cpp @@ -32,7 +32,7 @@ namespace Json try { - json = json_t::parse(fileData); + json = json_t::parse(fileData, /* callback */ nullptr, /* allow_exceptions */ true, /* ignore_comments */ true); } catch (const json_t::exception& e) { @@ -59,7 +59,7 @@ namespace Json try { - json = json_t::parse(raw); + json = json_t::parse(raw, /* callback */ nullptr, /* allow_exceptions */ true, /* ignore_comments */ true); } catch (const json_t::exception& e) { @@ -75,7 +75,8 @@ namespace Json try { - json = json_t::parse(vec.begin(), vec.end()); + json = json_t::parse( + vec.begin(), vec.end(), /* callback */ nullptr, /* allow_exceptions */ true, /* ignore_comments */ true); } catch (const json_t::exception& e) { diff --git a/src/openrct2/core/Money.hpp b/src/openrct2/core/Money.hpp new file mode 100644 index 0000000000..f31f908f1c --- /dev/null +++ b/src/openrct2/core/Money.hpp @@ -0,0 +1,64 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 "FixedPoint.hpp" + +// Money is stored as a multiple of 0.10. +using money16 = fixed16_1dp; +using money32 = fixed32_1dp; +using money64 = fixed64_1dp; + +// For a user defined floating point literal, the parameter type must be a +// `long double` which is problematic on ppc64el, as the architecture uses a +// pair of `doubles` to represent that type. This cannot be converted to a +// `constexpr`. As a workaround, statically cast the `long double` down to a +// `double`. All of the uses of _GBP constants fit just fine, and if anyone +// really tries to use a gigantic constant that can't fit in a double, they are +// probably going to be breaking other things anyways. +// For more details, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26374 +constexpr money64 operator"" _GBP(long double money) noexcept +{ + return static_cast(money) * 10; +} + +constexpr money64 ToMoney64FromGBP(int32_t money) noexcept +{ + return money * 10; +} + +constexpr money64 ToMoney64FromGBP(int64_t money) noexcept +{ + return money * 10; +} + +constexpr money64 ToMoney64FromGBP(double money) noexcept +{ + return money * 10; +} + +constexpr money16 kMoney16Undefined = static_cast(static_cast(0xFFFF)); +constexpr money32 kMoney32Undefined = static_cast(0x80000000); +constexpr money64 kMoney64Undefined = static_cast(0x8000000000000000); + +constexpr money16 ToMoney16(money64 value) +{ + return value == kMoney64Undefined ? kMoney16Undefined : value; +} + +constexpr money64 ToMoney64(money32 value) +{ + return value == kMoney32Undefined ? kMoney64Undefined : value; +} + +constexpr money64 ToMoney64(money16 value) +{ + return value == kMoney16Undefined ? kMoney64Undefined : value; +} diff --git a/src/openrct2/core/OrcaStream.hpp b/src/openrct2/core/OrcaStream.hpp index 00e42c6f69..c29435c53d 100644 --- a/src/openrct2/core/OrcaStream.hpp +++ b/src/openrct2/core/OrcaStream.hpp @@ -15,10 +15,9 @@ #include "Identifier.hpp" #include "MemoryStream.h" +#include #include #include -#include -#include #include #include #include diff --git a/src/openrct2/core/Speed.hpp b/src/openrct2/core/Speed.hpp new file mode 100644 index 0000000000..575760c2fe --- /dev/null +++ b/src/openrct2/core/Speed.hpp @@ -0,0 +1,20 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +// Note: Only valid for 5 decimal places. +constexpr int32_t operator"" _mph(long double speedMph) +{ + uint32_t wholeNumber = speedMph; + uint64_t fraction = (speedMph - wholeNumber) * 100000; + return wholeNumber << 16 | ((fraction << 16) / 100000); +} diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp index bc1f7b34f6..9b8b77e250 100644 --- a/src/openrct2/core/String.cpp +++ b/src/openrct2/core/String.cpp @@ -14,7 +14,7 @@ #include #include #ifndef _WIN32 -# ifndef __FreeBSD__ +# if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) # include # endif # include diff --git a/src/openrct2/drawing/Drawing.Sprite.cpp b/src/openrct2/drawing/Drawing.Sprite.cpp index b1eaee7d9f..7d5116f7d0 100644 --- a/src/openrct2/drawing/Drawing.Sprite.cpp +++ b/src/openrct2/drawing/Drawing.Sprite.cpp @@ -17,6 +17,7 @@ #include "../core/MemoryStream.h" #include "../core/Path.hpp" #include "../platform/Platform.h" +#include "../rct1/Csg.h" #include "../sprites.h" #include "../ui/UiContext.h" #include "../util/Util.h" @@ -367,14 +368,14 @@ bool GfxLoadCsg() { LOG_VERBOSE("GfxLoadCsg()"); - if (gConfigGeneral.RCT1Path.empty()) + if (Config::Get().general.RCT1Path.empty()) { LOG_VERBOSE(" unable to load CSG, RCT1 path not set"); return false; } - auto pathHeaderPath = FindCsg1idatAtLocation(gConfigGeneral.RCT1Path); - auto pathDataPath = FindCsg1datAtLocation(gConfigGeneral.RCT1Path); + auto pathHeaderPath = FindCsg1idatAtLocation(Config::Get().general.RCT1Path); + auto pathDataPath = FindCsg1datAtLocation(Config::Get().general.RCT1Path); try { auto fileHeader = FileStream(pathHeaderPath, FILE_MODE_OPEN); diff --git a/src/openrct2/drawing/Drawing.String.cpp b/src/openrct2/drawing/Drawing.String.cpp index 9d97a8fa9f..15d97d274c 100644 --- a/src/openrct2/drawing/Drawing.String.cpp +++ b/src/openrct2/drawing/Drawing.String.cpp @@ -7,14 +7,13 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "../drawing/Drawing.h" - #include "../Context.h" #include "../common.h" #include "../config/Config.h" #include "../core/String.hpp" #include "../drawing/IDrawingContext.h" #include "../drawing/IDrawingEngine.h" +#include "../drawing/Text.h" #include "../interface/Viewport.h" #include "../localisation/Formatting.h" #include "../localisation/Localisation.h" @@ -258,13 +257,14 @@ int32_t GfxWrapString(u8string_view text, int32_t width, FontStyle fontStyle, u8 /** * Draws text that is left aligned and vertically centred. */ -void GfxDrawStringLeftCentred(DrawPixelInfo& dpi, StringId format, void* args, colour_t colour, const ScreenCoordsXY& coords) +void GfxDrawStringLeftCentred( + DrawPixelInfo& dpi, StringId format, void* args, ColourWithFlags colour, const ScreenCoordsXY& coords) { char buffer[CommonTextBufferSize]; auto bufferPtr = buffer; FormatStringLegacy(bufferPtr, sizeof(buffer), format, args); int32_t height = StringGetHeightRaw(bufferPtr, FontStyle::Medium); - GfxDrawString(dpi, coords - ScreenCoordsXY{ 0, (height / 2) }, bufferPtr, { colour }); + DrawText(dpi, coords - ScreenCoordsXY{ 0, (height / 2) }, { colour }, bufferPtr); } /** @@ -295,11 +295,10 @@ static void ColourCharacter(uint8_t colour, const uint16_t* current_font_flags, * Changes the palette so that the next character changes colour * This is specific to changing to a predefined window related colour */ -static void ColourCharacterWindow(uint8_t colour, const uint16_t* current_font_flags, uint8_t* palette_pointer) +static void ColourCharacterWindow(colour_t colour, const uint16_t* current_font_flags, uint8_t* palette_pointer) { int32_t eax; - colour = NOT_TRANSLUCENT(colour); eax = ColourMapA[colour].colour_11; if (*current_font_flags & TEXT_DRAW_FLAG_OUTLINE) { @@ -326,13 +325,13 @@ void DrawStringCentredRaw( DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t numLines, const utf8* text, FontStyle fontStyle) { ScreenCoordsXY screenCoords(dpi.x, dpi.y); - GfxDrawString(dpi, screenCoords, "", { COLOUR_BLACK, fontStyle }); + DrawText(dpi, screenCoords, { COLOUR_BLACK, fontStyle }, ""); screenCoords = coords; for (int32_t i = 0; i <= numLines; i++) { int32_t width = GfxGetStringWidth(text, fontStyle); - GfxDrawString(dpi, screenCoords - ScreenCoordsXY{ width / 2, 0 }, text, { TEXT_COLOUR_254, fontStyle }); + DrawText(dpi, screenCoords - ScreenCoordsXY{ width / 2, 0 }, { TEXT_COLOUR_254, fontStyle }, text); const utf8* ch = text; const utf8* nextCh = nullptr; @@ -424,7 +423,7 @@ void DrawNewsTicker( int32_t numLines, lineHeight, lineY; ScreenCoordsXY screenCoords(dpi.x, dpi.y); - GfxDrawString(dpi, screenCoords, "", { colour }); + DrawText(dpi, screenCoords, { colour }, ""); u8string wrappedString; GfxWrapString(FormatStringID(format, args), width, FontStyle::Small, &wrappedString, &numLines); @@ -463,7 +462,7 @@ void DrawNewsTicker( } screenCoords = { coords.x - halfWidth, lineY }; - GfxDrawString(dpi, screenCoords, buffer, { TEXT_COLOUR_254, FontStyle::Small }); + DrawText(dpi, screenCoords, { TEXT_COLOUR_254, FontStyle::Small }, buffer); if (numCharactersDrawn > numCharactersToDraw) { @@ -533,7 +532,7 @@ static void TTFDrawStringRawTTF(DrawPixelInfo& dpi, std::string_view text, TextD { int32_t drawX = info->x + fontDesc->offset_x; int32_t drawY = info->y + fontDesc->offset_y; - uint8_t hintThresh = gConfigFonts.EnableHinting ? fontDesc->hinting_threshold : 0; + uint8_t hintThresh = Config::Get().fonts.EnableHinting ? fontDesc->hinting_threshold : 0; OpenRCT2::Drawing::IDrawingContext* dc = drawingEngine->GetDrawingContext(); dc->DrawTTFBitmap(dpi, info, surface, drawX, drawY, hintThresh); } @@ -747,50 +746,48 @@ static void TTFProcessString(DrawPixelInfo& dpi, std::string_view text, TextDraw } } -static void TTFProcessInitialColour(int32_t colour, TextDrawInfo* info) +static void TTFProcessInitialColour(ColourWithFlags colour, TextDrawInfo* info) { - if (colour != TEXT_COLOUR_254 && colour != TEXT_COLOUR_255) + if (colour.colour != TEXT_COLOUR_254 && colour.colour != TEXT_COLOUR_255) { info->flags &= ~(TEXT_DRAW_FLAG_INSET | TEXT_DRAW_FLAG_OUTLINE); - if (colour & COLOUR_FLAG_OUTLINE) + if (colour.hasFlag(ColourFlag::withOutline)) { info->flags |= TEXT_DRAW_FLAG_OUTLINE; } - colour &= ~COLOUR_FLAG_OUTLINE; - if (!(colour & COLOUR_FLAG_INSET)) + if (!colour.hasFlag(ColourFlag::inset)) { if (!(info->flags & TEXT_DRAW_FLAG_INSET)) { uint16_t flags = info->flags; - ColourCharacterWindow(colour, &flags, reinterpret_cast(&info->palette)); + ColourCharacterWindow(colour.colour, &flags, reinterpret_cast(&info->palette)); } } else { info->flags |= TEXT_DRAW_FLAG_INSET; - colour &= ~COLOUR_FLAG_INSET; uint32_t eax; if (info->flags & TEXT_DRAW_FLAG_DARK) { if (info->flags & TEXT_DRAW_FLAG_EXTRA_DARK) { - eax = ColourMapA[colour].mid_light; + eax = ColourMapA[colour.colour].mid_light; eax = eax << 16; - eax = eax | ColourMapA[colour].dark; + eax = eax | ColourMapA[colour.colour].dark; } else { - eax = ColourMapA[colour].light; + eax = ColourMapA[colour.colour].light; eax = eax << 16; - eax = eax | ColourMapA[colour].mid_dark; + eax = eax | ColourMapA[colour.colour].mid_dark; } } else { - eax = ColourMapA[colour].lighter; + eax = ColourMapA[colour.colour].lighter; eax = eax << 16; - eax = eax | ColourMapA[colour].mid_light; + eax = eax | ColourMapA[colour.colour].mid_light; } // Adjust text palette. Store current colour? ; @@ -803,7 +800,7 @@ static void TTFProcessInitialColour(int32_t colour, TextDrawInfo* info) } void TTFDrawString( - DrawPixelInfo& dpi, const_utf8string text, int32_t colour, const ScreenCoordsXY& coords, bool noFormatting, + DrawPixelInfo& dpi, const_utf8string text, ColourWithFlags colour, const ScreenCoordsXY& coords, bool noFormatting, FontStyle fontStyle, TextDarkness darkness) { if (text == nullptr) @@ -878,7 +875,7 @@ static int32_t TTFGetStringWidth(std::string_view text, FontStyle fontStyle, boo * rct2: 0x00682F28 */ void GfxDrawStringWithYOffsets( - DrawPixelInfo& dpi, const utf8* text, int32_t colour, const ScreenCoordsXY& coords, const int8_t* yOffsets, + DrawPixelInfo& dpi, const utf8* text, ColourWithFlags colour, const ScreenCoordsXY& coords, const int8_t* yOffsets, bool forceSpriteFont, FontStyle fontStyle) { TextDrawInfo info; diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 8a5de8f107..dcf00ed2f4 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -1029,7 +1029,7 @@ void UpdatePaletteEffects() // Animate the water/lava/chain movement palette uint32_t shade = 0; - if (gConfigGeneral.RenderWeatherGloom) + if (Config::Get().general.RenderWeatherGloom) { auto paletteId = ClimateGetWeatherGloomPaletteId(GetGameState().ClimateCurrent); if (paletteId != FilterPaletteID::PaletteNull) @@ -1143,8 +1143,8 @@ void RefreshVideo(bool recreateWindow) void ToggleWindowedMode() { - int32_t targetMode = gConfigGeneral.FullscreenMode == 0 ? 2 : 0; + int32_t targetMode = Config::Get().general.FullscreenMode == 0 ? 2 : 0; ContextSetFullscreenMode(targetMode); - gConfigGeneral.FullscreenMode = targetMode; - ConfigSaveDefault(); + Config::Get().general.FullscreenMode = targetMode; + Config::Save(); } diff --git a/src/openrct2/drawing/Drawing.h b/src/openrct2/drawing/Drawing.h index 012ad0ac28..cd26b80f70 100644 --- a/src/openrct2/drawing/Drawing.h +++ b/src/openrct2/drawing/Drawing.h @@ -510,7 +510,7 @@ constexpr uint8_t kPaletteTotalOffsets = 192; #define INSET_RECT_F_60 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_DONT_LIGHTEN) #define INSET_RECT_F_E0 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_DONT_LIGHTEN | INSET_RECT_FLAG_FILL_MID_LIGHT) -#define MAX_SCROLLING_TEXT_MODES 38 +constexpr int8_t kMaxScrollingTextModes = 38; extern GamePalette gPalette; extern uint8_t gGamePalette[256 * 4]; @@ -547,7 +547,7 @@ void GfxDrawDashedLine( // rect void GfxFillRect(DrawPixelInfo& dpi, const ScreenRect& rect, int32_t colour); -void GfxFillRectInset(DrawPixelInfo& dpi, const ScreenRect& rect, int32_t colour, uint8_t flags); +void GfxFillRectInset(DrawPixelInfo& dpi, const ScreenRect& rect, ColourWithFlags colour, uint8_t flags); void GfxFilterRect(DrawPixelInfo& dpi, const ScreenRect& rect, FilterPaletteID palette); // sprite @@ -577,16 +577,15 @@ void FASTCALL GfxDrawSpriteRawMaskedSoftware( DrawPixelInfo& dpi, const ScreenCoordsXY& scrCoords, const ImageId maskImage, const ImageId colourImage); // string -void GfxDrawString(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, const_utf8string buffer, TextPaint textPaint = {}); - -void GfxDrawStringLeftCentred(DrawPixelInfo& dpi, StringId format, void* args, colour_t colour, const ScreenCoordsXY& coords); +void GfxDrawStringLeftCentred( + DrawPixelInfo& dpi, StringId format, void* args, ColourWithFlags colour, const ScreenCoordsXY& coords); void DrawStringCentredRaw( DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t numLines, const utf8* text, FontStyle fontStyle); void DrawNewsTicker( DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, colour_t colour, StringId format, u8string_view args, int32_t ticks); void GfxDrawStringWithYOffsets( - DrawPixelInfo& dpi, const utf8* text, int32_t colour, const ScreenCoordsXY& coords, const int8_t* yOffsets, + DrawPixelInfo& dpi, const utf8* text, ColourWithFlags colour, const ScreenCoordsXY& coords, const int8_t* yOffsets, bool forceSpriteFont, FontStyle fontStyle); int32_t GfxWrapString(u8string_view text, int32_t width, FontStyle fontStyle, u8string* outWrappedText, int32_t* outNumLines); @@ -597,7 +596,7 @@ int32_t StringGetHeightRaw(std::string_view text, FontStyle fontStyle); int32_t GfxClipString(char* buffer, int32_t width, FontStyle fontStyle); u8string ShortenPath(const u8string& path, int32_t availableWidth, FontStyle fontStyle); void TTFDrawString( - DrawPixelInfo& dpi, const_utf8string text, int32_t colour, const ScreenCoordsXY& coords, bool noFormatting, + DrawPixelInfo& dpi, const_utf8string text, ColourWithFlags colour, const ScreenCoordsXY& coords, bool noFormatting, FontStyle fontStyle, TextDarkness darkness); // scrolling text diff --git a/src/openrct2/drawing/DrawingLock.hpp b/src/openrct2/drawing/DrawingLock.hpp index e7ea094616..44a7f5303e 100644 --- a/src/openrct2/drawing/DrawingLock.hpp +++ b/src/openrct2/drawing/DrawingLock.hpp @@ -11,6 +11,8 @@ #include "../config/Config.h" +using namespace OpenRCT2; + template class DrawingUniqueLock { T& _mutex; @@ -19,7 +21,7 @@ template class DrawingUniqueLock public: DrawingUniqueLock(T& mutex) : _mutex(mutex) - , _enabled(gConfigGeneral.MultiThreading) + , _enabled(Config::Get().general.MultiThreading) { if (_enabled) _mutex.lock(); @@ -39,7 +41,7 @@ template class DrawingSharedLock public: DrawingSharedLock(T& mutex) : _mutex(mutex) - , _enabled(gConfigGeneral.MultiThreading) + , _enabled(Config::Get().general.MultiThreading) { if (_enabled) _mutex.lock_shared(); diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index f68407b33b..66891a2817 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -28,6 +28,8 @@ #include #include +using namespace OpenRCT2; + static uint8_t _bakedLightTexture_lantern_0[32 * 32]; static uint8_t _bakedLightTexture_lantern_1[64 * 64]; static uint8_t _bakedLightTexture_lantern_2[128 * 128]; @@ -130,12 +132,12 @@ void LightFXSetAvailable(bool available) bool LightFXIsAvailable() { - return _lightfxAvailable && gConfigGeneral.EnableLightFx != 0; + return _lightfxAvailable && Config::Get().general.EnableLightFx != 0; } bool LightFXForVehiclesIsAvailable() { - return LightFXIsAvailable() && gConfigGeneral.EnableLightFxForVehicles != 0; + return LightFXIsAvailable() && Config::Get().general.EnableLightFxForVehicles != 0; } void LightFXInit() diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 03399e1ed1..432e1da579 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -10,7 +10,6 @@ #include "NewDrawing.h" #include "../Context.h" -#include "../config/Config.h" #include "../drawing/Drawing.h" #include "../interface/Screenshot.h" #include "../localisation/StringIds.h" diff --git a/src/openrct2/drawing/Rect.cpp b/src/openrct2/drawing/Rect.cpp index e9044dd5b3..501e9fde68 100644 --- a/src/openrct2/drawing/Rect.cpp +++ b/src/openrct2/drawing/Rect.cpp @@ -24,15 +24,15 @@ * colour (ebp) * flags (si) */ -void GfxFillRectInset(DrawPixelInfo& dpi, const ScreenRect& rect, int32_t colour, uint8_t flags) +void GfxFillRectInset(DrawPixelInfo& dpi, const ScreenRect& rect, ColourWithFlags colour, uint8_t flags) { const auto leftTop = ScreenCoordsXY{ rect.GetLeft(), rect.GetTop() }; const auto leftBottom = ScreenCoordsXY{ rect.GetLeft(), rect.GetBottom() }; const auto rightTop = ScreenCoordsXY{ rect.GetRight(), rect.GetTop() }; const auto rightBottom = ScreenCoordsXY{ rect.GetRight(), rect.GetBottom() }; - if (colour & COLOUR_FLAG_TRANSLUCENT) + if (colour.hasFlag(ColourFlag::translucent)) { - auto palette = TranslucentWindowPalettes[BASE_COLOUR(colour)]; + auto palette = TranslucentWindowPalettes[colour.colour]; if (flags & INSET_RECT_FLAG_BORDER_NONE) { @@ -71,15 +71,15 @@ void GfxFillRectInset(DrawPixelInfo& dpi, const ScreenRect& rect, int32_t colour uint8_t shadow, fill, hilight; if (flags & INSET_RECT_FLAG_FILL_MID_LIGHT) { - shadow = ColourMapA[colour].dark; - fill = ColourMapA[colour].mid_light; - hilight = ColourMapA[colour].lighter; + shadow = ColourMapA[colour.colour].dark; + fill = ColourMapA[colour.colour].mid_light; + hilight = ColourMapA[colour.colour].lighter; } else { - shadow = ColourMapA[colour].mid_dark; - fill = ColourMapA[colour].light; - hilight = ColourMapA[colour].lighter; + shadow = ColourMapA[colour.colour].mid_dark; + fill = ColourMapA[colour.colour].light; + hilight = ColourMapA[colour.colour].lighter; } if (flags & INSET_RECT_FLAG_BORDER_NONE) @@ -104,7 +104,7 @@ void GfxFillRectInset(DrawPixelInfo& dpi, const ScreenRect& rect, int32_t colour } else { - fill = ColourMapA[colour].lighter; + fill = ColourMapA[colour.colour].lighter; } } GfxFillRect(dpi, { leftTop + ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, fill); diff --git a/src/openrct2/drawing/ScrollingText.cpp b/src/openrct2/drawing/ScrollingText.cpp index be176b72ef..74cbe84886 100644 --- a/src/openrct2/drawing/ScrollingText.cpp +++ b/src/openrct2/drawing/ScrollingText.cpp @@ -147,7 +147,7 @@ static int32_t ScrollingTextGetMatchingOrOldest( static void ScrollingTextFormat(utf8* dst, size_t size, DrawScrollText* scrollText) { - if (gConfigGeneral.UpperCaseBanners) + if (Config::Get().general.UpperCaseBanners) { FormatStringToUpper(dst, size, scrollText->string_id, scrollText->string_args); } @@ -1381,7 +1381,7 @@ static constexpr int16_t _scrollpos37[] = { -1, }; -static constexpr const int16_t* _scrollPositions[MAX_SCROLLING_TEXT_MODES] = { +static constexpr const int16_t* _scrollPositions[kMaxScrollingTextModes] = { _scrollpos0, _scrollpos1, _scrollpos2, @@ -1437,7 +1437,7 @@ ImageId ScrollingTextSetup( { std::scoped_lock lock(_scrollingTextMutex); - assert(scrollingMode < MAX_SCROLLING_TEXT_MODES); + assert(scrollingMode < kMaxScrollingTextModes); if (session.DPI.zoom_level > ZoomLevel{ 0 }) return ImageId(SPR_SCROLLING_TEXT_DEFAULT); @@ -1586,7 +1586,7 @@ static void ScrollingTextSetBitmapForTTF( int32_t min_vpos = -fontDesc->offset_y; int32_t max_vpos = std::min(surface->h - 2, min_vpos + 7); - bool use_hinting = gConfigFonts.EnableHinting && fontDesc->hinting_threshold > 0; + bool use_hinting = Config::Get().fonts.EnableHinting && fontDesc->hinting_threshold > 0; for (int32_t x = 0;; x++) { diff --git a/src/openrct2/drawing/TTF.cpp b/src/openrct2/drawing/TTF.cpp index 65f27c8569..da19b3c52a 100644 --- a/src/openrct2/drawing/TTF.cpp +++ b/src/openrct2/drawing/TTF.cpp @@ -19,11 +19,15 @@ # include "../OpenRCT2.h" # include "../core/Numerics.hpp" # include "../core/String.hpp" +# include "../drawing/Font.h" # include "../localisation/LocalisationService.h" # include "../platform/Platform.h" +# include "../util/Util.h" # include "DrawingLock.hpp" # include "TTF.h" +using namespace OpenRCT2; + static bool _ttfInitialised = false; constexpr int32_t kTTFSurfaceCacheSize = 256; @@ -76,7 +80,7 @@ static void TTFToggleHinting(bool) for (int32_t i = 0; i < FontStyleCount; i++) { TTFFontDescriptor* fontDesc = &(gCurrentTTFFontSet->size[i]); - bool use_hinting = gConfigFonts.EnableHinting && fontDesc->hinting_threshold; + bool use_hinting = Config::Get().fonts.EnableHinting && fontDesc->hinting_threshold; TTF_SetFontHinting(fontDesc->font, use_hinting ? 1 : 0); } diff --git a/src/openrct2/drawing/Text.cpp b/src/openrct2/drawing/Text.cpp index e368a498b8..60abc85e12 100644 --- a/src/openrct2/drawing/Text.cpp +++ b/src/openrct2/drawing/Text.cpp @@ -140,11 +140,6 @@ void DrawTextEllipsised( DrawText(dpi, coords, textPaint, buffer); } -void GfxDrawString(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, const_utf8string buffer, TextPaint textPaint) -{ - DrawText(dpi, coords, textPaint, buffer); -} - int32_t DrawTextWrapped(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format) { Formatter ft{}; diff --git a/src/openrct2/drawing/Text.h b/src/openrct2/drawing/Text.h index fcf1f28e78..3de584c26c 100644 --- a/src/openrct2/drawing/Text.h +++ b/src/openrct2/drawing/Text.h @@ -39,17 +39,21 @@ enum class TextDarkness struct TextPaint { - colour_t Colour = COLOUR_BLACK; + ColourWithFlags Colour = { COLOUR_BLACK }; ::FontStyle FontStyle = FontStyle::Medium; TextUnderline UnderlineText = TextUnderline::Off; TextAlignment Alignment = TextAlignment::LEFT; TextDarkness Darkness = TextDarkness::Regular; TextPaint() = default; - TextPaint(colour_t colour) + TextPaint(ColourWithFlags colour) : Colour(colour) { } + TextPaint(colour_t colour) + : Colour(ColourWithFlags{ colour }) + { + } TextPaint(::FontStyle fontStyle) : FontStyle(fontStyle) { @@ -63,21 +67,36 @@ struct TextPaint { } - TextPaint(colour_t colour, ::FontStyle fontStyle) + TextPaint(ColourWithFlags colour, ::FontStyle fontStyle) : Colour(colour) , FontStyle(fontStyle) { } - TextPaint(colour_t colour, TextUnderline underlineText) + TextPaint(colour_t colour, ::FontStyle fontStyle) + : Colour(ColourWithFlags{ colour }) + , FontStyle(fontStyle) + { + } + TextPaint(ColourWithFlags colour, TextUnderline underlineText) : Colour(colour) , UnderlineText(underlineText) { } - TextPaint(colour_t colour, TextAlignment alignment) + TextPaint(colour_t colour, TextUnderline underlineText) + : Colour(ColourWithFlags{ colour }) + , UnderlineText(underlineText) + { + } + TextPaint(ColourWithFlags colour, TextAlignment alignment) : Colour(colour) , Alignment(alignment) { } + TextPaint(colour_t colour, TextAlignment alignment) + : Colour(ColourWithFlags{ colour }) + , Alignment(alignment) + { + } TextPaint(::FontStyle fontStyle, TextUnderline underlineText) : FontStyle(fontStyle) @@ -95,30 +114,54 @@ struct TextPaint { } - TextPaint(colour_t colour, ::FontStyle fontStyle, TextUnderline underlineText) + TextPaint(ColourWithFlags colour, ::FontStyle fontStyle, TextUnderline underlineText) : Colour(colour) , FontStyle(fontStyle) , UnderlineText(underlineText) { } - TextPaint(colour_t colour, ::FontStyle fontStyle, TextAlignment alignment) + TextPaint(colour_t colour, ::FontStyle fontStyle, TextUnderline underlineText) + : Colour(ColourWithFlags{ colour }) + , FontStyle(fontStyle) + , UnderlineText(underlineText) + { + } + TextPaint(ColourWithFlags colour, ::FontStyle fontStyle, TextAlignment alignment) : Colour(colour) , FontStyle(fontStyle) , Alignment(alignment) { } - TextPaint(colour_t colour, ::FontStyle fontStyle, TextDarkness darkness) + TextPaint(colour_t colour, ::FontStyle fontStyle, TextAlignment alignment) + : Colour(ColourWithFlags{ colour }) + , FontStyle(fontStyle) + , Alignment(alignment) + { + } + TextPaint(ColourWithFlags colour, ::FontStyle fontStyle, TextDarkness darkness) : Colour(colour) , FontStyle(fontStyle) , Darkness(darkness) { } - TextPaint(colour_t colour, TextUnderline underlineText, TextAlignment alignment) + TextPaint(colour_t colour, ::FontStyle fontStyle, TextDarkness darkness) + : Colour(ColourWithFlags{ colour }) + , FontStyle(fontStyle) + , Darkness(darkness) + { + } + TextPaint(ColourWithFlags colour, TextUnderline underlineText, TextAlignment alignment) : Colour(colour) , UnderlineText(underlineText) , Alignment(alignment) { } + TextPaint(colour_t colour, TextUnderline underlineText, TextAlignment alignment) + : Colour(ColourWithFlags{ colour }) + , UnderlineText(underlineText) + , Alignment(alignment) + { + } TextPaint(::FontStyle fontStyle, TextUnderline underlineText, TextAlignment alignment) : FontStyle(fontStyle) , UnderlineText(underlineText) @@ -126,20 +169,34 @@ struct TextPaint { } - TextPaint(colour_t colour, ::FontStyle fontStyle, TextUnderline underlineText, TextAlignment alignment) + TextPaint(ColourWithFlags colour, ::FontStyle fontStyle, TextUnderline underlineText, TextAlignment alignment) : Colour(colour) , FontStyle(fontStyle) , UnderlineText(underlineText) , Alignment(alignment) { } - TextPaint(colour_t colour, ::FontStyle fontStyle, TextAlignment alignment, TextDarkness darkness) + TextPaint(colour_t colour, ::FontStyle fontStyle, TextUnderline underlineText, TextAlignment alignment) + : Colour(ColourWithFlags{ colour }) + , FontStyle(fontStyle) + , UnderlineText(underlineText) + , Alignment(alignment) + { + } + TextPaint(ColourWithFlags colour, ::FontStyle fontStyle, TextAlignment alignment, TextDarkness darkness) : Colour(colour) , FontStyle(fontStyle) , Alignment(alignment) , Darkness(darkness) { } + TextPaint(colour_t colour, ::FontStyle fontStyle, TextAlignment alignment, TextDarkness darkness) + : Colour(ColourWithFlags{ colour }) + , FontStyle(fontStyle) + , Alignment(alignment) + , Darkness(darkness) + { + } }; void DrawTextBasic(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, StringId format); diff --git a/src/openrct2/drawing/Weather.cpp b/src/openrct2/drawing/Weather.cpp index ef5112e074..025b9b32de 100644 --- a/src/openrct2/drawing/Weather.cpp +++ b/src/openrct2/drawing/Weather.cpp @@ -55,7 +55,7 @@ const DrawWeatherFunc DrawSnowFunctions[] = { */ void DrawWeather(DrawPixelInfo& dpi, IWeatherDrawer* weatherDrawer) { - if (gConfigGeneral.RenderWeatherEffects) + if (Config::Get().general.RenderWeatherEffects) { uint32_t viewFlags = 0; diff --git a/src/openrct2/drawing/X8DrawingEngine.cpp b/src/openrct2/drawing/X8DrawingEngine.cpp index 667445e001..5a5257c74c 100644 --- a/src/openrct2/drawing/X8DrawingEngine.cpp +++ b/src/openrct2/drawing/X8DrawingEngine.cpp @@ -24,6 +24,7 @@ #include "LightFX.h" #include "Weather.h" +#include #include using namespace OpenRCT2; @@ -120,7 +121,7 @@ X8DrawingEngine::X8DrawingEngine([[maybe_unused]] const std::shared_ptr #include void EntityTweener::AddEntity(EntityBase* entity) diff --git a/src/openrct2/entity/Fountain.cpp b/src/openrct2/entity/Fountain.cpp index 5bbb7ca192..4a7d6eeae3 100644 --- a/src/openrct2/entity/Fountain.cpp +++ b/src/openrct2/entity/Fountain.cpp @@ -100,7 +100,7 @@ void JumpingFountain::StartAnimation(const JumpingFountainType newType, const Co { case PATTERN::CYCLIC_SQUARES: // 0, 1, 2, 3 - for (int32_t i = 0; i < NumOrthogonalDirections; i++) + for (int32_t i = 0; i < kNumOrthogonalDirections; i++) { JumpingFountain::Create( newType, { newLoc + _fountainDirectionsPositive[i], newZ }, _fountainDirections[i], @@ -110,7 +110,7 @@ void JumpingFountain::StartAnimation(const JumpingFountainType newType, const Co case PATTERN::BOUNCING_PAIRS: // random [0, 2 or 1, 3] randomIndex = ScenarioRand() & 1; - for (int32_t i = randomIndex; i < NumOrthogonalDirections; i += 2) + for (int32_t i = randomIndex; i < kNumOrthogonalDirections; i += 2) { JumpingFountain::Create( newType, { newLoc + _fountainDirectionsPositive[i], newZ }, _fountainDirections[i], diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index d5446cc109..5e4b89230e 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -740,7 +740,7 @@ int32_t Guest::CheckEasterEggName(int32_t index) const return String::IEquals(buffer, gPeepEasterEggNames[index]); } -void Guest::Loc68F9F3() +void Guest::UpdateMotivesIdle() { // Idle peep happiness tends towards 127 (50%). if (HappinessTarget >= 128) @@ -785,9 +785,9 @@ void Guest::Loc68F9F3() } } -void Guest::Loc68FA89() +/* rct2: 0x0068FA89*/ +void Guest::UpdateConsumptionMotives() { - // 68FA89 if (TimeToConsume == 0 && HasFoodOrDrink()) { TimeToConsume += 3; @@ -843,11 +843,8 @@ void Guest::Loc68FA89() newEnergy = newTargetEnergy; } - if (newEnergy < kPeepMinEnergy) - newEnergy = kPeepMinEnergy; - /* Previous code here suggested maximum energy is 128. */ - newEnergy = std::min(kPeepMaxEnergy, newEnergy); + newEnergy = std::clamp(newEnergy, kPeepMinEnergy, kPeepMaxEnergy); if (newEnergy != Energy) { @@ -901,325 +898,334 @@ void Guest::Loc68FA89() void Guest::Tick128UpdateGuest(uint32_t index) { const auto currentTicks = GetGameState().CurrentTicks; - - if ((index & 0x1FF) == (currentTicks & 0x1FF)) + if ((index & 0x1FF) != (currentTicks & 0x1FF)) { - /* Effect of masking with 0x1FF here vs mask 0x7F, - * which is the condition for calling this function, is - * to reduce how often the content in this conditional - * is executed to once every four calls. */ - if (PeepFlags & PEEP_FLAGS_CROWDED) + UpdateConsumptionMotives(); + return; + } + + /* Effect of masking with 0x1FF here vs mask 0x7F, + * which is the condition for calling this function, is + * to reduce how often the content in this conditional + * is executed to once every four calls. */ + if (PeepFlags & PEEP_FLAGS_CROWDED) + { + PeepThoughtType thought_type = crowded_thoughts[ScenarioRand() & 0xF]; + if (thought_type != PeepThoughtType::None) { - PeepThoughtType thought_type = crowded_thoughts[ScenarioRand() & 0xF]; - if (thought_type != PeepThoughtType::None) - { - InsertNewThought(thought_type); - } + InsertNewThought(thought_type); } + } - if (PeepFlags & PEEP_FLAGS_EXPLODE && x != LOCATION_NULL) - { - if (State == PeepState::Walking || State == PeepState::Sitting) - { - OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::Crash, GetLocation()); - - ExplosionCloud::Create({ x, y, z + 16 }); - ExplosionFlare::Create({ x, y, z + 16 }); - - Remove(); - return; - } - - PeepFlags &= ~PEEP_FLAGS_EXPLODE; - } - - if (PeepFlags & PEEP_FLAGS_HUNGER) - { - if (Hunger >= 15) - Hunger -= 15; - } - - if (PeepFlags & PEEP_FLAGS_TOILET) - { - if (Toilet <= 180) - Toilet += 50; - } - - if (PeepFlags & PEEP_FLAGS_HAPPINESS) - { - HappinessTarget = 5; - } - - if (PeepFlags & PEEP_FLAGS_NAUSEA) - { - NauseaTarget = 200; - if (Nausea <= 130) - Nausea = 130; - } - - if (Angriness != 0) - Angriness--; - + if (PeepFlags & PEEP_FLAGS_EXPLODE && x != LOCATION_NULL) + { if (State == PeepState::Walking || State == PeepState::Sitting) { - SurroundingsThoughtTimeout++; - if (SurroundingsThoughtTimeout >= 18) - { - SurroundingsThoughtTimeout = 0; - if (x != LOCATION_NULL) - { - PeepThoughtType thought_type = PeepAssessSurroundings(x & 0xFFE0, y & 0xFFE0, z); + OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::Crash, GetLocation()); - if (thought_type != PeepThoughtType::None) - { - InsertNewThought(thought_type); - HappinessTarget = std::min(kPeepMaxHappiness, HappinessTarget + 45); - } + ExplosionCloud::Create({ x, y, z + 16 }); + ExplosionFlare::Create({ x, y, z + 16 }); + + Remove(); + return; + } + + PeepFlags &= ~PEEP_FLAGS_EXPLODE; + } + + if (PeepFlags & PEEP_FLAGS_HUNGER) + { + if (Hunger >= 15) + Hunger -= 15; + } + + if (PeepFlags & PEEP_FLAGS_TOILET) + { + if (Toilet <= 180) + Toilet += 50; + } + + if (PeepFlags & PEEP_FLAGS_HAPPINESS) + { + HappinessTarget = 5; + } + + if (PeepFlags & PEEP_FLAGS_NAUSEA) + { + NauseaTarget = 200; + if (Nausea <= 130) + Nausea = 130; + } + + if (Angriness != 0) + Angriness--; + + if (State == PeepState::Walking || State == PeepState::Sitting) + { + SurroundingsThoughtTimeout++; + if (SurroundingsThoughtTimeout >= 18) + { + SurroundingsThoughtTimeout = 0; + if (x != LOCATION_NULL) + { + PeepThoughtType thought_type = PeepAssessSurroundings(x & 0xFFE0, y & 0xFFE0, z); + + if (thought_type != PeepThoughtType::None) + { + InsertNewThought(thought_type); + HappinessTarget = std::min(kPeepMaxHappiness, HappinessTarget + 45); } } } + } + if (!(PeepFlags & PEEP_FLAGS_ANIMATION_FROZEN)) + { UpdateSpriteType(); + } - if (State == PeepState::OnRide || State == PeepState::EnteringRide) + if (State == PeepState::OnRide || State == PeepState::EnteringRide) + { + GuestTimeOnRide = std::min(255, GuestTimeOnRide + 1); + + if (PeepFlags & PEEP_FLAGS_WOW) { - GuestTimeOnRide = std::min(255, GuestTimeOnRide + 1); + InsertNewThought(PeepThoughtType::Wow2); + } - if (PeepFlags & PEEP_FLAGS_WOW) + if (GuestTimeOnRide > 15) + { + HappinessTarget = std::max(0, HappinessTarget - 5); + + if (GuestTimeOnRide > 22) { - InsertNewThought(PeepThoughtType::Wow2); - } - - if (GuestTimeOnRide > 15) - { - HappinessTarget = std::max(0, HappinessTarget - 5); - - if (GuestTimeOnRide > 22) + auto ride = GetRide(CurrentRide); + if (ride != nullptr) { - auto ride = GetRide(CurrentRide); - if (ride != nullptr) - { - PeepThoughtType thought_type = ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IN_RIDE) - ? PeepThoughtType::GetOut - : PeepThoughtType::GetOff; + PeepThoughtType thought_type = ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IN_RIDE) + ? PeepThoughtType::GetOut + : PeepThoughtType::GetOff; - InsertNewThought(thought_type, CurrentRide); - } + InsertNewThought(thought_type, CurrentRide); } } } + } - if (State == PeepState::Walking && !OutsideOfPark && !(PeepFlags & PEEP_FLAGS_LEAVING_PARK) && GuestNumRides == 0 - && GuestHeadingToRideId.IsNull()) - { - uint32_t time_duration = currentTicks - ParkEntryTime; - time_duration /= 2048; + if (PeepFlags & PEEP_FLAGS_POSITION_FROZEN) + { + return; + } - if (time_duration >= 5) - { - PickRideToGoOn(); + if (State == PeepState::Walking && !OutsideOfPark && !(PeepFlags & PEEP_FLAGS_LEAVING_PARK) && GuestNumRides == 0 + && GuestHeadingToRideId.IsNull()) + { + uint32_t time_duration = currentTicks - ParkEntryTime; + time_duration /= 2048; - if (GuestHeadingToRideId.IsNull()) - { - HappinessTarget = std::max(HappinessTarget - 128, 0); - PeepLeavePark(this); - PeepUpdateHunger(this); - Loc68F9F3(); - Loc68FA89(); - return; - } - } - } - - if ((ScenarioRand() & 0xFFFF) <= ((HasItem(ShopItem::Map)) ? 8192u : 2184u)) + if (time_duration >= 5) { PickRideToGoOn(); - } - if ((index & 0x3FF) == (currentTicks & 0x3FF)) - { - /* Effect of masking with 0x3FF here vs mask 0x1FF, - * which is used in the encompassing conditional, is - * to reduce how often the content in this conditional - * is executed to once every second time the encompassing - * conditional executes. */ - - if (!OutsideOfPark && (State == PeepState::Walking || State == PeepState::Sitting)) + if (GuestHeadingToRideId.IsNull()) { - uint8_t num_thoughts = 0; - PeepThoughtType possible_thoughts[5]; + HappinessTarget = std::max(HappinessTarget - 128, 0); + PeepLeavePark(this); + PeepUpdateHunger(this); + UpdateMotivesIdle(); + UpdateConsumptionMotives(); + return; + } + } + } - if (PeepFlags & PEEP_FLAGS_LEAVING_PARK) + if ((ScenarioRand() & 0xFFFF) <= ((HasItem(ShopItem::Map)) ? 8192u : 2184u)) + { + PickRideToGoOn(); + } + + if ((index & 0x3FF) == (currentTicks & 0x3FF)) + { + /* Effect of masking with 0x3FF here vs mask 0x1FF, + * which is used in the encompassing conditional, is + * to reduce how often the content in this conditional + * is executed to once every second time the encompassing + * conditional executes. */ + + if (!OutsideOfPark && (State == PeepState::Walking || State == PeepState::Sitting)) + { + uint8_t num_thoughts = 0; + PeepThoughtType possible_thoughts[5]; + + if (PeepFlags & PEEP_FLAGS_LEAVING_PARK) + { + possible_thoughts[num_thoughts++] = PeepThoughtType::GoHome; + } + else + { + if (Energy <= 70 && Happiness < 128) { - possible_thoughts[num_thoughts++] = PeepThoughtType::GoHome; + possible_thoughts[num_thoughts++] = PeepThoughtType::Tired; + } + + if (Hunger <= 10 && !HasFoodOrDrink()) + { + possible_thoughts[num_thoughts++] = PeepThoughtType::Hungry; + } + + if (Thirst <= 25 && !HasFoodOrDrink()) + { + possible_thoughts[num_thoughts++] = PeepThoughtType::Thirsty; + } + + if (Toilet >= 160) + { + possible_thoughts[num_thoughts++] = PeepThoughtType::Toilet; + } + + 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. + * This was superfluous so should probably check something else. + * Guessed that this should really be checking energy, since + * the addresses for happiness and energy are quite close, + * 70 is also the threshold for tired thoughts (see above) and + * it makes sense that a tired peep might not think about getting + * more money. */ + possible_thoughts[num_thoughts++] = PeepThoughtType::RunningOut; + } + } + + if (num_thoughts != 0) + { + PeepThoughtType chosen_thought = possible_thoughts[ScenarioRand() % num_thoughts]; + + InsertNewThought(chosen_thought); + + switch (chosen_thought) + { + case PeepThoughtType::Hungry: + PeepHeadForNearestRideWithFlags(this, false, RIDE_TYPE_FLAG_SELLS_FOOD); + break; + case PeepThoughtType::Thirsty: + PeepHeadForNearestRideWithFlags(this, false, RIDE_TYPE_FLAG_SELLS_DRINKS); + break; + case PeepThoughtType::Toilet: + PeepHeadForNearestRideWithFlags(this, false, RIDE_TYPE_FLAG_IS_TOILET); + break; + case PeepThoughtType::RunningOut: + PeepHeadForNearestRideWithFlags(this, false, RIDE_TYPE_FLAG_IS_CASH_MACHINE); + break; + default: + break; + } + } + } + } + else + { + /* This branch of the conditional is executed on the + * remaining times the encompassing conditional is + * executed (which is also every second time, but + * the alternate time to the true branch). */ + if (Nausea >= 140) + { + PeepThoughtType thought_type = PeepThoughtType::Sick; + if (Nausea >= 200) + { + thought_type = PeepThoughtType::VerySick; + PeepHeadForNearestRideWithFlags(this, true, RIDE_TYPE_FLAG_IS_FIRST_AID); + } + InsertNewThought(thought_type); + } + } + + switch (State) + { + case PeepState::Walking: + case PeepState::LeavingPark: + case PeepState::EnteringPark: + PeepDecideWhetherToLeavePark(this); + PeepUpdateHunger(this); + break; + + case PeepState::Sitting: + if (EnergyTarget <= 135) + EnergyTarget += 5; + + if (Thirst >= 5) + { + Thirst -= 4; + Toilet = std::min(255, Toilet + 3); + } + + if (NauseaTarget >= 50) + NauseaTarget -= 6; + + // In the original this branched differently + // but it would mean setting the peep happiness from + // a thought type entry which i think is incorrect. + PeepUpdateHunger(this); + break; + + case PeepState::Queuing: + if (TimeInQueue >= 2000) + { + /* Peep happiness is affected once the peep has been waiting + * too long in a queue. */ + bool found = false; + for (auto* pathElement : TileElementsView(NextLoc)) + { + if (pathElement->GetBaseZ() != NextLoc.z) + continue; + + // Check if the footpath has a queue line TV monitor on it + if (pathElement->HasAddition() && !pathElement->AdditionIsGhost()) + { + auto* pathAddEntry = pathElement->GetAdditionEntry(); + if (pathAddEntry != nullptr && (pathAddEntry->flags & PATH_ADDITION_FLAG_IS_QUEUE_SCREEN)) + { + found = true; + } + } + break; + } + + if (found) + { + /* Queue line TV monitors make the peeps waiting in the queue + * slowly happier, up to a certain level. */ + /* Why don't queue line TV monitors start affecting the peeps + * as soon as they join the queue?? */ + if (HappinessTarget < 90) + HappinessTarget = 90; + + if (HappinessTarget < 165) + HappinessTarget += 2; } else { - if (Energy <= 70 && Happiness < 128) - { - possible_thoughts[num_thoughts++] = PeepThoughtType::Tired; - } - - if (Hunger <= 10 && !HasFoodOrDrink()) - { - possible_thoughts[num_thoughts++] = PeepThoughtType::Hungry; - } - - if (Thirst <= 25 && !HasFoodOrDrink()) - { - possible_thoughts[num_thoughts++] = PeepThoughtType::Thirsty; - } - - if (Toilet >= 160) - { - possible_thoughts[num_thoughts++] = PeepThoughtType::Toilet; - } - - 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. - * This was superfluous so should probably check something else. - * Guessed that this should really be checking energy, since - * the addresses for happiness and energy are quite close, - * 70 is also the threshold for tired thoughts (see above) and - * it makes sense that a tired peep might not think about getting - * more money. */ - possible_thoughts[num_thoughts++] = PeepThoughtType::RunningOut; - } - } - - if (num_thoughts != 0) - { - PeepThoughtType chosen_thought = possible_thoughts[ScenarioRand() % num_thoughts]; - - InsertNewThought(chosen_thought); - - switch (chosen_thought) - { - case PeepThoughtType::Hungry: - PeepHeadForNearestRideWithFlags(this, false, RIDE_TYPE_FLAG_SELLS_FOOD); - break; - case PeepThoughtType::Thirsty: - PeepHeadForNearestRideWithFlags(this, false, RIDE_TYPE_FLAG_SELLS_DRINKS); - break; - case PeepThoughtType::Toilet: - PeepHeadForNearestRideWithFlags(this, false, RIDE_TYPE_FLAG_IS_TOILET); - break; - case PeepThoughtType::RunningOut: - PeepHeadForNearestRideWithFlags(this, false, RIDE_TYPE_FLAG_IS_CASH_MACHINE); - break; - default: - break; - } + /* Without a queue line TV monitor peeps waiting too long + * in a queue get less happy. */ + HappinessTarget = std::max(HappinessTarget - 4, 0); } } - } - else - { - /* This branch of the conditional is executed on the - * remaining times the encompassing conditional is - * executed (which is also every second time, but - * the alternate time to the true branch). */ - if (Nausea >= 140) + PeepUpdateHunger(this); + break; + case PeepState::EnteringRide: + if (SubState == 17 || SubState == 15) { - PeepThoughtType thought_type = PeepThoughtType::Sick; - if (Nausea >= 200) - { - thought_type = PeepThoughtType::VerySick; - PeepHeadForNearestRideWithFlags(this, true, RIDE_TYPE_FLAG_IS_FIRST_AID); - } - InsertNewThought(thought_type); - } - } - - switch (State) - { - case PeepState::Walking: - case PeepState::LeavingPark: - case PeepState::EnteringPark: PeepDecideWhetherToLeavePark(this); - PeepUpdateHunger(this); - break; - - case PeepState::Sitting: - if (EnergyTarget <= 135) - EnergyTarget += 5; - - if (Thirst >= 5) - { - Thirst -= 4; - Toilet = std::min(255, Toilet + 3); - } - - if (NauseaTarget >= 50) - NauseaTarget -= 6; - - // In the original this branched differently - // but it would mean setting the peep happiness from - // a thought type entry which i think is incorrect. - PeepUpdateHunger(this); - break; - - case PeepState::Queuing: - if (TimeInQueue >= 2000) - { - /* Peep happiness is affected once the peep has been waiting - * too long in a queue. */ - bool found = false; - for (auto* pathElement : TileElementsView(NextLoc)) - { - if (pathElement->GetBaseZ() != NextLoc.z) - continue; - - // Check if the footpath has a queue line TV monitor on it - if (pathElement->HasAddition() && !pathElement->AdditionIsGhost()) - { - auto* pathAddEntry = pathElement->GetAdditionEntry(); - if (pathAddEntry != nullptr && (pathAddEntry->flags & PATH_ADDITION_FLAG_IS_QUEUE_SCREEN)) - { - found = true; - } - } - break; - } - - if (found) - { - /* Queue line TV monitors make the peeps waiting in the queue - * slowly happier, up to a certain level. */ - /* Why don't queue line TV monitors start affecting the peeps - * as soon as they join the queue?? */ - if (HappinessTarget < 90) - HappinessTarget = 90; - - if (HappinessTarget < 165) - HappinessTarget += 2; - } - else - { - /* Without a queue line TV monitor peeps waiting too long - * in a queue get less happy. */ - HappinessTarget = std::max(HappinessTarget - 4, 0); - } - } - PeepUpdateHunger(this); - break; - case PeepState::EnteringRide: - if (SubState == 17 || SubState == 15) - { - PeepDecideWhetherToLeavePark(this); - } - PeepUpdateHunger(this); - break; - default: - break; - } - - Loc68F9F3(); + } + PeepUpdateHunger(this); + break; + default: + break; } - Loc68FA89(); + UpdateMotivesIdle(); + UpdateConsumptionMotives(); } /** @@ -1479,7 +1485,9 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) bool hasVoucher = false; - bool isRainingAndUmbrella = shopItem == ShopItem::Umbrella && ClimateIsRaining(); + const bool isPrecipitating = ClimateIsRaining() || ClimateIsSnowingHeavily(); + const bool isUmbrella = shopItem == ShopItem::Umbrella; + const bool isRainingAndUmbrella = isPrecipitating && isUmbrella; if ((HasItem(ShopItem::Voucher)) && (VoucherType == VOUCHER_TYPE_FOOD_OR_DRINK_FREE) && (VoucherShopItem == shopItem)) { @@ -1508,7 +1516,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) if ((shopItem == ShopItem::Balloon || shopItem == ShopItem::IceCream || shopItem == ShopItem::Candyfloss || shopItem == ShopItem::Sunglasses) - && ClimateIsRaining()) + && isPrecipitating) { return false; } @@ -1664,7 +1672,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) auto ft = Formatter(); FormatNameTo(ft); ft.Add(shopItemDescriptor.Naming.Indefinite); - if (gConfigNotifications.GuestBoughtItem) + if (Config::Get().notifications.GuestBoughtItem) { News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, Id, ft); } @@ -1852,7 +1860,7 @@ Ride* Guest::FindBestRideToGoOn() { if (ShouldGoOnRide(ride, StationIndex::FromUnderlying(0), false, true) && RideHasRatings(ride)) { - if (mostExcitingRide == nullptr || ride.excitement > mostExcitingRide->excitement) + if (mostExcitingRide == nullptr || ride.ratings.excitement > mostExcitingRide->ratings.excitement) { mostExcitingRide = &ride; } @@ -1863,9 +1871,9 @@ Ride* Guest::FindBestRideToGoOn() return mostExcitingRide; } -OpenRCT2::BitSet Guest::FindRidesToGoOn() +OpenRCT2::BitSet Guest::FindRidesToGoOn() { - OpenRCT2::BitSet rideConsideration; + OpenRCT2::BitSet rideConsideration; // FIX Originally checked for a toy, likely a mistake and should be a map, // but then again this seems to only allow the peep to go on @@ -1909,7 +1917,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.excitement >= RIDE_RATING(8, 00)) + if (ride.highest_drop_height > 66 || ride.ratings.excitement >= RIDE_RATING(8, 00)) { rideConsideration[ride.id.ToUnderlying()] = true; } @@ -2048,7 +2056,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.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) + if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) { PeepRideIsTooIntense(this, ride, peepAtRide); return false; @@ -2056,7 +2064,8 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b } else { - if (ClimateIsRaining() && !ShouldRideWhileRaining(ride)) + const bool isPrecipitating = ClimateIsRaining() || ClimateIsSnowingHeavily(); + if (isPrecipitating && !ShouldRideWhileRaining(ride)) { if (peepAtRide) { @@ -2072,7 +2081,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b } // If it is raining and the ride provides shelter skip the // ride intensity check and get me on a sheltered ride! - if (!ClimateIsRaining() || !ShouldRideWhileRaining(ride)) + if (!isPrecipitating || !ShouldRideWhileRaining(ride)) { if (!GetGameState().Cheats.IgnoreRideIntensity) { @@ -2081,7 +2090,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // intensity and decrease the min intensity by about 2.5. ride_rating maxIntensity = std::min(Intensity.GetMaximum() * 100, 1000) + Happiness; ride_rating minIntensity = (Intensity.GetMinimum() * 100) - Happiness; - if (ride.intensity < minIntensity) + if (ride.ratings.intensity < minIntensity) { if (peepAtRide) { @@ -2095,7 +2104,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b ChoseNotToGoOnRide(ride, peepAtRide, true); return false; } - if (ride.intensity > maxIntensity) + if (ride.ratings.intensity > maxIntensity) { PeepRideIsTooIntense(this, ride, peepAtRide); return false; @@ -2104,7 +2113,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // Nausea calculations. ride_rating maxNausea = NauseaMaximumThresholds[(EnumValue(NauseaTolerance) & 3)] + Happiness; - if (ride.nausea > maxNausea) + if (ride.ratings.nausea > maxNausea) { if (peepAtRide) { @@ -2120,7 +2129,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b } // Very nauseous peeps will only go on very gentle rides. - if (ride.nausea >= FIXED_2DP(1, 40) && Nausea > 160) + if (ride.ratings.nausea >= FIXED_2DP(1, 40) && Nausea > 160) { ChoseNotToGoOnRide(ride, peepAtRide, false); return false; @@ -2559,7 +2568,7 @@ bool Guest::FindVehicleToEnter(const Ride& ride, std::vector& car_array { chosen_train = ride.GetStation(CurrentRideStation).TrainAtStation; } - if (chosen_train >= OpenRCT2::Limits::MaxTrainsPerRide) + if (chosen_train >= OpenRCT2::Limits::kMaxTrainsPerRide) { return false; } @@ -2695,7 +2704,7 @@ static int16_t PeepCalculateRideSatisfaction(Guest* peep, const Ride& ride) static void PeepUpdateFavouriteRide(Guest* peep, const Ride& ride) { peep->PeepFlags &= ~PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE; - uint8_t peepRideRating = std::clamp((ride.excitement / 4) + peep->Happiness, 0, kPeepMaxHappiness); + uint8_t peepRideRating = std::clamp((ride.ratings.excitement / 4) + peep->Happiness, 0, kPeepMaxHappiness); if (peepRideRating >= peep->FavouriteRideRating) { if (peep->Happiness >= 160 && peep->HappinessTarget >= 160) @@ -2750,19 +2759,19 @@ static int16_t PeepCalculateRideIntensityNauseaSatisfaction(Guest* peep, const R uint8_t nauseaSatisfaction = 3; ride_rating maxIntensity = peep->Intensity.GetMaximum() * 100; ride_rating minIntensity = peep->Intensity.GetMinimum() * 100; - if (minIntensity <= ride.intensity && maxIntensity >= ride.intensity) + if (minIntensity <= ride.ratings.intensity && maxIntensity >= ride.ratings.intensity) { intensitySatisfaction--; } minIntensity -= peep->Happiness * 2; maxIntensity += peep->Happiness; - if (minIntensity <= ride.intensity && maxIntensity >= ride.intensity) + if (minIntensity <= ride.ratings.intensity && maxIntensity >= ride.ratings.intensity) { intensitySatisfaction--; } minIntensity -= peep->Happiness * 2; maxIntensity += peep->Happiness; - if (minIntensity <= ride.intensity && maxIntensity >= ride.intensity) + if (minIntensity <= ride.ratings.intensity && maxIntensity >= ride.ratings.intensity) { intensitySatisfaction--; } @@ -2771,19 +2780,19 @@ static int16_t PeepCalculateRideIntensityNauseaSatisfaction(Guest* peep, const R // has a minimum preferred nausea value. (For peeps with None or Low, this is set to zero.) ride_rating minNausea = NauseaMinimumThresholds[(EnumValue(peep->NauseaTolerance) & 3)]; ride_rating maxNausea = NauseaMaximumThresholds[(EnumValue(peep->NauseaTolerance) & 3)]; - if (minNausea <= ride.nausea && maxNausea >= ride.nausea) + if (minNausea <= ride.ratings.nausea && maxNausea >= ride.ratings.nausea) { nauseaSatisfaction--; } minNausea -= peep->Happiness * 2; maxNausea += peep->Happiness; - if (minNausea <= ride.nausea && maxNausea >= ride.nausea) + if (minNausea <= ride.ratings.nausea && maxNausea >= ride.ratings.nausea) { nauseaSatisfaction--; } minNausea -= peep->Happiness * 2; maxNausea += peep->Happiness; - if (minNausea <= ride.nausea && maxNausea >= ride.nausea) + if (minNausea <= ride.ratings.nausea && maxNausea >= ride.ratings.nausea) { nauseaSatisfaction--; } @@ -2842,7 +2851,7 @@ static int16_t PeepCalculateRideIntensityNauseaSatisfaction(Guest* peep, const R static void PeepUpdateRideNauseaGrowth(Guest* peep, const Ride& ride) { uint32_t nauseaMultiplier = std::clamp(256 - peep->HappinessTarget, 64, 200); - uint32_t nauseaGrowthRateChange = (ride.nausea * nauseaMultiplier) / 512; + uint32_t nauseaGrowthRateChange = (ride.ratings.nausea * nauseaMultiplier) / 512; nauseaGrowthRateChange *= std::max(static_cast(128), peep->Hunger) / 64; nauseaGrowthRateChange >>= (EnumValue(peep->NauseaTolerance) & 3); peep->NauseaTarget = static_cast(std::min(peep->NauseaTarget + nauseaGrowthRateChange, 255u)); @@ -2854,7 +2863,7 @@ static bool PeepShouldGoOnRideAgain(Guest* peep, const Ride& ride) return false; if (!RideHasRatings(ride)) return false; - if (ride.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) + if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) return false; if (peep->Happiness < 180) return false; @@ -2899,7 +2908,7 @@ static bool PeepReallyLikedRide(Guest* peep, const Ride& ride) return false; if (!RideHasRatings(ride)) return false; - if (ride.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) + if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) return false; return true; } @@ -3142,7 +3151,7 @@ template static void PeepHeadForNearestRide(Guest* peep, bool consid } } - OpenRCT2::BitSet rideConsideration; + OpenRCT2::BitSet rideConsideration; if (!considerOnlyCloseRides && (peep->HasItem(ShopItem::Map))) { // Consider all rides in the park @@ -3185,7 +3194,7 @@ template static void PeepHeadForNearestRide(Guest* peep, bool consid } // Filter the considered rides - RideId potentialRides[OpenRCT2::Limits::MaxRidesInPark]; + RideId potentialRides[OpenRCT2::Limits::kMaxRidesInPark]; size_t numPotentialRides = 0; for (auto& ride : GetRideManager()) { @@ -3577,7 +3586,7 @@ void PeepUpdateRideLeaveEntranceDefault(Guest* peep, Ride& ride, CoordsXYZD& ent auto ft = Formatter(); ride.FormatNameTo(ft); - if (gConfigNotifications.RideWarnings) + if (Config::Get().notifications.RideWarnings) { News::AddItemToQueue(News::ItemType::Ride, STR_GUESTS_GETTING_STUCK_ON_RIDE, peep->CurrentRide.ToUnderlying(), ft); } @@ -3790,7 +3799,7 @@ static void PeepGoToRideExit(Peep* peep, const Ride& ride, int16_t x, int16_t y, peep->MoveTo({ x, y, z }); - Guard::Assert(peep->CurrentRideStation.ToUnderlying() < OpenRCT2::Limits::MaxStationsPerRide); + Guard::Assert(peep->CurrentRideStation.ToUnderlying() < OpenRCT2::Limits::kMaxStationsPerRide); auto exit = ride.GetStation(peep->CurrentRideStation).Exit; x = exit.x; y = exit.y; @@ -3850,7 +3859,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) } else { - ride.total_profit = AddClamp_money64(ride.total_profit, ridePrice); + ride.total_profit = AddClamp(ride.total_profit, ridePrice); ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; SpendMoney(PaidOnRides, ridePrice, ExpenditureType::ParkRideTickets); } @@ -3881,7 +3890,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) else msg_string = STR_PEEP_TRACKING_PEEP_IS_ON_X; - if (gConfigNotifications.GuestOnRide) + if (Config::Get().notifications.GuestOnRide) { News::AddItemToQueue(News::ItemType::PeepOnRide, msg_string, Id, ft); } @@ -4137,7 +4146,7 @@ void Guest::UpdateRideLeaveVehicle() vehicle->ApplyMass(-Mass); vehicle->Invalidate(); - if (ride_station.ToUnderlying() >= OpenRCT2::Limits::MaxStationsPerRide) + if (ride_station.ToUnderlying() >= OpenRCT2::Limits::kMaxStationsPerRide) { // HACK #5658: Some parks have hacked rides which end up in this state auto bestStationIndex = RideGetFirstValidStationExit(*ride); @@ -4156,7 +4165,7 @@ void Guest::UpdateRideLeaveVehicle() const auto* carEntry = &rideEntry->Cars[vehicle->vehicle_type]; - assert(CurrentRideStation.ToUnderlying() < OpenRCT2::Limits::MaxStationsPerRide); + assert(CurrentRideStation.ToUnderlying() < OpenRCT2::Limits::kMaxStationsPerRide); auto& station = ride->GetStation(CurrentRideStation); if (!(carEntry->flags & CAR_ENTRY_FLAG_LOADING_WAYPOINTS)) @@ -4922,7 +4931,7 @@ void Guest::UpdateRideMazePathfinding() uint8_t hedges[4]{ 0xFF, 0xFF, 0xFF, 0xFF }; uint8_t openCount = 0; uint8_t mazeReverseLastEdge = DirectionReverse(MazeLastEdge); - for (uint8_t i = 0; i < NumOrthogonalDirections; ++i) + for (uint8_t i = 0; i < kNumOrthogonalDirections; ++i) { if (!(mazeEntry & (1 << _MazeCurrentDirectionToOpenHedge[Var37 / 4][i])) && i != mazeReverseLastEdge) { @@ -5035,7 +5044,7 @@ void Guest::UpdateRideLeaveExit() FormatNameTo(ft); ride->FormatNameTo(ft); - if (gConfigNotifications.GuestLeftRide) + if (Config::Get().notifications.GuestLeftRide) { News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_LEFT_RIDE_X, Id, ft); } @@ -6279,17 +6288,17 @@ static bool PeepShouldWatchRide(TileElement* tileElement) } // This is most likely to have peeps watch new rides - if (ride->excitement == kRideRatingUndefined) + if (ride->ratings.isNull()) { return true; } - if (ride->excitement >= RIDE_RATING(4, 70)) + if (ride->ratings.excitement >= RIDE_RATING(4, 70)) { return true; } - if (ride->intensity >= RIDE_RATING(4, 50)) + if (ride->ratings.intensity >= RIDE_RATING(4, 50)) { return true; } @@ -6323,7 +6332,7 @@ bool Loc690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElem return false; *rideToView = ride->id; - if (ride->excitement == kRideRatingUndefined) + if (ride->ratings.isNull()) { *rideSeatToView = 1; if (ride->status != RideStatus::Open) @@ -6821,7 +6830,8 @@ void Guest::UpdateSpriteType() WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; } - if (ClimateIsRaining() && (HasItem(ShopItem::Umbrella)) && x != LOCATION_NULL) + const bool isPrecipitating = ClimateIsRaining() || ClimateIsSnowingHeavily(); + if (isPrecipitating && (HasItem(ShopItem::Umbrella)) && x != LOCATION_NULL) { CoordsXY loc = { x, y }; if (MapIsLocationValid(loc.ToTileStart())) diff --git a/src/openrct2/entity/Guest.h b/src/openrct2/entity/Guest.h index 2a7ae3ce3e..17b6958551 100644 --- a/src/openrct2/entity/Guest.h +++ b/src/openrct2/entity/Guest.h @@ -414,15 +414,15 @@ private: void UpdateRideShopInteract(); void UpdateRideShopLeave(); void UpdateRidePrepareForExit(); - void Loc68F9F3(); - void Loc68FA89(); + void UpdateMotivesIdle(); + void UpdateConsumptionMotives(); int32_t CheckEasterEggName(int32_t index) const; void GivePassingPeepsPurpleClothes(Guest* passingPeep); void GivePassingPeepsPizza(Guest* passingPeep); void MakePassingPeepsSick(Guest* passingPeep); void GivePassingPeepsIceCream(Guest* passingPeep); Ride* FindBestRideToGoOn(); - OpenRCT2::BitSet FindRidesToGoOn(); + OpenRCT2::BitSet FindRidesToGoOn(); bool FindVehicleToEnter(const Ride& ride, std::vector& car_array); void GoToRideEntrance(const Ride& ride); }; diff --git a/src/openrct2/entity/MoneyEffect.cpp b/src/openrct2/entity/MoneyEffect.cpp index 151866762b..c216b791ab 100644 --- a/src/openrct2/entity/MoneyEffect.cpp +++ b/src/openrct2/entity/MoneyEffect.cpp @@ -22,6 +22,8 @@ #include "../world/Map.h" #include "EntityRegistry.h" +using namespace OpenRCT2; + static constexpr CoordsXY _moneyEffectMoveOffset[] = { { 1, -1 }, { 1, 1 }, @@ -179,7 +181,7 @@ void MoneyEffect::Paint(PaintSession& session, int32_t imageDirection) const return; } - if (GuestPurchase && !gConfigGeneral.ShowGuestPurchases) + if (GuestPurchase && !Config::Get().general.ShowGuestPurchases) { // Don't show the money effect for guest purchases when the option is disabled. return; diff --git a/src/openrct2/entity/MoneyEffect.h b/src/openrct2/entity/MoneyEffect.h index 5619596a5d..6cefb3628a 100644 --- a/src/openrct2/entity/MoneyEffect.h +++ b/src/openrct2/entity/MoneyEffect.h @@ -9,6 +9,7 @@ #pragma once +#include "../core/Money.hpp" #include "EntityBase.h" class DataSerialiser; diff --git a/src/openrct2/entity/Particle.cpp b/src/openrct2/entity/Particle.cpp index 7303f4e0c9..d83a05acff 100644 --- a/src/openrct2/entity/Particle.cpp +++ b/src/openrct2/entity/Particle.cpp @@ -19,7 +19,7 @@ #include // TODO: Create constants in sprites.h -static constexpr uint32_t _VehicleCrashParticleSprites[] = { +static constexpr uint32_t _VehicleCrashParticleSprites[kCrashedVehicleParticleNumberTypes] = { 22577, 22589, 22601, 22613, 22625, }; @@ -47,6 +47,27 @@ template<> bool EntityBase::Is() const { return Type == EntityType::CrashSplash; } + +void VehicleCrashParticle::SetSpriteData() +{ + SpriteData.Width = 8; + SpriteData.HeightMin = 8; + SpriteData.HeightMax = 8; +} + +void VehicleCrashParticle::Launch() +{ + frame = (ScenarioRand() & 0xFF) * kCrashedVehicleParticleNumberSprites; + time_to_live = (ScenarioRand() & 0x7F) + 140; + crashed_sprite_base = ScenarioRandMax(kCrashedVehicleParticleNumberTypes); + acceleration_x = (static_cast(ScenarioRand() & 0xFFFF)) * 4; + acceleration_y = (static_cast(ScenarioRand() & 0xFFFF)) * 4; + acceleration_z = (ScenarioRand() & 0xFFFF) * 4 + 0x10000; + velocity_x = 0; + velocity_y = 0; + velocity_z = 0; +} + /** * * rct2: 0x006735A1 @@ -56,22 +77,11 @@ void VehicleCrashParticle::Create(VehicleColour& colours, const CoordsXYZ& vehic VehicleCrashParticle* sprite = CreateEntity(); if (sprite != nullptr) { + sprite->MoveTo(vehiclePos); sprite->colour[0] = colours.Body; sprite->colour[1] = colours.Trim; - sprite->SpriteData.Width = 8; - sprite->SpriteData.HeightMin = 8; - sprite->SpriteData.HeightMax = 8; - sprite->MoveTo(vehiclePos); - - sprite->frame = (ScenarioRand() & 0xFF) * 12; - sprite->time_to_live = (ScenarioRand() & 0x7F) + 140; - sprite->crashed_sprite_base = ScenarioRandMax(static_cast(std::size(_VehicleCrashParticleSprites))); - sprite->acceleration_x = (static_cast(ScenarioRand() & 0xFFFF)) * 4; - sprite->acceleration_y = (static_cast(ScenarioRand() & 0xFFFF)) * 4; - sprite->acceleration_z = (ScenarioRand() & 0xFFFF) * 4 + 0x10000; - sprite->velocity_x = 0; - sprite->velocity_y = 0; - sprite->velocity_z = 0; + sprite->SetSpriteData(); + sprite->Launch(); } } @@ -129,8 +139,8 @@ void VehicleCrashParticle::Update() } MoveTo(newLoc); - frame += 85; - if (frame >= 3072) + frame += kCrashedVehicleParticleFrameIncrement; + if (frame >= (kCrashedVehicleParticleNumberSprites * kCrashedVehicleParticleFrameToSprite)) { frame = 0; } diff --git a/src/openrct2/entity/Particle.h b/src/openrct2/entity/Particle.h index 62b7340f18..6510831fb7 100644 --- a/src/openrct2/entity/Particle.h +++ b/src/openrct2/entity/Particle.h @@ -16,6 +16,11 @@ struct CoordsXYZ; struct PaintSession; struct VehicleColour; +constexpr int32_t kCrashedVehicleParticleFrameToSprite = 256; +constexpr int32_t kCrashedVehicleParticleNumberSprites = 12; +constexpr int32_t kCrashedVehicleParticleNumberTypes = 5; +constexpr int32_t kCrashedVehicleParticleFrameIncrement = 85; // 1/3 of 256, rounded up + struct VehicleCrashParticle : EntityBase { static constexpr auto cEntityType = EntityType::CrashedVehicleParticle; @@ -30,6 +35,8 @@ struct VehicleCrashParticle : EntityBase int32_t acceleration_y; int32_t acceleration_z; static void Create(VehicleColour& colours, const CoordsXYZ& vehiclePos); + void SetSpriteData(); + void Launch(); void Update(); void Serialise(DataSerialiser& stream); void Paint(PaintSession& session, int32_t imageDirection) const; diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 18bb860f1d..485117f623 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -344,9 +344,15 @@ void Peep::UpdateCurrentActionSpriteType() return; } - Invalidate(); ActionSpriteType = newActionSpriteType; + UpdateSpriteBoundingBox(); +} + +void Peep::UpdateSpriteBoundingBox() +{ + Invalidate(); + const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, ActionSpriteType); SpriteData.Width = spriteBounds->sprite_width; SpriteData.HeightMin = spriteBounds->sprite_height_negative; @@ -377,7 +383,7 @@ void Peep::StateReset() } /** rct2: 0x00981D7C, 0x00981D7E */ -static constexpr CoordsXY word_981D7C[4] = { +static constexpr CoordsXY walkingOffsetByDirection[kNumOrthogonalDirections] = { { -2, 0 }, { 0, 2 }, { 2, 0 }, @@ -422,18 +428,13 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) return UpdateWalkingAction(differenceLoc, xy_distance); } - const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, ActionSpriteType); - ActionFrame++; - - // If last frame of action - if (ActionFrame >= peepAnimation.frame_offsets.size()) + if (!UpdateActionAnimation()) { ActionSpriteImageOffset = 0; Action = PeepActionType::Walking; UpdateCurrentActionSpriteType(); return { { x, y } }; } - ActionSpriteImageOffset = peepAnimation.frame_offsets[ActionFrame]; // Should we throw up, and are we at the frame where sick appears? auto* guest = As(); @@ -445,6 +446,21 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) return { { x, y } }; } +bool Peep::UpdateActionAnimation() +{ + const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, ActionSpriteType); + ActionFrame++; + + // If last frame of action + if (ActionFrame >= peepAnimation.frame_offsets.size()) + { + return false; + } + + ActionSpriteImageOffset = peepAnimation.frame_offsets[ActionFrame]; + return true; +} + std::optional Peep::UpdateWalkingAction(const CoordsXY& differenceLoc, int16_t& xy_distance) { if (!IsActionWalking()) @@ -463,25 +479,33 @@ std::optional Peep::UpdateWalkingAction(const CoordsXY& differenceLoc, int32_t nextDirection = 0; if (x_delta < y_delta) { - nextDirection = 8; + nextDirection = 1; if (differenceLoc.y >= 0) { - nextDirection = 24; + nextDirection = 3; } } else { - nextDirection = 16; + nextDirection = 2; if (differenceLoc.x >= 0) { nextDirection = 0; } } - Orientation = nextDirection; - CoordsXY loc = { x, y }; - loc += word_981D7C[nextDirection / 8]; + Orientation = nextDirection * 8; + CoordsXY loc = { x, y }; + loc += walkingOffsetByDirection[nextDirection]; + + UpdateWalkingAnimation(); + + return loc; +} + +void Peep::UpdateWalkingAnimation() +{ WalkingFrameNum++; const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, ActionSpriteType); if (WalkingFrameNum >= peepAnimation.frame_offsets.size()) @@ -489,8 +513,6 @@ std::optional Peep::UpdateWalkingAction(const CoordsXY& differenceLoc, WalkingFrameNum = 0; } ActionSpriteImageOffset = peepAnimation.frame_offsets[WalkingFrameNum]; - - return loc; } void Peep::ThrowUp() @@ -734,7 +756,7 @@ void Peep::UpdateFalling() if (Action == PeepActionType::Drowning) return; - if (gConfigNotifications.GuestDied) + if (Config::Get().notifications.GuestDied) { auto ft = Formatter(); FormatNameTo(ft); @@ -949,6 +971,30 @@ static void GuestUpdateThoughts(Guest* peep) */ void Peep::Update() { + if (PeepFlags & PEEP_FLAGS_POSITION_FROZEN) + { + if (!(PeepFlags & PEEP_FLAGS_ANIMATION_FROZEN)) + { + // This is circumventing other logic, so only update every few ticks + if ((GetGameState().CurrentTicks & 3) == 0) + { + if (IsActionWalking()) + UpdateWalkingAnimation(); + else + UpdateActionAnimation(); + Invalidate(); + } + } + return; + } + else if (PeepFlags & PEEP_FLAGS_ANIMATION_FROZEN) + { + // Animation is frozen while position is not. This allows a peep to walk + // around without its sprite being updated, which looks very glitchy. + // We'll just remove the flag and continue as normal, in this case. + PeepFlags &= ~PEEP_FLAGS_ANIMATION_FROZEN; + } + auto* guest = As(); if (guest != nullptr) { @@ -1120,7 +1166,7 @@ void PeepProblemWarningsUpdate() else if (hungerCounter >= kPeepHungerWarningThreshold && hungerCounter >= gameState.NumGuestsInPark / 16) { warningThrottle[0] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Hungry); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_ARE_HUNGRY, thoughtId, {}); @@ -1132,7 +1178,7 @@ void PeepProblemWarningsUpdate() else if (thirstCounter >= kPeepThirstWarningThreshold && thirstCounter >= gameState.NumGuestsInPark / 16) { warningThrottle[1] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Thirsty); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_ARE_THIRSTY, thoughtId, {}); @@ -1144,7 +1190,7 @@ void PeepProblemWarningsUpdate() else if (toiletCounter >= kPeepToiletWarningThreshold && toiletCounter >= gameState.NumGuestsInPark / 16) { warningThrottle[2] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Toilet); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_CANT_FIND_TOILET, thoughtId, {}); @@ -1156,7 +1202,7 @@ void PeepProblemWarningsUpdate() else if (litterCounter >= kPeepLitterWarningThreshold && litterCounter >= gameState.NumGuestsInPark / 32) { warningThrottle[3] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::BadLitter); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_DISLIKE_LITTER, thoughtId, {}); @@ -1168,7 +1214,7 @@ void PeepProblemWarningsUpdate() else if (disgustCounter >= kPeepDisgustWarningThreshold && disgustCounter >= gameState.NumGuestsInPark / 32) { warningThrottle[4] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::PathDisgusting); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_DISGUSTED_BY_PATHS, thoughtId, {}); @@ -1180,7 +1226,7 @@ void PeepProblemWarningsUpdate() else if (vandalismCounter >= kPeepVandalismWarningThreshold && vandalismCounter >= gameState.NumGuestsInPark / 32) { warningThrottle[5] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Vandalism); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_DISLIKE_VANDALISM, thoughtId, {}); @@ -1192,7 +1238,7 @@ void PeepProblemWarningsUpdate() else if (noexitCounter >= kPeepNoExitWarningThreshold) { warningThrottle[6] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::CantFindExit); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_GETTING_LOST_OR_STUCK, thoughtId, {}); @@ -1201,7 +1247,7 @@ void PeepProblemWarningsUpdate() else if (lostCounter >= kPeepLostWarningThreshold) { warningThrottle[6] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Lost); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_GETTING_LOST_OR_STUCK, thoughtId, {}); @@ -1214,7 +1260,7 @@ void PeepProblemWarningsUpdate() { // The amount of guests complaining about queue duration is at least 5% of the amount of queuing guests. // This includes guests who are no longer queuing. warningThrottle[7] = 4; - if (gConfigNotifications.GuestWarnings) + if (Config::Get().notifications.GuestWarnings) { auto rideWithMostQueueComplaints = std::max_element( queueComplainingGuestsMap.begin(), queueComplainingGuestsMap.end(), @@ -1245,7 +1291,7 @@ void PeepUpdateCrowdNoise() if (OpenRCT2::Audio::gGameSoundsOff) return; - if (!gConfigSound.SoundEnabled) + if (!Config::Get().sound.SoundEnabled) return; if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) @@ -1785,7 +1831,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ auto ft = Formatter(); guest->FormatNameTo(ft); ride->FormatNameTo(ft); - if (gConfigNotifications.GuestQueuingForRide) + if (Config::Get().notifications.GuestQueuingForRide) { News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->Id, ft); } @@ -1846,7 +1892,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ { auto ft = Formatter(); guest->FormatNameTo(ft); - if (gConfigNotifications.GuestLeftPark) + if (Config::Get().notifications.GuestLeftPark) { News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_LEFT_PARK, guest->Id, ft); } @@ -2216,7 +2262,7 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) auto ft = Formatter(); guest->FormatNameTo(ft); ride->FormatNameTo(ft); - if (gConfigNotifications.GuestQueuingForRide) + if (Config::Get().notifications.GuestQueuingForRide) { News::AddItemToQueue( News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->Id, ft); @@ -2333,7 +2379,7 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) ride->FormatNameTo(ft); StringId string_id = ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IN_RIDE) ? STR_PEEP_TRACKING_PEEP_IS_IN_X : STR_PEEP_TRACKING_PEEP_IS_ON_X; - if (gConfigNotifications.GuestUsedFacility) + if (Config::Get().notifications.GuestUsedFacility) { News::AddItemToQueue(News::ItemType::PeepOnRide, string_id, guest->Id, ft); } @@ -2555,7 +2601,7 @@ StringId GetRealNameStringIDFromPeepID(uint32_t id) dx += 0x1000; } dx /= 4; - dx += REAL_NAME_START; + dx += kRealNameStart; return dx; } @@ -2813,7 +2859,14 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const // In the following 4 calls to PaintAddImageAsParent/PaintAddImageAsChild, we add 5 (instead of 3) to the // bound_box_offset_z to make sure peeps are drawn on top of railways - uint32_t baseImageId = (imageDirection >> 3) + GetPeepAnimation(SpriteType, actionSpriteType).base_image + imageOffset * 4; + uint32_t baseImageId = GetPeepAnimation(SpriteType, actionSpriteType).base_image; + + // Offset frame onto the base image, using rotation except for the 'picked up' state + if (actionSpriteType != PeepActionSpriteType::Ui) + baseImageId += (imageDirection >> 3) + imageOffset * 4; + else + baseImageId += imageOffset; + auto imageId = ImageId(baseImageId, TshirtColour, TrousersColour); auto bb = BoundBoxXYZ{ { 0, 0, z + 5 }, { 1, 1, 11 } }; diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 23e1eda2af..7aaa2ba79d 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -227,6 +227,8 @@ enum PeepFlags : uint32_t PEEP_FLAGS_INTAMIN_DEPRECATED = (1 << 27), // Used to make the peep think "I'm so excited - It's an Intamin ride!" while // riding on a Intamin ride. PEEP_FLAGS_HERE_WE_ARE = (1 << 28), // Makes the peep think "...and here we are on X!" while riding a ride + PEEP_FLAGS_POSITION_FROZEN = (1 << 29), // Prevents the peep from moving around, thus keeping them in place + PEEP_FLAGS_ANIMATION_FROZEN = (1 << 30), // Prevents the peep sprite from updating PEEP_FLAGS_TWITCH_DEPRECATED = (1u << 31), // Formerly used for twitch integration }; @@ -375,11 +377,14 @@ public: // Peep void Update(); std::optional UpdateAction(int16_t& xy_distance); std::optional UpdateAction(); + bool UpdateActionAnimation(); std::optional UpdateWalkingAction(const CoordsXY& differenceLoc, int16_t& xy_distance); + void UpdateWalkingAnimation(); void ThrowUp(); void SetState(PeepState new_state); void Remove(); void UpdateCurrentActionSpriteType(); + void UpdateSpriteBoundingBox(); void SwitchToSpecialSprite(uint8_t special_sprite_id); void StateReset(); [[nodiscard]] uint8_t GetNextDirection() const; diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index c1e58ba9f7..843654f770 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -15,7 +15,6 @@ #include "../Input.h" #include "../actions/StaffSetOrdersAction.h" #include "../audio/audio.h" -#include "../config/Config.h" #include "../core/DataSerialiser.h" #include "../entity/EntityRegistry.h" #include "../interface/Viewport.h" @@ -44,6 +43,7 @@ #include "../world/Footpath.h" #include "../world/Scenery.h" #include "../world/Surface.h" +#include "../world/tile_element/Slope.h" #include "PatrolArea.h" #include "Peep.h" @@ -413,7 +413,7 @@ uint8_t Staff::HandymanDirectionToUncutGrass(uint8_t valid_directions) const if (surfaceElement->GetSlope() != PathSlopeToLandSlope[GetNextDirection()]) return INVALID_DIRECTION; } - else if (surfaceElement->GetSlope() != TILE_ELEMENT_SLOPE_FLAT) + else if (surfaceElement->GetSlope() != kTileSlopeFlat) return INVALID_DIRECTION; } @@ -453,10 +453,10 @@ uint8_t Staff::HandymanDirectionToUncutGrass(uint8_t valid_directions) const */ Direction Staff::HandymanDirectionRandSurface(uint8_t validDirections) const { - Direction newDirection = ScenarioRand() % NumOrthogonalDirections; - for (int32_t i = 0; i < NumOrthogonalDirections; ++i, ++newDirection) + Direction newDirection = ScenarioRand() % kNumOrthogonalDirections; + for (int32_t i = 0; i < kNumOrthogonalDirections; ++i, ++newDirection) { - newDirection %= NumOrthogonalDirections; + newDirection %= kNumOrthogonalDirections; if (!(validDirections & (1 << newDirection))) continue; @@ -470,7 +470,7 @@ Direction Staff::HandymanDirectionRandSurface(uint8_t validDirections) const // If it tries all directions this is required // to make it back to the first direction and // override validDirections - newDirection %= NumOrthogonalDirections; + newDirection %= kNumOrthogonalDirections; return newDirection; } @@ -804,7 +804,7 @@ Direction Staff::DirectionPath(uint8_t validDirections, PathElement* pathElement } direction = ScenarioRand() & 3; - for (uint8_t i = 0; i < NumOrthogonalDirections; ++i, direction = DirectionNext(direction)) + for (uint8_t i = 0; i < kNumOrthogonalDirections; ++i, direction = DirectionNext(direction)) { if (pathDirections & (1 << direction)) return direction; @@ -947,18 +947,6 @@ bool Staff::DoPathFinding() } } -uint8_t Staff::GetCostume() const -{ - return EnumValue(SpriteType) - EnumValue(PeepSpriteType::EntertainerPanda); -} - -void Staff::SetCostume(uint8_t value) -{ - auto costume = static_cast(value); - SpriteType = EntertainerCostumeToSprite(costume); - UpdateAction(); -} - void Staff::SetHireDate(int32_t hireDate) { HireDate = hireDate; diff --git a/src/openrct2/entity/Staff.h b/src/openrct2/entity/Staff.h index e8cc7b4c62..871dafc993 100644 --- a/src/openrct2/entity/Staff.h +++ b/src/openrct2/entity/Staff.h @@ -51,8 +51,6 @@ public: bool IsLocationInPatrol(const CoordsXY& loc) const; bool IsLocationOnPatrolEdge(const CoordsXY& loc) const; bool DoPathFinding(); - uint8_t GetCostume() const; - void SetCostume(uint8_t value); void SetHireDate(int32_t hireDate); int32_t GetHireDate() const; diff --git a/src/openrct2/interface/Chat.cpp b/src/openrct2/interface/Chat.cpp index 88ec236bc8..4eb2bef613 100644 --- a/src/openrct2/interface/Chat.cpp +++ b/src/openrct2/interface/Chat.cpp @@ -13,6 +13,7 @@ #include "../audio/AudioMixer.h" #include "../audio/audio.h" #include "../drawing/Drawing.h" +#include "../drawing/Text.h" #include "../localisation/Formatter.h" #include "../localisation/Formatting.h" #include "../localisation/Localisation.h" @@ -84,7 +85,7 @@ void ChatUpdate() _chatCaretTicks = (_chatCaretTicks + 1) % 30; } -void ChatDraw(DrawPixelInfo& dpi, uint8_t chatBackgroundColor) +void ChatDraw(DrawPixelInfo& dpi, ColourWithFlags chatBackgroundColor) { thread_local std::string lineBuffer; @@ -287,7 +288,7 @@ static int32_t ChatHistoryDrawString(DrawPixelInfo& dpi, const char* text, const int32_t lineY = screenCoords.y; for (int32_t line = 0; line <= numLines; ++line) { - GfxDrawString(dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, bufferPtr, { TEXT_COLOUR_254 }); + DrawText(dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, { TEXT_COLOUR_254 }, bufferPtr); bufferPtr = GetStringEnd(bufferPtr) + 1; lineY += lineHeight; } diff --git a/src/openrct2/interface/Chat.h b/src/openrct2/interface/Chat.h index e55a8fbeed..9612acdbbe 100644 --- a/src/openrct2/interface/Chat.h +++ b/src/openrct2/interface/Chat.h @@ -11,6 +11,7 @@ #include "../common.h" #include "../core/String.hpp" +#include "Colour.h" #include @@ -38,7 +39,7 @@ void ChatToggle(); void ChatInit(); void ChatUpdate(); -void ChatDraw(DrawPixelInfo& dpi, uint8_t chatBackgroundColour); +void ChatDraw(DrawPixelInfo& dpi, ColourWithFlags chatBackgroundColour); void ChatAddHistory(std::string_view s); void ChatInput(ChatInput input); diff --git a/src/openrct2/interface/Colour.cpp b/src/openrct2/interface/Colour.cpp index 7829b74167..6a7ca15c42 100644 --- a/src/openrct2/interface/Colour.cpp +++ b/src/openrct2/interface/Colour.cpp @@ -12,11 +12,16 @@ #include "../core/EnumMap.hpp" #include "../drawing/Drawing.h" #include "../sprites.h" +#include "../util/Util.h" #include ColourShadeMap ColourMapA[COLOUR_COUNT] = {}; +static constexpr uint8_t kLegacyColourMaskBase = 0x1F; +static constexpr uint8_t kLegacyColourFlagOutline = (1 << 5); +static constexpr uint8_t kLegacyColourFlagInset = (1 << 6); + enum { INDEX_COLOUR_0 = 243, @@ -126,6 +131,15 @@ namespace Colour return (result != LookupTable.end()) ? result->second : defaultValue; } + u8string ToString(colour_t colour) + { + auto result = LookupTable.find(colour); + if (result != LookupTable.end()) + return u8string(result->first); + + return "black"; + } + } // namespace Colour #ifndef NO_TTF @@ -194,3 +208,44 @@ BlendColourMapType* GetBlendColourMap() return nullptr; } #endif + +bool ColourWithFlags::hasFlag(ColourFlag flag) const +{ + return flags & EnumToFlag(flag); +} + +void ColourWithFlags::setFlag(ColourFlag flag, bool on) +{ + if (on) + flags |= EnumToFlag(flag); + else + flags &= ~EnumToFlag(flag); +} + +ColourWithFlags ColourWithFlags::withFlag(ColourFlag flag, bool on) const +{ + struct ColourWithFlags result = *this; + result.setFlag(flag, on); + return result; +} + +ColourWithFlags ColourWithFlags::fromLegacy(uint8_t legacy) +{ + ColourWithFlags result{}; + result.colour = legacy & kLegacyColourMaskBase; + if (legacy & kLegacyColourFlagTranslucent) + result.flags |= EnumToFlag(ColourFlag::translucent); + if (legacy & kLegacyColourFlagInset) + result.flags |= EnumToFlag(ColourFlag::inset); + if (legacy & kLegacyColourFlagOutline) + result.flags |= EnumToFlag(ColourFlag::withOutline); + + return result; +} + +ColourWithFlags& ColourWithFlags::operator=(colour_t rhs) +{ + colour = rhs; + flags = 0; + return *this; +} diff --git a/src/openrct2/interface/Colour.h b/src/openrct2/interface/Colour.h index 7b4ce7adab..36eae268ed 100644 --- a/src/openrct2/interface/Colour.h +++ b/src/openrct2/interface/Colour.h @@ -10,6 +10,7 @@ #pragma once #include "../common.h" +#include "../core/String.hpp" #include @@ -209,34 +210,48 @@ constexpr uint8_t PALETTE_LENGTH_ANIMATED = 16; constexpr uint8_t COLOUR_NUM_ORIGINAL = 32; constexpr uint8_t COLOUR_NUM_NORMAL = 54; +static constexpr uint8_t kLegacyColourFlagTranslucent = (1 << 7); + #define TEXT_COLOUR_254 (254) #define TEXT_COLOUR_255 (255) -enum : colour_t +enum class ColourFlag : uint8_t { - COLOUR_FLAG_OUTLINE = (1 << 5), - COLOUR_FLAG_INSET = (1 << 6), // 64, 0x40 - COLOUR_FLAG_TRANSLUCENT = (1 << 7), + translucent, + inset, + withOutline, }; -#define TRANSLUCENT(x) ((x) | static_cast(COLOUR_FLAG_TRANSLUCENT)) -#define NOT_TRANSLUCENT(x) ((x) & ~static_cast(COLOUR_FLAG_TRANSLUCENT)) -#define BASE_COLOUR(x) ((x)&0x1F) +struct ColourWithFlags +{ + colour_t colour{}; + uint8_t flags{}; + + bool hasFlag(ColourFlag flag) const; + + void setFlag(ColourFlag flag, bool on); + + ColourWithFlags withFlag(ColourFlag flag, bool on) const; + + static ColourWithFlags fromLegacy(uint8_t legacy); + + ColourWithFlags& operator=(colour_t rhs); +}; struct ColourShadeMap { - uint8_t colour_0; - uint8_t colour_1; - uint8_t darkest; - uint8_t darker; - uint8_t dark; - uint8_t mid_dark; - uint8_t mid_light; - uint8_t light; - uint8_t lighter; - uint8_t lightest; - uint8_t colour_10; - uint8_t colour_11; + PaletteIndex colour_0; + PaletteIndex colour_1; + PaletteIndex darkest; + PaletteIndex darker; + PaletteIndex dark; + PaletteIndex mid_dark; + PaletteIndex mid_light; + PaletteIndex light; + PaletteIndex lighter; + PaletteIndex lightest; + PaletteIndex colour_10; + PaletteIndex colour_11; }; extern ColourShadeMap ColourMapA[COLOUR_COUNT]; @@ -246,7 +261,8 @@ void ColoursInitMaps(); namespace Colour { colour_t FromString(std::string_view s, colour_t defaultValue = COLOUR_BLACK); -} + u8string ToString(colour_t colour); +} // namespace Colour #ifndef NO_TTF uint8_t BlendColours(const uint8_t paletteIndex1, const uint8_t paletteIndex2); diff --git a/src/openrct2/interface/Fonts.cpp b/src/openrct2/interface/Fonts.cpp index d32fdff674..75d28c21f1 100644 --- a/src/openrct2/interface/Fonts.cpp +++ b/src/openrct2/interface/Fonts.cpp @@ -17,6 +17,7 @@ #include "../util/Util.h" #include "FontFamilies.h" +using namespace OpenRCT2; using namespace OpenRCT2::Localisation; #ifndef NO_TTF @@ -129,12 +130,15 @@ static bool LoadFont(LocalisationService& localisationService, TTFFontSetDescrip static bool LoadCustomConfigFont(LocalisationService& localisationService) { static TTFFontSetDescriptor TTFFontCustom = { { - { gConfigFonts.FileName.c_str(), gConfigFonts.FontName.c_str(), gConfigFonts.SizeTiny, gConfigFonts.OffsetX, - gConfigFonts.OffsetY, gConfigFonts.HeightTiny, gConfigFonts.HintingThreshold, nullptr }, - { gConfigFonts.FileName.c_str(), gConfigFonts.FontName.c_str(), gConfigFonts.SizeSmall, gConfigFonts.OffsetX, - gConfigFonts.OffsetY, gConfigFonts.HeightSmall, gConfigFonts.HintingThreshold, nullptr }, - { gConfigFonts.FileName.c_str(), gConfigFonts.FontName.c_str(), gConfigFonts.SizeMedium, gConfigFonts.OffsetX, - gConfigFonts.OffsetY, gConfigFonts.HeightMedium, gConfigFonts.HintingThreshold, nullptr }, + { Config::Get().fonts.FileName.c_str(), Config::Get().fonts.FontName.c_str(), Config::Get().fonts.SizeTiny, + Config::Get().fonts.OffsetX, Config::Get().fonts.OffsetY, Config::Get().fonts.HeightTiny, + Config::Get().fonts.HintingThreshold, nullptr }, + { Config::Get().fonts.FileName.c_str(), Config::Get().fonts.FontName.c_str(), Config::Get().fonts.SizeSmall, + Config::Get().fonts.OffsetX, Config::Get().fonts.OffsetY, Config::Get().fonts.HeightSmall, + Config::Get().fonts.HintingThreshold, nullptr }, + { Config::Get().fonts.FileName.c_str(), Config::Get().fonts.FontName.c_str(), Config::Get().fonts.SizeMedium, + Config::Get().fonts.OffsetX, Config::Get().fonts.OffsetY, Config::Get().fonts.HeightMedium, + Config::Get().fonts.HintingThreshold, nullptr }, } }; TTFDispose(); @@ -154,7 +158,7 @@ void TryLoadFonts(LocalisationService& localisationService) if (fontFamily != FAMILY_OPENRCT2_SPRITE) { - if (!gConfigFonts.FileName.empty()) + if (!Config::Get().fonts.FileName.empty()) { if (LoadCustomConfigFont(localisationService)) { diff --git a/src/openrct2/interface/Fonts.h b/src/openrct2/interface/Fonts.h index 509ddd35cd..44fe19631f 100644 --- a/src/openrct2/interface/Fonts.h +++ b/src/openrct2/interface/Fonts.h @@ -30,9 +30,6 @@ extern TTFFontSetDescriptor TTFFontNanum; extern TTFFontSetDescriptor TTFFontArial; extern TTFFontSetDescriptor TTFFontArialUnicode; extern TTFFontSetDescriptor TTFFontMicroHei; -# define FONT(x) x -#else -# define FONT(x) FONT_OPENRCT2_SPRITE #endif // NO_TTF void TryLoadFonts(OpenRCT2::Localisation::LocalisationService& localisationService); diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index 8783cc5e78..d8e8baf738 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -686,7 +686,7 @@ static int32_t ConsoleCommandGet(InteractiveConsole& console, const arguments_t& } else if (argv[0] == "console_small_font") { - console.WriteFormatLine("console_small_font %d", gConfigInterface.ConsoleSmallFont); + console.WriteFormatLine("console_small_font %d", Config::Get().interface.ConsoleSmallFont); } else if (argv[0] == "location") { @@ -703,19 +703,19 @@ static int32_t ConsoleCommandGet(InteractiveConsole& console, const arguments_t& } else if (argv[0] == "window_scale") { - console.WriteFormatLine("window_scale %.3f", gConfigGeneral.WindowScale); + console.WriteFormatLine("window_scale %.3f", Config::Get().general.WindowScale); } else if (argv[0] == "window_limit") { - console.WriteFormatLine("window_limit %d", gConfigGeneral.WindowLimit); + console.WriteFormatLine("window_limit %d", Config::Get().general.WindowLimit); } else if (argv[0] == "render_weather_effects") { - console.WriteFormatLine("render_weather_effects %d", gConfigGeneral.RenderWeatherEffects); + console.WriteFormatLine("render_weather_effects %d", Config::Get().general.RenderWeatherEffects); } else if (argv[0] == "render_weather_gloom") { - console.WriteFormatLine("render_weather_gloom %d", gConfigGeneral.RenderWeatherGloom); + console.WriteFormatLine("render_weather_gloom %d", Config::Get().general.RenderWeatherGloom); } else if (argv[0] == "cheat_sandbox_mode") { @@ -740,7 +740,7 @@ static int32_t ConsoleCommandGet(InteractiveConsole& console, const arguments_t& #ifndef NO_TTF else if (argv[0] == "enable_hinting") { - console.WriteFormatLine("enable_hinting %d", gConfigFonts.EnableHinting); + console.WriteFormatLine("enable_hinting %d", Config::Get().fonts.EnableHinting); } #endif else @@ -1065,8 +1065,8 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t& } else if (argv[0] == "console_small_font" && InvalidArguments(&invalidArgs, int_valid[0])) { - gConfigInterface.ConsoleSmallFont = (int_val[0] != 0); - ConfigSaveDefault(); + Config::Get().interface.ConsoleSmallFont = (int_val[0] != 0); + Config::Save(); console.Execute("get console_small_font"); } else if (argv[0] == "location" && InvalidArguments(&invalidArgs, int_valid[0] && int_valid[1])) @@ -1084,8 +1084,8 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t& else if (argv[0] == "window_scale" && InvalidArguments(&invalidArgs, double_valid[0])) { float newScale = static_cast(0.001 * std::trunc(1000 * double_val[0])); - gConfigGeneral.WindowScale = std::clamp(newScale, 0.5f, 5.0f); - ConfigSaveDefault(); + Config::Get().general.WindowScale = std::clamp(newScale, 0.5f, 5.0f); + Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); @@ -1098,14 +1098,14 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t& } else if (argv[0] == "render_weather_effects" && InvalidArguments(&invalidArgs, int_valid[0])) { - gConfigGeneral.RenderWeatherEffects = (int_val[0] != 0); - ConfigSaveDefault(); + Config::Get().general.RenderWeatherEffects = (int_val[0] != 0); + Config::Save(); console.Execute("get render_weather_effects"); } else if (argv[0] == "render_weather_gloom" && InvalidArguments(&invalidArgs, int_valid[0])) { - gConfigGeneral.RenderWeatherGloom = (int_val[0] != 0); - ConfigSaveDefault(); + Config::Get().general.RenderWeatherGloom = (int_val[0] != 0); + Config::Save(); console.Execute("get render_weather_gloom"); } else if (argv[0] == "cheat_sandbox_mode" && InvalidArguments(&invalidArgs, int_valid[0])) @@ -1187,8 +1187,8 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t& #ifndef NO_TTF else if (argv[0] == "enable_hinting" && InvalidArguments(&invalidArgs, int_valid[0])) { - gConfigFonts.EnableHinting = (int_val[0] != 0); - ConfigSaveDefault(); + Config::Get().fonts.EnableHinting = (int_val[0] != 0); + Config::Save(); console.Execute("get enable_hinting"); TTFToggleHinting(); } @@ -1433,7 +1433,7 @@ static int32_t ConsoleCommandShowLimits(InteractiveConsole& console, [[maybe_unu console.WriteFormatLine("Sprites: %d/%d", spriteCount, MAX_ENTITIES); console.WriteFormatLine("Map Elements: %zu/%d", tileElementCount, MAX_TILE_ELEMENTS); console.WriteFormatLine("Banners: %d/%zu", bannerCount, MAX_BANNERS); - console.WriteFormatLine("Rides: %d/%d", rideCount, OpenRCT2::Limits::MaxRidesInPark); + console.WriteFormatLine("Rides: %d/%d", rideCount, OpenRCT2::Limits::kMaxRidesInPark); console.WriteFormatLine("Images: %zu/%zu", ImageListGetUsedCount(), ImageListGetMaximum()); return 0; } diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index be4a36bb98..ab00e2df2d 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -16,6 +16,7 @@ #include "../PlatformEnvironment.h" #include "../actions/CheatSetAction.h" #include "../audio/audio.h" +#include "../config/Config.h" #include "../core/Console.hpp" #include "../core/File.h" #include "../core/Imaging.h" @@ -25,6 +26,7 @@ #include "../drawing/X8DrawingEngine.h" #include "../localisation/Formatter.h" #include "../localisation/Localisation.h" +#include "../paint/Painter.h" #include "../platform/Platform.h" #include "../util/Util.h" #include "../world/Climate.h" @@ -90,10 +92,17 @@ void ScreenshotCheck() if (!screenshotPath.empty()) { OpenRCT2::Audio::Play(OpenRCT2::Audio::SoundId::WindowOpen, 100, ContextGetWidth() / 2); + + // Show user that screenshot saved successfully + const auto filename = Path::GetFileName(screenshotPath); + Formatter ft; + ft.Add(STR_STRING); + ft.Add(filename.c_str()); + ContextShowError(STR_SCREENSHOT_SAVED_AS, STR_NONE, ft, true); } else { - ContextShowError(STR_SCREENSHOT_FAILED, STR_NONE, {}); + ContextShowError(STR_SCREENSHOT_FAILED, STR_NONE, {}, true); } // redraw_weather(); @@ -368,7 +377,7 @@ void ScreenshotGiant() { viewport.flags = vp->flags; } - if (gConfigGeneral.TransparentScreenshot) + if (Config::Get().general.TransparentScreenshot) { viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND; } @@ -383,12 +392,12 @@ void ScreenshotGiant() Formatter ft; ft.Add(STR_STRING); ft.Add(filename.c_str()); - ContextShowError(STR_SCREENSHOT_SAVED_AS, STR_NONE, ft); + ContextShowError(STR_SCREENSHOT_SAVED_AS, STR_NONE, ft, true); } catch (const std::exception& e) { LOG_ERROR("%s", e.what()); - ContextShowError(STR_SCREENSHOT_FAILED, STR_NONE, {}); + ContextShowError(STR_SCREENSHOT_FAILED, STR_NONE, {}, true); } ReleaseDPI(dpi); @@ -436,7 +445,7 @@ static void ApplyOptions(const ScreenshotOptions* options, Viewport& viewport) CheatsSet(CheatType::RemoveLitter); } - if (options->transparent || gConfigGeneral.TransparentScreenshot) + if (options->transparent || Config::Get().general.TransparentScreenshot) { viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND; } diff --git a/src/openrct2/interface/StdInOutConsole.cpp b/src/openrct2/interface/StdInOutConsole.cpp index 145870ad51..f5050348ad 100644 --- a/src/openrct2/interface/StdInOutConsole.cpp +++ b/src/openrct2/interface/StdInOutConsole.cpp @@ -11,6 +11,7 @@ #include "../Context.h" #include "../OpenRCT2.h" +#include "../config/ConfigTypes.h" #include "../platform/Platform.h" #include "../scripting/ScriptEngine.h" diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index 55026bd566..5d222b2975 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -196,7 +196,7 @@ void ViewportCreate(WindowBase* w, const ScreenCoordsXY& screenCoords, int32_t w viewport->flags = 0; viewport->rotation = GetCurrentRotation(); - if (gConfigGeneral.AlwaysShowGridlines) + if (Config::Get().general.AlwaysShowGridlines) viewport->flags |= VIEWPORT_FLAG_GRIDLINES; w->viewport = viewport; @@ -870,7 +870,7 @@ static void ViewportRotateSingleInternal(WindowBase& w, int32_t direction) CoordsXYZ coords{}; // other != viewport probably triggers on viewports in ride or guest window? - // naoXYCoords is nullopt if middle of viewport is obstructed by another window? + // mapXYCoords is nullopt if middle of viewport is obstructed by another window? if (!mapXYCoords.has_value() || other != viewport) { auto viewPos = ScreenCoordsXY{ (viewport->view_width >> 1), (viewport->view_height >> 1) } + viewport->viewPos; @@ -991,7 +991,7 @@ static void ViewportPaintColumn(PaintSession& session) PaintDrawStructs(session); - if (gConfigGeneral.RenderWeatherGloom && !gTrackDesignSaveMode && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_ENTITIES) + if (Config::Get().general.RenderWeatherGloom && !gTrackDesignSaveMode && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_ENTITIES) && !(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { ViewportPaintWeatherGloom(session.DPI); @@ -1055,7 +1055,7 @@ static void ViewportPaint(const Viewport* viewport, DrawPixelInfo& dpi, const Sc _paintColumns.clear(); - bool useMultithreading = gConfigGeneral.MultiThreading; + bool useMultithreading = Config::Get().general.MultiThreading; if (useMultithreading && _paintJobs == nullptr) { _paintJobs = std::make_unique(); @@ -1256,7 +1256,7 @@ void HideGridlines() WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - if (!gConfigGeneral.AlwaysShowGridlines) + if (!Config::Get().general.AlwaysShowGridlines) { mainWindow->viewport->flags &= ~VIEWPORT_FLAG_GRIDLINES; mainWindow->Invalidate(); @@ -1888,7 +1888,7 @@ InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32 ps = next_ps; if (IsSpriteInteractedWith(session->DPI, ps->image_id, ps->ScreenPos)) { - if (PSSpriteTypeIsInFilter(ps, filter) && GetPaintStructVisibility(ps, viewFlags) != VisibilityKind::Hidden) + if (PSSpriteTypeIsInFilter(ps, filter) && GetPaintStructVisibility(ps, viewFlags) == VisibilityKind::Visible) { info = { ps }; } @@ -1902,7 +1902,7 @@ InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32 { if (IsSpriteInteractedWith(session->DPI, attached_ps->image_id, ps->ScreenPos + attached_ps->RelativePos)) { - if (PSSpriteTypeIsInFilter(ps, filter) && GetPaintStructVisibility(ps, viewFlags) != VisibilityKind::Hidden) + if (PSSpriteTypeIsInFilter(ps, filter) && GetPaintStructVisibility(ps, viewFlags) == VisibilityKind::Visible) { info = { ps }; } @@ -2194,11 +2194,11 @@ uint8_t GetCurrentRotation() int32_t GetHeightMarkerOffset() { // Height labels in units - if (gConfigGeneral.ShowHeightAsUnits) + if (Config::Get().general.ShowHeightAsUnits) return 0; // Height labels in feet - if (gConfigGeneral.MeasurementFormat == MeasurementFormat::Imperial) + if (Config::Get().general.MeasurementFormat == MeasurementFormat::Imperial) return 1 * 256; // Height labels in metres diff --git a/src/openrct2/interface/Widget.h b/src/openrct2/interface/Widget.h index 2f387ee342..11d15c87c0 100644 --- a/src/openrct2/interface/Widget.h +++ b/src/openrct2/interface/Widget.h @@ -9,7 +9,11 @@ #pragma once -#include "Window.h" +#include + +struct WindowBase; + +using WidgetIndex = int16_t; enum class WindowWidgetType : uint8_t { @@ -34,11 +38,24 @@ enum class WindowWidgetType : uint8_t Scroll = 22, Checkbox = 23, Placeholder = 25, + ProgressBar = 29, Custom = 28, TextBox = 27, Last = 26, }; +constexpr uint8_t kCloseButtonWidth = 10; + +constexpr int32_t kScrollableRowHeight = 12; +constexpr uint8_t kListRowHeight = 12; +constexpr uint8_t kTableCellHeight = 12; +constexpr uint8_t kButtonFaceHeight = 12; +constexpr uint8_t kSpinnerHeight = 12; +constexpr uint8_t kDropdownHeight = 12; + +constexpr uint16_t kTextInputSize = 1024; +constexpr uint16_t kTopToolbarHeight = 27; + enum { SCROLL_HORIZONTAL = (1 << 0), diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index 45a7263ad8..cf5aa65f3f 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -47,7 +47,7 @@ WindowBase* gWindowAudioExclusive; WindowCloseModifier gLastCloseModifier = { { WindowClass::Null, 0 }, CloseWindowModifier::None }; uint32_t gWindowUpdateTicks; -colour_t gCurrentWindowColours[4]; +colour_t gCurrentWindowColours[3]; // converted from uint16_t values at 0x009A41EC - 0x009A4230 // these are percentage coordinates of the viewport to centre to, if a window is obscuring a location, the next is tried @@ -191,10 +191,10 @@ static void WindowCloseSurplus(int32_t cap, WindowClass avoid_classification) */ void WindowSetWindowLimit(int32_t value) { - int32_t prev = gConfigGeneral.WindowLimit; + int32_t prev = Config::Get().general.WindowLimit; int32_t val = std::clamp(value, kWindowLimitMin, kWindowLimitMax); - gConfigGeneral.WindowLimit = val; - ConfigSaveDefault(); + Config::Get().general.WindowLimit = val; + Config::Save(); // Checks if value decreases and then closes surplus // windows if one sets a limit lower than the number of windows open if (val < prev) @@ -966,7 +966,7 @@ void WindowZoomSet(WindowBase& w, ZoomLevel zoomLevel, bool atCursor) int32_t saved_map_y = 0; int32_t offset_x = 0; int32_t offset_y = 0; - if (gConfigGeneral.ZoomToCursor && atCursor) + if (Config::Get().general.ZoomToCursor && atCursor) { WindowViewportGetMapCoordsByCursor(w, &saved_map_x, &saved_map_y, &offset_x, &offset_y); } @@ -992,7 +992,7 @@ void WindowZoomSet(WindowBase& w, ZoomLevel zoomLevel, bool atCursor) } // Zooming to cursor? Centre around the tile we were hovering over just now. - if (gConfigGeneral.ZoomToCursor && atCursor) + if (Config::Get().general.ZoomToCursor && atCursor) { WindowViewportCentreTileAroundCursor(w, saved_map_x, saved_map_y, offset_x, offset_y); } @@ -1178,10 +1178,9 @@ static void WindowDrawSingle(DrawPixelInfo& dpi, WindowBase& w, int32_t left, in w.OnPrepareDraw(); // Text colouring - gCurrentWindowColours[0] = NOT_TRANSLUCENT(w.colours[0]); - gCurrentWindowColours[1] = NOT_TRANSLUCENT(w.colours[1]); - gCurrentWindowColours[2] = NOT_TRANSLUCENT(w.colours[2]); - gCurrentWindowColours[3] = NOT_TRANSLUCENT(w.colours[3]); + gCurrentWindowColours[0] = w.colours[0].colour; + gCurrentWindowColours[1] = w.colours[1].colour; + gCurrentWindowColours[2] = w.colours[2].colour; w.OnDraw(copy); } @@ -1402,6 +1401,14 @@ void WindowResizeGui(int32_t width, int32_t height) optionsWind->windowPos.x = width - 80; } + // Keep options window centred after a resize + WindowBase* optionsWindow = WindowFindByClass(WindowClass::Options); + if (optionsWindow != nullptr) + { + optionsWindow->windowPos.x = (ContextGetWidth() - optionsWindow->width) / 2; + optionsWindow->windowPos.y = (ContextGetHeight() - optionsWindow->height) / 2; + } + GfxInvalidateScreen(); } @@ -1846,14 +1853,14 @@ void WindowBase::ResizeFrame() // Title widgets[1].right = width - 2; // Close button - if (gConfigInterface.WindowButtonsOnTheLeft) + if (Config::Get().interface.WindowButtonsOnTheLeft) { widgets[2].left = 2; - widgets[2].right = 2 + CloseButtonWidth; + widgets[2].right = 2 + kCloseButtonWidth; } else { - widgets[2].left = width - 3 - CloseButtonWidth; + widgets[2].left = width - 3 - kCloseButtonWidth; widgets[2].right = width - 3; } } diff --git a/src/openrct2/interface/Window.h b/src/openrct2/interface/Window.h index 62d494f2a8..a14a524ee6 100644 --- a/src/openrct2/interface/Window.h +++ b/src/openrct2/interface/Window.h @@ -18,6 +18,8 @@ #include "../windows/TileInspectorGlobals.h" #include "../world/Location.hpp" #include "../world/ScenerySelection.h" +#include "Colour.h" +#include "Widget.h" #include "WindowClasses.h" #include "ZoomLevel.h" @@ -39,20 +41,7 @@ enum class CursorID : uint8_t; enum class RideConstructionState : uint8_t; enum class CloseWindowModifier : uint8_t; -constexpr uint8_t CloseButtonWidth = 10; - -#define SCROLLABLE_ROW_HEIGHT 12 -constexpr uint8_t kListRowHeight = 12; -constexpr uint8_t kTableCellHeight = 12; -constexpr uint8_t kButtonFaceHeight = 12; -constexpr uint8_t kSpinnerHeight = 12; -constexpr uint8_t kDropdownHeight = 12; - -constexpr uint16_t kTextInputSize = 1024; -constexpr uint16_t kTopToolbarHeight = 27; - using rct_windownumber = uint16_t; -using WidgetIndex = int16_t; struct WindowIdentifier { @@ -142,6 +131,12 @@ struct Widget bottom += amount; } + void moveTo(ScreenCoordsXY coords) + { + moveRight(coords.x - left); + moveDown(coords.y - top); + } + bool IsVisible() const { return !(flags & WIDGET_FLAGS::IS_HIDDEN); @@ -490,7 +485,7 @@ extern WindowBase* gWindowAudioExclusive; extern uint32_t gWindowUpdateTicks; -extern colour_t gCurrentWindowColours[4]; +extern colour_t gCurrentWindowColours[3]; extern bool gDisableErrorWindowSound; diff --git a/src/openrct2/interface/WindowClasses.h b/src/openrct2/interface/WindowClasses.h index c0bcdbed0d..30f4e81f1e 100644 --- a/src/openrct2/interface/WindowClasses.h +++ b/src/openrct2/interface/WindowClasses.h @@ -88,6 +88,7 @@ enum class WindowClass : uint8_t Transparency = 134, AssetPacks = 135, ResetShortcutKeysPrompt = 136, + ProgressWindow = 137, // Only used for colour schemes Staff = 220, diff --git a/src/openrct2/interface/Window_internal.h b/src/openrct2/interface/Window_internal.h index fd2a3b8cd0..c7770bbe29 100644 --- a/src/openrct2/interface/Window_internal.h +++ b/src/openrct2/interface/Window_internal.h @@ -9,6 +9,7 @@ #pragma once +#include "Colour.h" #include "Window.h" #include @@ -65,7 +66,7 @@ struct WindowBase EntityId viewport_target_sprite{ EntityId::GetNull() }; ScreenCoordsXY savedViewPos{}; WindowClass classification{}; - colour_t colours[6]{}; + ColourWithFlags colours[6]{}; VisibilityCache visibility{}; EntityId viewport_smart_follow_sprite{ EntityId::GetNull() }; // Handles setting viewport target sprite etc diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index b3184b2c57..d35b0a480b 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -176,6 +176,7 @@ + @@ -198,6 +199,7 @@ + @@ -210,6 +212,7 @@ + @@ -217,6 +220,7 @@ + @@ -278,6 +282,7 @@ + @@ -363,6 +368,10 @@ + + + + @@ -383,6 +392,7 @@ + @@ -393,6 +403,7 @@ + @@ -461,6 +472,7 @@ + @@ -511,8 +523,9 @@ - + + @@ -529,6 +542,7 @@ + @@ -578,6 +592,7 @@ + @@ -873,6 +888,7 @@ + @@ -892,6 +908,7 @@ + @@ -909,7 +926,6 @@ - @@ -1003,6 +1019,7 @@ + @@ -1018,6 +1035,7 @@ + diff --git a/src/openrct2/localisation/Currency.cpp b/src/openrct2/localisation/Currency.cpp index 88d0560d9b..9c0917ee3e 100644 --- a/src/openrct2/localisation/Currency.cpp +++ b/src/openrct2/localisation/Currency.cpp @@ -13,6 +13,8 @@ #include "../util/Util.h" #include "StringIds.h" +using namespace OpenRCT2; + // clang-format off CurrencyDescriptor CurrencyDescriptors[EnumValue(CurrencyType::Count)] = { { "GBP", 10, CurrencyAffix::Prefix, u8"£", CurrencyAffix::Suffix, "GBP", STR_POUNDS }, // British Pound @@ -38,12 +40,12 @@ CurrencyDescriptor CurrencyDescriptors[EnumValue(CurrencyType::Count)] = { void CurrencyLoadCustomCurrencyConfig() { - CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = gConfigGeneral.CustomCurrencyRate; - CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = gConfigGeneral.CustomCurrencyAffix; - if (!gConfigGeneral.CustomCurrencySymbol.empty()) + CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = Config::Get().general.CustomCurrencyRate; + CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = Config::Get().general.CustomCurrencyAffix; + if (!Config::Get().general.CustomCurrencySymbol.empty()) { SafeStrCpy( - CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, gConfigGeneral.CustomCurrencySymbol.c_str(), - CURRENCY_SYMBOL_MAX_SIZE); + CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, + Config::Get().general.CustomCurrencySymbol.c_str(), kCurrencySymbolMaxSize); } } diff --git a/src/openrct2/localisation/Currency.h b/src/openrct2/localisation/Currency.h index 7ad966e0c9..2fc85d30c7 100644 --- a/src/openrct2/localisation/Currency.h +++ b/src/openrct2/localisation/Currency.h @@ -12,41 +12,10 @@ #include "../common.h" #include "../core/String.hpp" #include "../util/Util.h" +#include "CurrencyTypes.h" -// List of currencies -enum class CurrencyType : uint8_t -{ - Pounds, // British Pound - Dollars, // US Dollar - Franc, // French Franc - DeutscheMark, // Deutsche Mark - Yen, // Japanese Yen - Peseta, // Spanish Peseta - Lira, // Italian Lira - Guilders, // Dutch Gilder - Krona, // Swedish Krona - Euros, // Euro - Won, // South Korean Won - Rouble, // Russian Rouble - CzechKoruna, // Czech koruna - HKD, // Hong Kong Dollar - TWD, // New Taiwan Dollar - Yuan, // Chinese Yuan - Forint, // Hungarian Forint - - Custom, // Custom currency - - Count // Last item -}; - -enum class CurrencyAffix -{ - Prefix, - Suffix -}; - -#define CURRENCY_SYMBOL_MAX_SIZE 8 -#define CURRENCY_RATE_MAX_NUM_DIGITS 9 +constexpr size_t kCurrencySymbolMaxSize = 8; +constexpr size_t kCurrencyRateMaxNumDigits = 9; // Currency format specification - inspired by OpenTTD struct CurrencyDescriptor @@ -55,13 +24,14 @@ struct CurrencyDescriptor // Rate is relative to 0.10 GBP int32_t rate; CurrencyAffix affix_unicode; - utf8 symbol_unicode[CURRENCY_SYMBOL_MAX_SIZE]; + utf8 symbol_unicode[kCurrencySymbolMaxSize]; CurrencyAffix affix_ascii; - char symbol_ascii[CURRENCY_SYMBOL_MAX_SIZE]; + char symbol_ascii[kCurrencySymbolMaxSize]; StringId stringId; }; // List of currency formats +// TODO: refactor into getter extern CurrencyDescriptor CurrencyDescriptors[EnumValue(CurrencyType::Count)]; /** diff --git a/src/openrct2/localisation/CurrencyTypes.h b/src/openrct2/localisation/CurrencyTypes.h new file mode 100644 index 0000000000..5c1a6ee976 --- /dev/null +++ b/src/openrct2/localisation/CurrencyTypes.h @@ -0,0 +1,44 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +// List of currencies +enum class CurrencyType : uint8_t +{ + Pounds, // British Pound + Dollars, // US Dollar + Franc, // French Franc + DeutscheMark, // Deutsche Mark + Yen, // Japanese Yen + Peseta, // Spanish Peseta + Lira, // Italian Lira + Guilders, // Dutch Gilder + Krona, // Swedish Krona + Euros, // Euro + Won, // South Korean Won + Rouble, // Russian Rouble + CzechKoruna, // Czech koruna + HKD, // Hong Kong Dollar + TWD, // New Taiwan Dollar + Yuan, // Chinese Yuan + Forint, // Hungarian Forint + + Custom, // Custom currency + + Count // Last item +}; + +enum class CurrencyAffix +{ + Prefix, + Suffix +}; diff --git a/src/openrct2/localisation/Formatter.h b/src/openrct2/localisation/Formatter.h index 632b557114..075dce1f32 100644 --- a/src/openrct2/localisation/Formatter.h +++ b/src/openrct2/localisation/Formatter.h @@ -12,6 +12,7 @@ #include "../Identifiers.h" #include "../common.h" #include "../core/Guard.hpp" +#include "../core/Money.hpp" #include "../core/String.hpp" #include diff --git a/src/openrct2/localisation/Formatting.cpp b/src/openrct2/localisation/Formatting.cpp index 42d7b3faa1..cedf288bf4 100644 --- a/src/openrct2/localisation/Formatting.cpp +++ b/src/openrct2/localisation/Formatting.cpp @@ -11,6 +11,9 @@ #include "../config/Config.h" #include "../util/Util.h" +#include "Currency.h" +#include "Date.h" +#include "FormatCodes.h" #include "Formatter.h" #include "Localisation.h" #include "StringIds.h" @@ -284,7 +287,7 @@ namespace OpenRCT2 { if (IsRealNameStringId(id)) { - auto realNameIndex = id - REAL_NAME_START; + auto realNameIndex = id - kRealNameStart; ss << real_names[realNameIndex % std::size(real_names)]; ss << ' '; ss << real_name_initials[(realNameIndex >> 10) % std::size(real_name_initials)]; @@ -292,14 +295,17 @@ namespace OpenRCT2 } } - template static void AppendSeparator(char (&buffer)[TSize], TIndex& i, std::string_view sep) + template + static void AppendSeparatorReversed(char (&buffer)[TSize], TIndex& i, std::string_view sep) { - if (i < TSize) + if (i + sep.size() >= TSize) + return; + + utf8 sepBuffer[32]; + std::memcpy(&sepBuffer[0], sep.data(), sep.size()); + for (int32_t j = static_cast(sep.size()) - 1; j >= 0; j--) { - auto remainingLen = TSize - i; - auto cpyLen = std::min(sep.size(), remainingLen); - std::memcpy(&buffer[i], sep.data(), cpyLen); - i += static_cast(cpyLen); + buffer[i++] = sepBuffer[j]; } } @@ -350,7 +356,7 @@ namespace OpenRCT2 } auto decSep = GetDecimalSeparator(); - AppendSeparator(buffer, i, decSep); + AppendSeparatorReversed(buffer, i, decSep); } // Whole digits @@ -363,7 +369,7 @@ namespace OpenRCT2 if (groupLen >= 3) { groupLen = 0; - AppendSeparator(buffer, i, digitSep); + AppendSeparatorReversed(buffer, i, digitSep); } } buffer[i++] = static_cast('0' + (num % 10)); @@ -383,7 +389,7 @@ namespace OpenRCT2 template void FormatCurrency(FormatBuffer& ss, T rawValue) { - auto currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; + auto currencyDesc = &CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)]; auto value = static_cast(rawValue) * currencyDesc->rate; // Negative sign @@ -533,7 +539,7 @@ namespace OpenRCT2 case FormatToken::Velocity: if constexpr (std::is_integral()) { - switch (gConfigGeneral.MeasurementFormat) + switch (Config::Get().general.MeasurementFormat) { default: case MeasurementFormat::Imperial: @@ -563,7 +569,7 @@ namespace OpenRCT2 case FormatToken::Length: if constexpr (std::is_integral()) { - switch (gConfigGeneral.MeasurementFormat) + switch (Config::Get().general.MeasurementFormat) { default: case MeasurementFormat::Imperial: @@ -624,7 +630,7 @@ namespace OpenRCT2 bool IsRealNameStringId(StringId id) { - return id >= REAL_NAME_START && id <= REAL_NAME_END; + return id >= kRealNameStart && id <= kRealNameEnd; } FmtString GetFmtStringById(StringId id) diff --git a/src/openrct2/localisation/Language.h b/src/openrct2/localisation/Language.h index c5f406f3f7..1dff93dc8a 100644 --- a/src/openrct2/localisation/Language.h +++ b/src/openrct2/localisation/Language.h @@ -11,6 +11,7 @@ #include "../common.h" #include "../drawing/Font.h" +#include "../interface/FontFamilies.h" #include #include @@ -68,10 +69,6 @@ enum class RCT2LanguageId End = 255 }; -#define FONT_OPENRCT2_SPRITE NULL - -#include "../interface/FontFamilies.h" - struct LanguageDescriptor { const char* locale; diff --git a/src/openrct2/localisation/LanguagePack.cpp b/src/openrct2/localisation/LanguagePack.cpp index 703dafb078..ee35870610 100644 --- a/src/openrct2/localisation/LanguagePack.cpp +++ b/src/openrct2/localisation/LanguagePack.cpp @@ -20,6 +20,7 @@ #include "Language.h" #include "Localisation.h" #include "LocalisationService.h" +#include "StringIds.h" #include #include diff --git a/src/openrct2/localisation/Localisation.cpp b/src/openrct2/localisation/Localisation.cpp index 367c4a5682..8f0fc19af5 100644 --- a/src/openrct2/localisation/Localisation.cpp +++ b/src/openrct2/localisation/Localisation.cpp @@ -7,34 +7,24 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifdef _WIN32 -# include -#elif defined(__ANDROID__) -# include -# include - -#else -# include -# include -#endif // _WIN32 +#include "Localisation.h" #include "../Game.h" #include "../common.h" #include "../config/Config.h" #include "../core/Guard.hpp" #include "../core/String.hpp" -#include "../management/Marketing.h" #include "../ride/Ride.h" #include "../util/Util.h" +#include "Currency.h" #include "Date.h" +#include "FormatCodes.h" #include "Formatting.h" -#include "Localisation.h" +#include "StringIds.h" -#include #include -#include -#include -#include + +using namespace OpenRCT2; thread_local char gCommonStringFormatBuffer[CommonTextBufferSize]; @@ -360,7 +350,7 @@ void FormatReadableSpeed(char* buf, size_t bufSize, uint64_t sizeBytes) money64 StringToMoney(const char* string_to_monetise) { const char* decimal_char = LanguageGetString(STR_LOCALE_DECIMAL_POINT); - const CurrencyDescriptor* currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; + const CurrencyDescriptor* currencyDesc = &CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)]; char processedString[128] = {}; Guard::Assert(strlen(string_to_monetise) < sizeof(processedString)); @@ -450,7 +440,7 @@ void MoneyToString(money64 amount, char* buffer_to_put_value_to, size_t buffer_l return; } - const CurrencyDescriptor& currencyDesc = CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; + const CurrencyDescriptor& currencyDesc = CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)]; const char* sign = amount >= 0 ? "" : "-"; const uint64_t a = std::abs(amount) * currencyDesc.rate; diff --git a/src/openrct2/localisation/Localisation.h b/src/openrct2/localisation/Localisation.h index fe9da9f781..12c863b897 100644 --- a/src/openrct2/localisation/Localisation.h +++ b/src/openrct2/localisation/Localisation.h @@ -10,11 +10,6 @@ #pragma once #include "../management/Marketing.h" -#include "Currency.h" -#include "Date.h" -#include "FormatCodes.h" -#include "Language.h" -#include "StringIds.h" #include @@ -35,16 +30,14 @@ utf8* GetStringEnd(const utf8* text); size_t GetStringSize(const utf8* text); // The maximum number of characters allowed for string/money conversions (anything above will risk integer overflow issues) -#define MONEY_STRING_MAXLENGTH 14 +constexpr size_t kMoneyStringMaxlength = 14; money64 StringToMoney(const char* string_to_monetise); void MoneyToString(money64 amount, char* buffer_to_put_value_to, size_t buffer_len, bool forceDecimals); -#define MAX_USER_STRINGS 1024 -#define USER_STRING_MAX_LENGTH 32 +constexpr size_t kUserStringMaxLength = 32; -#define USER_STRING_END 0x8FFF -#define REAL_NAME_START 0xA000 -#define REAL_NAME_END 0xDFFF +constexpr uint16_t kRealNameStart = 0xA000; +constexpr uint16_t kRealNameEnd = 0xDFFF; constexpr size_t CommonTextBufferSize = 512; diff --git a/src/openrct2/paint/support/Generic.h b/src/openrct2/localisation/StringIdType.h similarity index 78% rename from src/openrct2/paint/support/Generic.h rename to src/openrct2/localisation/StringIdType.h index ef1426e49c..1537f842a3 100644 --- a/src/openrct2/paint/support/Generic.h +++ b/src/openrct2/localisation/StringIdType.h @@ -9,7 +9,9 @@ #pragma once -enum -{ - SUPPORTS_SLOPE_5 = 1 << 5 -}; +#include + +using StringId = uint16_t; + +constexpr StringId STR_NONE = 0xFFFF; +constexpr StringId STR_EMPTY = 0; diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 9cb6ed8e8a..178b0d76fe 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -11,203 +11,9 @@ #include "../common.h" -constexpr StringId STR_NONE = 0xFFFF; -constexpr StringId STR_VIEWPORT = 0xFFFE; - -enum : uint16_t +enum : StringId { - STR_EMPTY = 0, STR_RIDE_NAME_DEFAULT = 1, - STR_RIDE_NAME_SPIRAL_ROLLER_COASTER = 2, - STR_RIDE_NAME_STAND_UP_ROLLER_COASTER = 3, - STR_RIDE_NAME_SUSPENDED_SWINGING_COASTER = 4, - STR_RIDE_NAME_INVERTED_ROLLER_COASTER = 5, - STR_RIDE_NAME_JUNIOR_ROLLER_COASTER = 6, - STR_RIDE_NAME_MINIATURE_RAILWAY = 7, - STR_RIDE_NAME_MONORAIL = 8, - STR_RIDE_NAME_MINI_SUSPENDED_COASTER = 9, - STR_RIDE_NAME_BOAT_HIRE = 10, - STR_RIDE_NAME_WOODEN_WILD_MOUSE = 11, - STR_RIDE_NAME_STEEPLECHASE = 12, - STR_RIDE_NAME_CAR_RIDE = 13, - STR_RIDE_NAME_LAUNCHED_FREEFALL = 14, - STR_RIDE_NAME_BOBSLEIGH_COASTER = 15, - STR_RIDE_NAME_OBSERVATION_TOWER = 16, - STR_RIDE_NAME_LOOPING_ROLLER_COASTER = 17, - STR_RIDE_NAME_DINGHY_SLIDE = 18, - STR_RIDE_NAME_MINE_TRAIN_COASTER = 19, - STR_RIDE_NAME_CHAIRLIFT = 20, - STR_RIDE_NAME_CORKSCREW_ROLLER_COASTER = 21, - STR_RIDE_NAME_MAZE = 22, - STR_RIDE_NAME_SPIRAL_SLIDE = 23, - STR_RIDE_NAME_GO_KARTS = 24, - STR_RIDE_NAME_LOG_FLUME = 25, - STR_RIDE_NAME_RIVER_RAPIDS = 26, - STR_RIDE_NAME_DODGEMS = 27, - STR_RIDE_NAME_SWINGING_SHIP = 28, - STR_RIDE_NAME_SWINGING_INVERTER_SHIP = 29, - STR_RIDE_NAME_FOOD_STALL = 30, - STR_RIDE_NAME_1D = 31, - STR_RIDE_NAME_DRINK_STALL = 32, - STR_RIDE_NAME_1F = 33, - STR_RIDE_NAME_SHOP = 34, - STR_RIDE_NAME_MERRY_GO_ROUND = 35, - STR_RIDE_NAME_22 = 36, - STR_RIDE_NAME_INFORMATION_KIOSK = 37, - STR_RIDE_NAME_TOILETS = 38, - STR_RIDE_NAME_FERRIS_WHEEL = 39, - STR_RIDE_NAME_MOTION_SIMULATOR = 40, - STR_RIDE_NAME_3D_CINEMA = 41, - STR_RIDE_NAME_TOP_SPIN = 42, - STR_RIDE_NAME_SPACE_RINGS = 43, - STR_RIDE_NAME_REVERSE_FREEFALL_COASTER = 44, - STR_RIDE_NAME_LIFT = 45, - STR_RIDE_NAME_VERTICAL_DROP_ROLLER_COASTER = 46, - STR_RIDE_NAME_CASH_MACHINE = 47, - STR_RIDE_NAME_TWIST = 48, - STR_RIDE_NAME_HAUNTED_HOUSE = 49, - STR_RIDE_NAME_FIRST_AID = 50, - STR_RIDE_NAME_CIRCUS = 51, - STR_RIDE_NAME_GHOST_TRAIN = 52, - STR_RIDE_NAME_TWISTER_ROLLER_COASTER = 53, - STR_RIDE_NAME_WOODEN_ROLLER_COASTER = 54, - STR_RIDE_NAME_SIDE_FRICTION_ROLLER_COASTER = 55, - STR_RIDE_NAME_WILD_MOUSE = 56, - STR_RIDE_NAME_MULTI_DIMENSION_ROLLER_COASTER = 57, - STR_RIDE_NAME_38 = 58, - STR_RIDE_NAME_FLYING_ROLLER_COASTER = 59, - STR_RIDE_NAME_3A = 60, - STR_RIDE_NAME_VIRGINIA_REEL = 61, - STR_RIDE_NAME_SPLASH_BOATS = 62, - STR_RIDE_NAME_MINI_HELICOPTERS = 63, - STR_RIDE_NAME_LAY_DOWN_ROLLER_COASTER = 64, - STR_RIDE_NAME_SUSPENDED_MONORAIL = 65, - STR_RIDE_NAME_40 = 66, - STR_RIDE_NAME_REVERSER_ROLLER_COASTER = 67, - STR_RIDE_NAME_HEARTLINE_TWISTER_COASTER = 68, - STR_RIDE_NAME_MINI_GOLF = 69, - STR_RIDE_NAME_GIGA_COASTER = 70, - STR_RIDE_NAME_ROTO_DROP = 71, - STR_RIDE_NAME_FLYING_SAUCERS = 72, - STR_RIDE_NAME_CROOKED_HOUSE = 73, - STR_RIDE_NAME_MONORAIL_CYCLES = 74, - STR_RIDE_NAME_COMPACT_INVERTED_COASTER = 75, - STR_RIDE_NAME_WATER_COASTER = 76, - STR_RIDE_NAME_AIR_POWERED_VERTICAL_COASTER = 77, - STR_RIDE_NAME_INVERTED_HAIRPIN_COASTER = 78, - STR_RIDE_NAME_MAGIC_CARPET = 79, - STR_RIDE_NAME_SUBMARINE_RIDE = 80, - STR_RIDE_NAME_RIVER_RAFTS = 81, - STR_RIDE_NAME_50 = 82, - STR_RIDE_NAME_ENTERPRISE = 83, - STR_RIDE_NAME_52 = 84, - STR_RIDE_NAME_53 = 85, - STR_RIDE_NAME_54 = 86, - STR_RIDE_NAME_55 = 87, - STR_RIDE_NAME_INVERTED_IMPULSE_COASTER = 88, - STR_RIDE_NAME_MINI_ROLLER_COASTER = 89, - STR_RIDE_NAME_MINE_RIDE = 90, - STR_RIDE_NAME_59 = 91, - STR_RIDE_NAME_LIM_LAUNCHED_ROLLER_COASTER = 92, - STR_RIDE_NAME_HYBRID_COASTER = 93, - STR_RIDE_NAME_SINGLE_RAIL_ROLLER_COASTER = 94, - STR_RIDE_NAME_ALPINE_COASTER = 95, - STR_RIDE_NAME_CLASSIC_WOODEN_ROLLER_COASTER = 96, - STR_RIDE_NAME_CLASSIC_STAND_UP_ROLLER_COASTER = 97, - - STR_RIDE_DESCRIPTION_SPIRAL_ROLLER_COASTER = 512, - STR_RIDE_DESCRIPTION_STAND_UP_ROLLER_COASTER = 513, - STR_RIDE_DESCRIPTION_SUSPENDED_SWINGING_COASTER = 514, - STR_RIDE_DESCRIPTION_INVERTED_ROLLER_COASTER = 515, - STR_RIDE_DESCRIPTION_JUNIOR_ROLLER_COASTER = 516, - STR_RIDE_DESCRIPTION_MINIATURE_RAILWAY = 517, - STR_RIDE_DESCRIPTION_MONORAIL = 518, - STR_RIDE_DESCRIPTION_MINI_SUSPENDED_COASTER = 519, - STR_RIDE_DESCRIPTION_BOAT_HIRE = 520, - STR_RIDE_DESCRIPTION_WOODEN_WILD_MOUSE = 521, - STR_RIDE_DESCRIPTION_STEEPLECHASE = 522, - STR_RIDE_DESCRIPTION_CAR_RIDE = 523, - STR_RIDE_DESCRIPTION_LAUNCHED_FREEFALL = 524, - STR_RIDE_DESCRIPTION_BOBSLEIGH_COASTER = 525, - STR_RIDE_DESCRIPTION_OBSERVATION_TOWER = 526, - STR_RIDE_DESCRIPTION_LOOPING_ROLLER_COASTER = 527, - STR_RIDE_DESCRIPTION_DINGHY_SLIDE = 528, - STR_RIDE_DESCRIPTION_MINE_TRAIN_COASTER = 529, - STR_RIDE_DESCRIPTION_CHAIRLIFT = 530, - STR_RIDE_DESCRIPTION_CORKSCREW_ROLLER_COASTER = 531, - STR_RIDE_DESCRIPTION_MAZE = 532, - STR_RIDE_DESCRIPTION_SPIRAL_SLIDE = 533, - STR_RIDE_DESCRIPTION_GO_KARTS = 534, - STR_RIDE_DESCRIPTION_LOG_FLUME = 535, - STR_RIDE_DESCRIPTION_RIVER_RAPIDS = 536, - STR_RIDE_DESCRIPTION_DODGEMS = 537, - STR_RIDE_DESCRIPTION_SWINGING_SHIP = 538, - STR_RIDE_DESCRIPTION_SWINGING_INVERTER_SHIP = 539, - STR_RIDE_DESCRIPTION_FOOD_STALL = 540, - - STR_RIDE_DESCRIPTION_DRINK_STALL = 542, - - STR_RIDE_DESCRIPTION_SHOP = 544, - STR_RIDE_DESCRIPTION_MERRY_GO_ROUND = 545, - - STR_RIDE_DESCRIPTION_INFORMATION_KIOSK = 547, - STR_RIDE_DESCRIPTION_TOILETS = 548, - STR_RIDE_DESCRIPTION_FERRIS_WHEEL = 549, - STR_RIDE_DESCRIPTION_MOTION_SIMULATOR = 550, - STR_RIDE_DESCRIPTION_3D_CINEMA = 551, - STR_RIDE_DESCRIPTION_TOP_SPIN = 552, - STR_RIDE_DESCRIPTION_SPACE_RINGS = 553, - STR_RIDE_DESCRIPTION_REVERSE_FREEFALL_COASTER = 554, - STR_RIDE_DESCRIPTION_LIFT = 555, - STR_RIDE_DESCRIPTION_VERTICAL_DROP_ROLLER_COASTER = 556, - STR_RIDE_DESCRIPTION_CASH_MACHINE = 557, - STR_RIDE_DESCRIPTION_TWIST = 558, - STR_RIDE_DESCRIPTION_HAUNTED_HOUSE = 559, - STR_RIDE_DESCRIPTION_FIRST_AID = 560, - STR_RIDE_DESCRIPTION_CIRCUS = 561, - STR_RIDE_DESCRIPTION_GHOST_TRAIN = 562, - STR_RIDE_DESCRIPTION_HYPER_TWISTER = 563, - STR_RIDE_DESCRIPTION_WOODEN_ROLLER_COASTER = 564, - STR_RIDE_DESCRIPTION_SIDE_FRICTION_ROLLER_COASTER = 565, - STR_RIDE_DESCRIPTION_WILD_MOUSE = 566, - STR_RIDE_DESCRIPTION_MULTI_DIMENSION_ROLLER_COASTER = 567, - - STR_RIDE_DESCRIPTION_FLYING_ROLLER_COASTER = 569, - - STR_RIDE_DESCRIPTION_VIRGINIA_REEL = 571, - STR_RIDE_DESCRIPTION_SPLASH_BOATS = 572, - STR_RIDE_DESCRIPTION_MINI_HELICOPTERS = 573, - STR_RIDE_DESCRIPTION_LAY_DOWN_ROLLER_COASTER = 574, - STR_RIDE_DESCRIPTION_SUSPENDED_MONORAIL = 575, - - STR_RIDE_DESCRIPTION_REVERSER_ROLLER_COASTER = 577, - STR_RIDE_DESCRIPTION_HEARTLINE_TWISTER_COASTER = 578, - STR_RIDE_DESCRIPTION_MINI_GOLF = 579, - STR_RIDE_DESCRIPTION_GIGA_COASTER = 580, - STR_RIDE_DESCRIPTION_ROTO_DROP = 581, - STR_RIDE_DESCRIPTION_FLYING_SAUCERS = 582, - STR_RIDE_DESCRIPTION_CROOKED_HOUSE = 583, - STR_RIDE_DESCRIPTION_MONORAIL_CYCLES = 584, - STR_RIDE_DESCRIPTION_COMPACT_INVERTED_COASTER = 585, - STR_RIDE_DESCRIPTION_WATER_COASTER = 586, - STR_RIDE_DESCRIPTION_AIR_POWERED_VERTICAL_COASTER = 587, - STR_RIDE_DESCRIPTION_INVERTED_HAIRPIN_COASTER = 588, - STR_RIDE_DESCRIPTION_MAGIC_CARPET = 589, - STR_RIDE_DESCRIPTION_SUBMARINE_RIDE = 590, - STR_RIDE_DESCRIPTION_RIVER_RAFTS = 591, - - STR_RIDE_DESCRIPTION_ENTERPRISE = 593, - - STR_RIDE_DESCRIPTION_INVERTED_IMPULSE_COASTER = 598, - STR_RIDE_DESCRIPTION_MINI_ROLLER_COASTER = 599, - STR_RIDE_DESCRIPTION_MINE_RIDE = 600, - - STR_RIDE_DESCRIPTION_LIM_LAUNCHED_ROLLER_COASTER = 602, - STR_RIDE_DESCRIPTION_HYBRID_COASTER = 603, - STR_RIDE_DESCRIPTION_SINGLE_RAIL_ROLLER_COASTER = 604, - STR_RIDE_DESCRIPTION_ALPINE_COASTER = 605, - STR_RIDE_DESCRIPTION_CLASSIC_WOODEN_ROLLER_COASTER = 606, - STR_RIDE_DESCRIPTION_CLASSIC_STAND_UP_ROLLER_COASTER = 607, STR_GUEST_X = 767, STR_HANDYMAN_X = 768, @@ -265,39 +71,15 @@ enum : uint16_t STR_CHOSEN_NAME_IN_USE_ALREADY = 825, STR_TOO_MANY_NAMES_DEFINED = 826, STR_NOT_ENOUGH_CASH_REQUIRES = 827, - STR_CLOSE_WINDOW_TIP = 828, - STR_WINDOW_TITLE_TIP = 829, - STR_ZOOM_IN_TIP = 830, - STR_ZOOM_OUT_TIP = 831, - STR_ROTATE_TIP = 832, - STR_PAUSE_GAME_TIP = 833, - STR_DISC_AND_GAME_OPTIONS_TIP = 834, - - STR_RESOLUTION_X_BY_Y = 839, - STR_ARG_16_RESOLUTION_X_BY_Y = 840, STR_ABOUT = 847, - STR_COPYRIGHT_CS = 850, - STR_DESIGNED_AND_PROGRAMMED_BY_CS = 851, - STR_GRAPHICS_BY_SF = 852, - STR_SOUND_AND_MUSIC_BY_AB = 853, - STR_ADDITIONAL_SOUNDS_RECORDED_BY_DE = 854, - STR_REPRESENTATION_BY_JL = 855, - STR_THANKS_TO = 856, - STR_THANKS_TO_PEOPLE = 857, // STR_0858 to 0864 are removed. STR_STRINGID = 865, STR_ARG_2_STRINGID = 866, // Unused STR_ARG_4_STRINGID = 867, // Unused - STR_ARG_6_STRINGID = 868, STR_ARG_8_STRINGID = 869, // Unused - STR_ARG_10_STRINGID = 870, STR_ARG_12_STRINGID = 871, - STR_ARG_14_STRINGID = 872, - STR_ARG_16_STRINGID = 873, // Unused - STR_ARG_18_STRINGID = 874, - STR_ARG_20_STRINGID = 875, STR_DROPDOWN_GLYPH = 876, STR_TOO_LOW = 877, STR_TOO_HIGH = 878, @@ -306,51 +88,13 @@ enum : uint16_t STR_OBJECT_IN_THE_WAY = 881, STR_LOAD_GAME = 882, STR_SAVE_GAME = 883, - STR_LOAD_LANDSCAPE = 884, - STR_SAVE_LANDSCAPE = 885, - STR_QUIT_SCENARIO_EDITOR = 887, - STR_QUIT_ROLLERCOASTER_DESIGNER = 888, - STR_QUIT_TRACK_DESIGNS_MANAGER = 889, - - STR_SCREENSHOT = 891, STR_SCREENSHOT_SAVED_AS = 892, STR_SCREENSHOT_FAILED = 893, STR_ERR_LANDSCAPE_DATA_AREA_FULL = 894, STR_CANT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_GROUND = 895, - STR_RIDE_CONSTRUCTION_WINDOW_TITLE = 896, - STR_RIDE_CONSTRUCTION_DIRECTION = 897, - STR_RIDE_CONSTRUCTION_LEFT_CURVE_TIP = 898, - STR_RIDE_CONSTRUCTION_RIGHT_CURVE_TIP = 899, - STR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL_TIP = 900, - STR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL_TIP = 901, - STR_RIDE_CONSTRUCTION_LEFT_CURVE_VERY_SMALL_TIP = 902, - STR_RIDE_CONSTRUCTION_RIGHT_CURVE_VERY_SMALL_TIP = 903, - STR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE_TIP = 904, - STR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE_TIP = 905, - STR_RIDE_CONSTRUCTION_STRAIGHT_TIP = 906, - STR_RIDE_CONSTRUCTION_SLOPE = 907, - STR_RIDE_CONSTRUCTION_ROLL_BANKING = 908, - STR_RIDE_CONSTRUCTION_SEAT_ROT = 909, - STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP = 910, - STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP = 911, - STR_RIDE_CONSTRUCTION_NO_ROLL_TIP = 912, - STR_RIDE_CONSTRUCTION_MOVE_TO_PREVIOUS_SECTION_TIP = 913, - STR_RIDE_CONSTRUCTION_MOVE_TO_NEXT_SECTION_TIP = 914, - STR_RIDE_CONSTRUCTION_CONSTRUCT_SELECTED_SECTION_TIP = 915, - STR_RIDE_CONSTRUCTION_REMOVE_HIGHLIGHTED_SECTION_TIP = 916, - STR_RIDE_CONSTRUCTION_VERTICAL_DROP_TIP = 917, - STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP = 918, - STR_RIDE_CONSTRUCTION_SLOPE_DOWN_TIP = 919, - STR_RIDE_CONSTRUCTION_LEVEL_TIP = 920, - STR_RIDE_CONSTRUCTION_SLOPE_UP_TIP = 921, - STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP = 922, - STR_RIDE_CONSTRUCTION_VERTICAL_RISE_TIP = 923, - STR_RIDE_CONSTRUCTION_HELIX_DOWN_TIP = 924, - STR_RIDE_CONSTRUCTION_HELIX_UP_TIP = 925, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS = 926, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE = 927, - STR_RIDE_CONSTRUCTION_CHAIN_LIFT_TIP = 928, STR_S_BEND_LEFT = 929, STR_S_BEND_RIGHT = 930, STR_VERTICAL_LOOP_LEFT = 931, @@ -359,67 +103,10 @@ enum : uint16_t STR_RIDE_ENTRANCE_IN_THE_WAY = 934, STR_RIDE_EXIT_IN_THE_WAY = 935, STR_PARK_ENTRANCE_IN_THE_WAY = 936, - STR_VIEW_OPTIONS_TIP = 937, - STR_ADJUST_LAND_TIP = 938, - STR_UNDERGROUND_VIEW = 939, - STR_REMOVE_BASE_LAND = 940, - STR_REMOVE_VERTICAL_FACES = 941, - STR_SEE_THROUGH_RIDES = 942, - STR_SEE_THROUGH_SCENERY = 943, - STR_SAVE_PROMPT_SAVE = 944, - STR_SAVE_PROMPT_DONT_SAVE = 945, - STR_SAVE_PROMPT_CANCEL = 946, - STR_SAVE_BEFORE_LOADING = 947, - STR_SAVE_BEFORE_QUITTING = 948, - STR_SAVE_BEFORE_QUITTING_2 = 949, - STR_LOAD_GAME_PROMPT_TITLE = 950, - STR_QUIT_GAME_PROMPT_TITLE = 951, - STR_QUIT_GAME_2_PROMPT_TITLE = 952, - STR_LOAD_LANDSCAPE_PROMPT_TITLE = 953, - STR_RIDE_CONSTRUCTION_SELECT_SEAT_ROTATION_ANGLE_TIP = 955, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_180 = 956, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_135 = 957, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_90 = 958, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_45 = 959, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_0 = 960, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_45 = 961, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_90 = 962, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_135 = 963, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_180 = 964, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_225 = 965, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_270 = 966, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_315 = 967, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_360 = 968, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_405 = 969, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_450 = 970, - STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_495 = 971, - STR_CANCEL = 972, - STR_OK = 973, - STR_RIDES = 974, - STR_SHOPS_AND_STALLS = 975, - STR_TOILETS_AND_INFORMATION_KIOSKS = 976, - STR_NEW_TRANSPORT_RIDES = 977, - STR_NEW_GENTLE_RIDES = 978, - STR_NEW_ROLLER_COASTERS = 979, - STR_NEW_THRILL_RIDES = 980, - STR_NEW_WATER_RIDES = 981, - STR_NEW_SHOPS_STALLS = 982, - STR_RESEARCH_AND_DEVELOPMENT = 983, - STR_RAISE_COST_AMOUNT = 984, - STR_LOWER_COST_AMOUNT = 985, - STR_COST_AMOUNT = 986, STR_TOO_MANY_RIDES = 987, STR_CANT_CREATE_NEW_RIDE_ATTRACTION = 988, - STR_RIDE_WINDOW_TITLE = 989, - STR_CONSTRUCTION = 990, STR_STATION_PLATFORM = 991, - STR_DEMOLISH_RIDE_TIP = 992, - STR_DEMOLISH_RIDE = 993, - STR_DEMOLISH = 994, - STR_DEMOLISH_RIDE_ID = 995, - STR_OVERALL_VIEW = 996, - STR_VIEW_SELECTION = 997, STR_NO_MORE_STATIONS_ALLOWED_ON_THIS_RIDE = 998, STR_REQUIRES_A_STATION_PLATFORM = 999, STR_TRACK_IS_NOT_A_COMPLETE_CIRCUIT = 1000, @@ -430,26 +117,15 @@ enum : uint16_t STR_CANT_START_CONSTRUCTION_ON = 1005, STR_MUST_BE_CLOSED_FIRST = 1006, STR_UNABLE_TO_CREATE_ENOUGH_VEHICLES = 1007, - STR_OPEN_CLOSE_OR_TEST_RIDE = 1008, - STR_OPEN_OR_CLOSE_ALL_RIDES = 1009, - STR_OPEN_OR_CLOSE_PARK_TIP = 1010, - STR_CLOSE_ALL = 1011, - STR_OPEN_ALL = 1012, - STR_CLOSE_PARK = 1013, - STR_OPEN_PARK = 1014, STR_UNABLE_TO_OPERATE_WITH_MORE_THAN_ONE_STATION_IN_THIS_MODE = 1015, STR_UNABLE_TO_OPERATE_WITH_LESS_THAN_TWO_STATIONS_IN_THIS_MODE = 1016, STR_CANT_CHANGE_OPERATING_MODE = 1017, STR_RIDE_SET_VEHICLE_TYPE_FAIL = 1018, STR_RIDE_SET_VEHICLE_SET_NUM_CARS_PER_TRAIN_FAIL = 1019, STR_RIDE_SET_VEHICLE_SET_NUM_TRAINS_FAIL = 1020, - STR_RIDE_VEHICLE_COUNT = 1021, - STR_1_CAR_PER_TRAIN = 1022, - STR_X_CARS_PER_TRAIN = 1023, // STR_1024 :{COMMA16} car per train // STR_1025 :{COMMA16} cars per train STR_STATION_PLATFORM_TOO_LONG = 1026, - STR_LOCATE_SUBJECT_TIP = 1027, STR_OFF_EDGE_OF_MAP = 1028, STR_CANNOT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_WATER = 1029, STR_CAN_ONLY_BUILD_THIS_UNDERWATER = 1030, @@ -458,29 +134,10 @@ enum : uint16_t STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND = 1033, STR_CAN_ONLY_BUILD_THIS_ON_LAND = 1034, STR_LOCAL_AUTHORITY_WONT_ALLOW_CONSTRUCTION_ABOVE_TREE_HEIGHT = 1035, - STR_FILE_DIALOG_TITLE_LOAD_GAME = 1036, - STR_FILE_DIALOG_TITLE_LOAD_LANDSCAPE = 1037, STR_FILE_DIALOG_TITLE_CONVERT_SAVED_GAME_TO_SCENARIO = 1038, // Unused - STR_FILE_DIALOG_TITLE_INSTALL_NEW_TRACK_DESIGN = 1039, - STR_FILE_DIALOG_TITLE_SAVE_GAME = 1040, STR_FILE_DIALOG_TITLE_SAVE_SCENARIO = 1041, - STR_FILE_DIALOG_TITLE_SAVE_LANDSCAPE = 1042, - STR_OPENRCT2_SAVED_GAME = 1043, - STR_OPENRCT2_SCENARIO_FILE = 1044, - STR_OPENRCT2_LANDSCAPE_FILE = 1045, - STR_OPENRCT2_TRACK_DESIGN_FILE = 1046, - STR_GAME_SAVE_FAILED = 1047, - STR_SCENARIO_SAVE_FAILED = 1048, - STR_LANDSCAPE_SAVE_FAILED = 1049, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA = 1050, - STR_INVISIBLE_SUPPORTS = 1051, STR_INVISIBLE_PEOPLE = 1052, - STR_RIDES_IN_PARK_TIP = 1053, - STR_NAME_RIDE_TIP = 1054, - STR_NAME_GUEST_TIP = 1055, - STR_NAME_STAFF_TIP = 1056, - STR_RIDE_ATTRACTION_NAME = 1057, - STR_ENTER_NEW_NAME_FOR_THIS_RIDE_ATTRACTION = 1058, STR_CANT_RENAME_RIDE_ATTRACTION = 1059, STR_INVALID_RIDE_ATTRACTION_NAME = 1060, STR_RIDE_MODE_NORMAL = 1061, @@ -520,82 +177,21 @@ enum : uint16_t STR_RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED = 1095, STR_RIDE_MODE_POWERED_LAUNCH = 1096, STR_RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED_MODE = 1097, - STR_MOVING_TO_END_OF = 1098, - STR_WAITING_FOR_PASSENGERS_AT = 1099, - STR_WAITING_TO_DEPART = 1100, - STR_DEPARTING = 1101, - STR_TRAVELLING_AT_0 = 1102, - STR_ARRIVING_AT = 1103, - STR_UNLOADING_PASSENGERS_AT = 1104, - STR_TRAVELLING_AT_1 = 1105, - STR_CRASHING = 1106, - STR_CRASHED_0 = 1107, - STR_TRAVELLING_AT_2 = 1108, - STR_SWINGING = 1109, - STR_ROTATING_0 = 1110, - STR_ROTATING_1 = 1111, - STR_OPERATING_0 = 1112, - STR_SHOWING_FILM = 1113, - STR_ROTATING_2 = 1114, - STR_OPERATING_1 = 1115, - STR_OPERATING_2 = 1116, - STR_DOING_CIRCUS_SHOW = 1117, - STR_OPERATING_3 = 1118, - STR_WAITING_FOR_CABLE_LIFT = 1119, - STR_TRAVELLING_AT_3 = 1120, - STR_STOPPING_0 = 1121, - STR_WAITING_FOR_PASSENGERS = 1122, - STR_WAITING_TO_START = 1123, - STR_STARTING = 1124, - STR_OPERATING = 1125, - STR_STOPPING_1 = 1126, - STR_UNLOADING_PASSENGERS = 1127, - STR_STOPPED_BY_BLOCK_BRAKES = 1128, - STR_ALL_VEHICLES_IN_SAME_COLOURS = 1129, - STR_DIFFERENT_COLOURS_PER = 1130, - STR_DIFFERENT_COLOURS_PER_VEHICLE = 1131, - STR_RIDE_COLOUR_VEHICLE_VALUE = 1132, - STR_RIDE_COLOUR_VEHICLE_OPTION = 1133, - STR_RIDE_COLOUR_TRAIN_VALUE = 1134, - STR_RIDE_COLOUR_TRAIN_OPTION = 1135, - STR_SELECT_MAIN_COLOUR_TIP = 1136, - STR_SELECT_ADDITIONAL_COLOUR_1_TIP = 1137, - STR_SELECT_ADDITIONAL_COLOUR_2_TIP = 1138, - STR_SELECT_SUPPORT_STRUCTURE_COLOUR_TIP = 1139, - STR_SELECT_VEHICLE_COLOUR_SCHEME_TIP = 1140, - STR_SELECT_VEHICLE_TO_MODIFY_TIP = 1141, STR_DROPDOWN_MENU_LABEL = 1142, - STR_DROPDOWN_MENU_LABEL_SELECTED = 1143, STR_CANT_BUILD_MOVE_ENTRANCE_FOR_THIS_RIDE_ATTRACTION = 1144, STR_CANT_BUILD_MOVE_EXIT_FOR_THIS_RIDE_ATTRACTION = 1145, STR_ENTRANCE_NOT_YET_BUILT = 1146, STR_EXIT_NOT_YET_BUILT = 1147, - STR_QUARTER_LOAD = 1148, - STR_HALF_LOAD = 1149, - STR_THREE_QUARTER_LOAD = 1150, - STR_FULL_LOAD = 1151, - STR_ANY_LOAD = 1152, - STR_HEIGHT_MARKS_ON_RIDE_TRACKS = 1153, - STR_HEIGHT_MARKS_ON_LAND = 1154, - STR_HEIGHT_MARKS_ON_PATHS = 1155, STR_TOGGLE_OPTION = 1156, STR_TOGGLE_OPTION_CHECKED = 1157, // Used as STR_TOGGLE_OPTION + 1 STR_CANT_REMOVE_THIS = 1158, - STR_PLACE_SCENERY_TIP = 1159, - STR_ADJUST_WATER_TIP = 1160, STR_CANT_POSITION_THIS_HERE = 1161, - STR_MAP_TOOLTIP_STRINGID = 1162, - STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY = 1163, - STR_MAP_TOOLTIP_STRINGID_CLICK_TO_REMOVE = 1164, STR_MAP_TOOLTIP_STRINGID_STRINGID = 1165, STR_CANT_LOWER_WATER_LEVEL_HERE = 1166, STR_CANT_RAISE_WATER_LEVEL_HERE = 1167, - STR_OPTIONS_TITLE = 1168, - STR_SOUND_NONE = 1169, STR_STRING = 1170, STR_RIDE_ENTRANCE_CLOSED = 1171, STR_RIDE_ENTRANCE_NAME = 1172, - STR_BUILD_FOOTPATH_TIP = 1173, STR_BANNER_SIGN_IN_THE_WAY = 1174, STR_CANT_BUILD_THIS_ON_SLOPED_FOOTPATH = 1175, STR_CANT_BUILD_FOOTPATH_HERE = 1176, @@ -603,18 +199,7 @@ enum : uint16_t STR_LAND_SLOPE_UNSUITABLE = 1178, STR_FOOTPATH_IN_THE_WAY = 1179, STR_CANT_BUILD_THIS_UNDERWATER = 1180, - STR_FOOTPATHS = 1181, - STR_TYPE = 1182, - STR_DIRECTION = 1183, - STR_SLOPE = 1184, - STR_DIRECTION_TIP = 1185, - STR_SLOPE_DOWN_TIP = 1186, - STR_LEVEL_TIP = 1187, - STR_SLOPE_UP_TIP = 1188, - STR_CONSTRUCT_THE_SELECTED_FOOTPATH_SECTION_TIP = 1189, - STR_REMOVE_PREVIOUS_FOOTPATH_SECTION_TIP = 1190, STR_BLACK_STRING = 1191, - STR_RED_OUTLINED_STRING = 1192, STR_WINDOW_COLOUR_2_STRINGID = 1193, STR_CLOSED = 1194, STR_TEST_RUN = 1195, @@ -626,31 +211,8 @@ enum : uint16_t STR_QUEUE_EMPTY = 1201, STR_QUEUE_ONE_PERSON = 1202, STR_QUEUE_PEOPLE = 1203, - STR_QUEUE_TIME_LABEL = 1204, - STR_QUEUE_TIME_PLURAL_LABEL = 1205, - STR_WAIT_FOR = 1206, - STR_LEAVE_IF_ANOTHER_TRAIN_ARRIVES = 1207, - STR_LEAVE_IF_ANOTHER_BOAT_ARRIVES = 1208, - STR_WAIT_FOR_PASSENGERS_BEFORE_DEPARTING_TIP = 1209, - STR_LEAVE_IF_ANOTHER_VEHICLE_ARRIVES_TIP = 1210, - STR_MINIMUM_WAITING_TIME = 1211, - STR_MAXIMUM_WAITING_TIME = 1212, - STR_MINIMUM_LENGTH_BEFORE_DEPARTING_TIP = 1213, - STR_MAXIMUM_LENGTH_BEFORE_DEPARTING_TIP = 1214, - STR_SYNCHRONISE_WITH_ADJACENT_STATIONS = 1215, - STR_SYNCHRONISE_WITH_ADJACENT_STATIONS_TIP = 1216, - STR_FORMAT_SECONDS = 1217, STR_NUMERIC_UP = 1218, STR_NUMERIC_DOWN = 1219, - STR_EXIT_ONLY = 1220, - STR_NO_ENTRANCE = 1221, - STR_NO_EXIT = 1222, - STR_TRANSPORT_RIDES_TIP = 1223, - STR_GENTLE_RIDES_TIP = 1224, - STR_ROLLER_COASTERS_TIP = 1225, - STR_THRILL_RIDES_TIP = 1226, - STR_WATER_RIDES_TIP = 1227, - STR_SHOPS_STALLS_TIP = 1228, STR_RIDE_COMPONENT_TRAIN = 1229, STR_RIDE_COMPONENT_TRAIN_PLURAL = 1230, STR_RIDE_COMPONENT_TRAIN_CAPITALISED = 1231, @@ -749,11 +311,7 @@ enum : uint16_t STR_RIDE_COMPONENT_COURSE_COUNT = 1324, STR_RIDE_COMPONENT_COURSE_COUNT_PLURAL = 1325, STR_RIDE_COMPONENT_COURSE_NO = 1326, - STR_ROTATE_OBJECTS_90 = 1327, STR_LEVEL_LAND_REQUIRED = 1328, - STR_LAUNCH_SPEED = 1329, - STR_LAUNCH_SPEED_TIP = 1330, - STR_RIDE_MODE_SPEED_VALUE = 1331, // 1332 not used. Likely ride_mode_speed value STR_RIDE_STATION = 1333, STR_RIDE_STATION_X = 1334, @@ -761,27 +319,6 @@ enum : uint16_t STR_RIDE_STATION_X_ENTRANCE = 1336, STR_RIDE_EXIT = 1337, STR_RIDE_STATION_X_EXIT = 1338, - STR_NO_TEST_RESULTS_YET = 1339, - STR_MAX_SPEED = 1340, - STR_RIDE_TIME = 1341, - STR_RIDE_TIME_ENTRY = 1342, - STR_RIDE_TIME_ENTRY_WITH_SEPARATOR = 1343, - STR_RIDE_LENGTH = 1344, - STR_RIDE_LENGTH_ENTRY = 1345, - STR_RIDE_LENGTH_ENTRY_WITH_SEPARATOR = 1346, - STR_AVERAGE_SPEED = 1347, - STR_MAX_POSITIVE_VERTICAL_G = 1348, - STR_MAX_NEGATIVE_VERTICAL_G = 1350, - STR_MAX_NEGATIVE_VERTICAL_G_RED = 1351, - STR_MAX_LATERAL_G = 1352, - STR_MAX_LATERAL_G_RED = 1353, - STR_HIGHEST_DROP_HEIGHT = 1354, - STR_DROPS = 1355, - STR_INVERSIONS = 1356, - STR_HOLES = 1357, - STR_TOTAL_AIR_TIME = 1358, - STR_QUEUE_TIME_MINUTE = 1359, - STR_QUEUE_TIME_MINUTES = 1360, STR_CANT_CHANGE_SPEED = 1361, STR_CANT_CHANGE_LAUNCH_SPEED = 1362, STR_TOO_HIGH_FOR_SUPPORTS = 1363, @@ -805,52 +342,16 @@ enum : uint16_t STR_CURVED_LIFT_HILL_LEFT = 1381, STR_CURVED_LIFT_HILL_RIGHT = 1382, STR_QUARTER_LOOP = 1383, - STR_YELLOW_STRING = 1384, - STR_RIDE_CONSTRUCTION_OTHER_TRACK_CONFIGURATIONS_TIP = 1385, - STR_RIDE_CONSTRUCTION_SPECIAL = 1386, STR_CANT_CHANGE_LAND_TYPE = 1387, STR_MONEY_EFFECT_RECEIVE = 1388, STR_MONEY_EFFECT_SPEND = 1389, - STR_BOTTOM_TOOLBAR_CASH = 1390, - STR_BOTTOM_TOOLBAR_CASH_NEGATIVE = 1391, - STR_VIEW_OF_RIDE_ATTRACTION_TIP = 1392, - STR_VEHICLE_DETAILS_AND_OPTIONS_TIP = 1393, - STR_OPERATING_OPTIONS_TIP = 1394, - STR_MAINTENANCE_OPTIONS_TIP = 1395, - STR_COLOUR_SCHEME_OPTIONS_TIP = 1396, - STR_SOUND_AND_MUSIC_OPTIONS_TIP = 1397, - STR_MEASUREMENTS_AND_TEST_DATA_TIP = 1398, - STR_GRAPHS_TIP = 1399, - STR_RIDE_CONSTRUCTION_ENTRANCE = 1400, - STR_RIDE_CONSTRUCTION_EXIT = 1401, - STR_RIDE_CONSTRUCTION_ENTRANCE_TIP = 1402, - STR_RIDE_CONSTRUCTION_EXIT_TIP = 1403, - STR_ROTATE_90_TIP = 1404, - STR_MIRROR_IMAGE_TIP = 1405, - STR_TOGGLE_SCENERY_TIP = 1406, - STR_BUILD_THIS = 1407, - STR_COST_LABEL = 1408, STR_ENTRY_EXIT_PLATFORM = 1409, STR_VERTICAL_TOWER = 1410, STR_X_IN_THE_WAY = 1411, STR_DATA_LOGGING_NOT_AVAILABLE_FOR_THIS_TYPE_OF_RIDE = 1412, STR_DATA_LOGGING_WILL_START_WHEN_NEXT_LEAVES = 1413, - STR_RIDE_STATS_TIME = 1414, - STR_RIDE_STATS_VELOCITY = 1415, - STR_RIDE_STATS_ALTITUDE = 1416, - STR_RIDE_STATS_VERT_G = 1417, - STR_RIDE_STATS_LAT_G = 1418, - STR_RIDE_STATS_VELOCITY_FORMAT = 1419, - STR_RIDE_STATS_ALTITUDE_FORMAT = 1420, - STR_RIDE_STATS_G_FORCE_FORMAT = 1421, - STR_LOGGING_DATA_FROM_TIP = 1422, - STR_QUEUE_LINE_PATH_TIP = 1423, - STR_FOOTPATH_TIP = 1424, STR_FOOTPATH_MAP_TIP = 1425, STR_QUEUE_LINE_MAP_TIP = 1426, - STR_CUSTOMERS_PER_HOUR = 1427, - STR_RIDE_INCOME_ADMISSION_PRICE = 1428, - STR_ARG_6_CURRENCY2DP = 1429, STR_FREE = 1430, STR_WALKING = 1431, STR_HEADING_FOR = 1432, @@ -873,34 +374,15 @@ enum : uint16_t STR_GUEST_MAP_TIP = 1449, STR_TRACKED_GUEST_MAP_TIP = 1450, STR_STAFF_MAP_TIP = 1451, - STR_GUEST_RENAME_TITLE = 1452, - STR_GUEST_RENAME_PROMPT = 1453, STR_CANT_NAME_GUEST = 1454, STR_ERR_INVALID_NAME_FOR_GUEST = 1455, - STR_GUEST_STAT_CASH_SPENT = 1456, - STR_GUEST_STAT_CASH_IN_POCKET = 1457, - STR_GUEST_STAT_TIME_IN_PARK = 1458, - STR_RIDE_CONSTRUCTION_TRACK_STYLE = 1459, - STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP = 1460, - STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP = 1461, STR_TOO_STEEP_FOR_LIFT_HILL = 1462, - STR_GUESTS = 1463, STR_HELIX_UP_SMALL = 1464, STR_HELIX_UP_LARGE = 1465, STR_HELIX_DOWN_SMALL = 1466, STR_HELIX_DOWN_LARGE = 1467, - STR_STAFF = 1468, STR_RIDE_MUST_START_AND_END_WITH_STATIONS = 1469, STR_STATION_NOT_LONG_ENOUGH = 1470, - STR_SPEED = 1471, - STR_SPEED_TIP = 1472, - STR_EXCITEMENT_RATING = 1473, - STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE = 1474, - STR_INTENSITY_RATING = 1475, - STR_INTENSITY_RATING_NOT_YET_AVAILABLE = 1476, - STR_INTENSITY_RATING_RED = 1477, - STR_NAUSEA_RATING = 1478, - STR_NAUSEA_RATING_NOT_YET_AVAILABLE = 1479, STR_PEEP_THOUGHT_TYPE_CANT_AFFORD_0 = 1480, STR_PEEP_THOUGHT_TYPE_SPENT_MONEY = 1481, STR_PEEP_THOUGHT_TYPE_SICK = 1482, @@ -1075,31 +557,8 @@ enum : uint16_t STR_PEEP_THOUGHT_TYPE_NICE_RIDE_DEPRECATED = 1651, STR_PEEP_THOUGHT_TYPE_EXCITED_DEPRECATED = 1652, STR_PEEP_THOUGHT_TYPE_HERE_WE_ARE = 1653, - STR_GUEST_RECENT_THOUGHTS_LABEL = 1654, - STR_CONSTRUCT_FOOTPATH_ON_LAND_TIP = 1655, - STR_CONSTRUCT_BRIDGE_OR_TUNNEL_FOOTPATH_TIP = 1656, - STR_GUEST_STAT_PREFERRED_RIDE = 1657, - STR_GUEST_STAT_PREFERRED_INTESITY_BELOW = 1658, - STR_GUEST_STAT_PREFERRED_INTESITY_BETWEEN = 1659, - STR_GUEST_STAT_PREFERRED_INTESITY_ABOVE = 1660, - STR_GUEST_STAT_NAUSEA_TOLERANCE = 1661, - STR_GUEST_STAT_HAPPINESS_LABEL = 1662, - STR_GUEST_STAT_NAUSEA_LABEL = 1663, - STR_GUEST_STAT_ENERGY_LABEL = 1664, - STR_GUEST_STAT_HUNGER_LABEL = 1665, - STR_GUEST_STAT_THIRST_LABEL = 1666, - STR_GUEST_STAT_TOILET_LABEL = 1667, - STR_SATISFACTION_UNKNOWN = 1668, - STR_SATISFACTION_PERCENT = 1669, - STR_TOTAL_CUSTOMERS = 1670, - STR_TOTAL_PROFIT = 1671, STR_BRAKES = 1672, STR_SPINNING_CONTROL_TOGGLE_TRACK = 1673, - STR_RIDE_CONSTRUCTION_BRAKE_SPEED = 1674, - STR_RIDE_CONSTRUCTION_BRAKE_SPEED_VELOCITY = 1675, - STR_RIDE_CONSTRUCTION_BRAKE_SPEED_LIMIT_TIP = 1676, - STR_POPULARITY_UNKNOWN = 1677, - STR_POPULARITY_PERCENT = 1678, STR_HELIX_UP_LEFT = 1679, STR_HELIX_UP_RIGHT = 1680, STR_HELIX_DOWN_LEFT = 1681, @@ -1111,39 +570,13 @@ enum : uint16_t STR_WATER_SPLASH = 1687, STR_BASE_SIZE_4_X_1 = 1688, // Unused STR_BLOCK_BRAKES = 1689, - STR_NEW_RIDE_NAME_AND_DESCRIPTION = 1690, - STR_NEW_RIDE_COST = 1691, - STR_NEW_RIDE_COST_FROM = 1692, - STR_GUESTS_TIP = 1693, - STR_STAFF_TIP = 1694, - STR_INCOME_AND_COSTS_TIP = 1695, - STR_CUSTOMER_INFORMATION_TIP = 1696, STR_CANNOT_PLACE_THESE_ON_QUEUE_LINE_AREA = 1697, STR_CAN_ONLY_PLACE_THESE_ON_QUEUE_AREA = 1698, STR_TOO_MANY_PEOPLE_IN_GAME = 1699, - STR_HIRE_HANDYMAN = 1700, - STR_HIRE_MECHANIC = 1701, - STR_HIRE_SECURITY_GUARD = 1702, - STR_HIRE_ENTERTAINER = 1703, STR_CANT_HIRE_NEW_STAFF = 1704, - STR_FIRE_STAFF_TIP = 1705, - STR_PICKUP_TIP = 1706, STR_TOO_MANY_STAFF_IN_GAME = 1707, - STR_SET_PATROL_TIP = 1708, - STR_SACK_STAFF = 1709, - STR_YES = 1710, - STR_FIRE_STAFF_ID = 1711, - STR_STAFF_OPTION_SWEEP_FOOTPATHS = 1712, - STR_STAFF_OPTION_WATER_GARDENS = 1713, - STR_STAFF_OPTION_EMPTY_LITTER = 1714, - STR_STAFF_OPTION_MOW_GRASS = 1715, STR_INVALID_NAME_FOR_PARK = 1716, STR_CANT_RENAME_PARK = 1717, - STR_PARK_NAME = 1718, - STR_ENTER_PARK_NAME = 1719, - STR_NAME_PARK_TIP = 1720, - STR_PARK_CLOSED = 1721, - STR_PARK_OPEN = 1722, STR_CANT_OPEN_PARK = 1723, STR_CANT_CLOSE_PARK = 1724, STR_CANT_BUY_LAND = 1725, @@ -1153,52 +586,26 @@ enum : uint16_t STR_LAND_NOT_OWNED_BY_PARK = 1729, STR_BANNER_TEXT_CLOSED = 1730, STR_BANNER_TEXT_FORMAT = 1731, - STR_RIDE_CONSTRUCTION_BUILD = 1732, - STR_RIDE_CONSTRUCTION_MODE = 1733, - STR_NUMBER_OF_LAPS = 1734, - STR_NUMBER_OF_LAPS_TIP = 1735, - STR_NUMBER_OF_LAPS_VALUE = 1736, // STR_1737 :{COMMA16} STR_CANT_CHANGE_NUMBER_OF_LAPS = 1738, STR_RACE_WON_BY_GUEST = 1739, STR_RACE_WON_BY = 1740, STR_NOT_YET_CONSTRUCTED = 1741, - STR_MAX_PEOPLE_ON_RIDE = 1742, - STR_MAX_PEOPLE_ON_RIDE_TIP = 1743, - STR_MAX_PEOPLE_ON_RIDE_VALUE = 1744, // STR_1745 :{COMMA16} STR_CANT_CHANGE_THIS = 1746, - STR_TIME_LIMIT = 1747, - STR_TIME_LIMIT_TIP = 1748, - STR_RIDE_MODE_TIME_LIMIT_VALUE = 1749, // STR_1750 :{DURATION} STR_CANT_CHANGE_TIME_LIMIT = 1751, - STR_INDIVIDUAL_GUESTS_TIP = 1752, - STR_SUMMARISED_GUESTS_TIP = 1753, - STR_FORMAT_NUM_GUESTS_PLURAL = 1754, - STR_FORMAT_NUM_GUESTS_SINGULAR = 1755, - STR_ADMISSION_PRICE = 1756, - STR_RELIABILITY_LABEL_1757 = 1757, - STR_RIDE_CONSTRUCTION_BUILD_MODE = 1758, - STR_RIDE_CONSTRUCTION_MOVE_MODE = 1759, - STR_RIDE_CONSTRUCTION_FILL_IN_MODE = 1760, - STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP = 1761, STR_WATERFALLS = 1762, STR_RAPIDS = 1763, - STR_LOG_BUMPS = 1764, STR_ON_RIDE_PHOTO_SECTION = 1765, STR_REVERSER_TURNTABLE = 1766, STR_SPINNING_TUNNEL = 1767, STR_CANT_CHANGE_NUMBER_OF_SWINGS = 1768, - STR_NUMBER_OF_SWINGS = 1769, - STR_NUMBER_OF_SWINGS_TIP = 1770, - STR_RIDE_MODE_NUMBER_OF_SWINGS_VALUE = 1771, // STR_1772 :{COMMA16} STR_ONLY_ONE_ON_RIDE_PHOTO_PER_RIDE = 1773, STR_ONLY_ONE_CABLE_LIFT_HILL_PER_RIDE = 1774, // STR_OPTIONS_RIDE_MUSIC_OFF = 1775, // STR_OPTIONS_RIDE_MUSIC_ON = 1776, - STR_RIDE_MUSIC = 1777, STR_SCROLLING_SIGN_TEXT = 1778, STR_STAFF_OPTION_COSTUME_PANDA = 1779, STR_STAFF_OPTION_COSTUME_TIGER = 1780, @@ -1211,8 +618,6 @@ enum : uint16_t STR_STAFF_OPTION_COSTUME_BANDIT = 1787, STR_STAFF_OPTION_COSTUME_SHERIFF = 1788, STR_STAFF_OPTION_COSTUME_PIRATE = 1789, - STR_UNIFORM_COLOUR_TIP = 1790, - STR_UNIFORM_COLOUR = 1791, STR_RESPONDING_TO_RIDE_BREAKDOWN_CALL = 1792, STR_HEADING_TO_RIDE_FOR_INSPECTION = 1793, STR_FIXING_RIDE = 1794, @@ -1220,86 +625,10 @@ enum : uint16_t STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING = 1796, // STR_1797 :This option cannot be changed for this ride STR_WHIRLPOOL = 1798, - STR_RIDE_SECONDARY_PRICE_VALUE = 1799, - STR_RIDE_BREAKDOWN_SAFETY_CUT_OUT = 1800, - STR_RIDE_BREAKDOWN_RESTRAINTS_STUCK_CLOSED = 1801, - STR_RIDE_BREAKDOWN_RESTRAINTS_STUCK_OPEN = 1802, - STR_RIDE_BREAKDOWN_DOORS_STUCK_CLOSED = 1803, - STR_RIDE_BREAKDOWN_DOORS_STUCK_OPEN = 1804, - STR_RIDE_BREAKDOWN_VEHICLE_MALFUNCTION = 1805, - STR_RIDE_BREAKDOWN_BRAKES_FAILURE = 1806, - STR_RIDE_BREAKDOWN_CONTROL_FAILURE = 1807, - STR_LAST_BREAKDOWN = 1808, - STR_CURRENT_BREAKDOWN = 1809, - STR_CARRYING = 1810, STR_CANT_BUILD_THIS_HERE = 1811, - STR_STRING_DEFINED_TOOLTIP = 1812, - STR_MISCELLANEOUS = 1813, - STR_ACTIONS = 1814, - STR_THOUGHTS = 1815, - STR_INFORMATION_TYPE_TIP = 1816, - STR_GUESTS_COUNT_COMMA_SEP = 1817, - STR_ALL_GUESTS = 1818, - STR_ALL_GUESTS_SUMMARISED = 1819, - STR_GUESTS_FILTER = 1820, - STR_GUESTS_FILTER_THINKING = 1821, - STR_GUESTS_FILTER_THINKING_ABOUT = 1822, - STR_SHOW_GUESTS_THOUGHTS_ABOUT_THIS_RIDE_ATTRACTION_TIP = 1823, - STR_SHOW_GUESTS_ON_THIS_RIDE_ATTRACTION_TIP = 1824, - STR_SHOW_GUESTS_QUEUING_FOR_THIS_RIDE_ATTRACTION_TIP = 1825, - STR_STATUS = 1826, - STR_POPULARITY = 1827, - STR_SATISFACTION = 1828, - STR_PROFIT = 1829, - STR_QUEUE_LENGTH = 1830, - STR_QUEUE_TIME = 1831, - STR_RELIABILITY = 1832, - STR_DOWN_TIME = 1833, - STR_GUESTS_FAVOURITE = 1834, - STR_POPULARITY_UNKNOWN_LABEL = 1835, - STR_POPULARITY_LABEL = 1836, - STR_SATISFACTION_UNKNOWN_LABEL = 1837, - STR_SATISFACTION_LABEL = 1838, - STR_RELIABILITY_LABEL = 1839, - STR_DOWN_TIME_LABEL = 1840, - STR_PROFIT_LABEL = 1841, - STR_GUESTS_FAVOURITE_LABEL = 1842, - STR_GUESTS_FAVOURITE_PLURAL_LABEL = 1843, - STR_RIDE_LIST_INFORMATION_TYPE_TIP = 1844, // STR_1845 :{MONTHYEAR} // Used in window_game_bottom_toolbar_onpaint - STR_BOTTOM_TOOLBAR_NUM_GUESTS_STABLE = 1846, - STR_BOTTOM_TOOLBAR_NUM_GUESTS_DECREASE = 1847, - STR_BOTTOM_TOOLBAR_NUM_GUESTS_INCREASE = 1848, - STR_PLAY_MUSIC = 1849, - STR_SELECT_MUSIC_TIP = 1850, - STR_RUNNING_COST_PER_HOUR = 1851, - STR_RUNNING_COST_UNKNOWN = 1852, - STR_BUILT_THIS_YEAR = 1853, - STR_BUILT_LAST_YEAR = 1854, - STR_BUILT_YEARS_AGO = 1855, - STR_PROFIT_PER_ITEM_SOLD = 1856, - STR_LOSS_PER_ITEM_SOLD = 1857, - STR_COST_PER_MONTH = 1858, - STR_HANDYMAN_PLURAL = 1859, - STR_MECHANIC_PLURAL = 1860, - STR_SECURITY_GUARD_PLURAL = 1861, - STR_ENTERTAINER_PLURAL = 1862, - STR_HANDYMAN_SINGULAR = 1863, - STR_MECHANIC_SINGULAR = 1864, - STR_SECURITY_GUARD_SINGULAR = 1865, - STR_ENTERTAINER_SINGULAR = 1866, - STR_STAFF_LIST_COUNTER = 1867, STR_CANT_CHANGE_NUMBER_OF_ROTATIONS = 1868, - STR_NUMBER_OF_ROTATIONS = 1869, - STR_NUMBER_OF_ROTATIONS_TIP = 1870, - STR_NUMBER_OF_ROTATIONS_VALUE = 1871, // STR_1872 :{COMMA16} - STR_INCOME_PER_HOUR = 1873, - STR_PROFIT_PER_HOUR = 1874, - STR_GUEST_ITEM_FORMAT = 1875, - STR_INSPECT_RIDES = 1876, - STR_FIX_RIDES = 1877, - STR_INSPECTION = 1878, STR_EVERY_10_MINUTES = 1879, STR_EVERY_20_MINUTES = 1880, STR_EVERY_30_MINUTES = 1881, @@ -1308,76 +637,22 @@ enum : uint16_t STR_EVERY_2_HOURS = 1884, STR_NEVER = 1885, STR_INSPECTING_RIDE = 1886, - STR_TIME_SINCE_LAST_INSPECTION_MINUTES = 1887, - STR_TIME_SINCE_LAST_INSPECTION_MORE_THAN_4_HOURS = 1888, - STR_DOWN_TIME_LABEL_1889 = 1889, - STR_SELECT_HOW_OFTEN_A_MECHANIC_SHOULD_CHECK_THIS_RIDE = 1890, - STR_NO_THING_IN_PARK_YET = 1891, // STR_1892 : // STR_1893 : - STR_ITEMS_SOLD = 1894, - STR_BUILD_RIDE_TIP = 1895, - STR_FINANCES_SUMMARY_EXPENDITURE_INCOME = 1896, - STR_FINANCES_SUMMARY_RIDE_CONSTRUCTION = 1897, - STR_FINANCES_SUMMARY_RIDE_RUNNING_COSTS = 1898, - STR_FINANCES_SUMMARY_LAND_PURCHASE = 1899, - STR_FINANCES_SUMMARY_LANDSCAPING = 1900, - STR_FINANCES_SUMMARY_PARK_ENTRANCE_TICKETS = 1901, - STR_FINANCES_SUMMARY_RIDE_TICKETS = 1902, - STR_FINANCES_SUMMARY_SHOP_SALES = 1903, - STR_FINANCES_SUMMARY_SHOP_STOCK = 1904, - STR_FINANCES_SUMMARY_FOOD_DRINK_SALES = 1905, - STR_FINANCES_SUMMARY_FOOD_DRINK_STOCK = 1906, - STR_FINANCES_SUMMARY_STAFF_WAGES = 1907, - STR_FINANCES_SUMMARY_MARKETING = 1908, - STR_FINANCES_SUMMARY_RESEARCH = 1909, - STR_FINANCES_SUMMARY_LOAN_INTEREST = 1910, - STR_FINANCES_SUMMARY_AT_X_PER_YEAR = 1911, - STR_FINANCES_SUMMARY_MONTH_HEADING = 1912, - STR_FINANCES_SUMMARY_INCOME_VALUE = 1913, - STR_FINANCES_SUMMARY_EXPENDITURE_VALUE = 1914, - STR_FINANCES_SUMMARY_LOSS_VALUE = 1915, - STR_FINANCES_SUMMARY_LOAN = 1916, - STR_FINANCES_SUMMARY_LOAN_VALUE = 1917, STR_CANT_BORROW_ANY_MORE_MONEY = 1918, STR_NOT_ENOUGH_CASH_AVAILABLE = 1919, STR_CANT_PAY_BACK_LOAN = 1920, - STR_START_NEW_GAME_TIP = 1921, - STR_CONTINUE_SAVED_GAME_TIP = 1922, - STR_EXIT = 1924, STR_ERR_CANT_PLACE_PERSON_HERE = 1925, // STR_1926 : STR_RIDE_IS_BROKEN_DOWN = 1927, STR_RIDE_HAS_CRASHED = 1928, STR_RIDE_IS_STILL_NOT_FIXED = 1929, - STR_TOGGLE_GUEST_TRACKING_TIP = 1930, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X = 1931, STR_PEEP_TRACKING_PEEP_IS_ON_X = 1932, STR_PEEP_TRACKING_PEEP_IS_IN_X = 1933, STR_PEEP_TRACKING_LEFT_RIDE_X = 1934, STR_PEEP_TRACKING_LEFT_PARK = 1935, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X = 1936, - STR_SHOW_SUBJECT_TIP = 1937, - STR_SHOW_GUEST_VIEW_TIP = 1938, - STR_STAFF_OVERVIEW_TIP = 1939, - STR_SHOW_GUEST_NEEDS_TIP = 1940, - STR_SHOW_GUEST_VISITED_RIDES_TIP = 1941, - STR_SHOW_GUEST_FINANCE_TIP = 1942, - STR_SHOW_GUEST_THOUGHTS_TIP = 1943, - STR_SHOW_GUEST_ITEMS_TIP = 1944, - STR_STAFF_OPTIONS_TIP = 1945, - STR_SELECT_COSTUME_TIP = 1946, - STR_SHOW_PATROL_AREA_TIP = 1947, - STR_HIRE_STAFF_TIP = 1948, - STR_FINANCIAL_SUMMARY = 1949, - STR_FINANCIAL_GRAPH = 1950, - STR_PARK_VALUE_GRAPH = 1951, - STR_PROFIT_GRAPH = 1952, - STR_MARKETING = 1953, - STR_RESEARCH_FUNDING = 1954, - STR_NUMBER_OF_CIRCUITS = 1955, - STR_NUMBER_OF_CIRCUITS_TIP = 1956, - STR_NUMBER_OF_CIRCUITS_VALUE = 1957, // STR_1958 :{COMMA16} // STR_1959 :Can't change number of circuits... STR_SHOP_ITEM_PRICE_LABEL_BALLOON = 1960, @@ -1620,32 +895,14 @@ enum : uint16_t STR_SHOP_ITEM_DISPLAY_EMPTY_JUICE_CUP = 2207, STR_SHOP_ITEM_DISPLAY_ROAST_SAUSAGE = 2208, STR_SHOP_ITEM_DISPLAY_EMPTY_BOWL_BLUE = 2209, - STR_STAFF_HANDYMEN_TAB_TIP = 2210, - STR_STAFF_MECHANICS_TAB_TIP = 2211, - STR_STAFF_SECURITY_TAB_TIP = 2212, - STR_STAFF_ENTERTAINERS_TAB_TIP = 2213, STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED = 2214, STR_RIDE_MAP_TIP = 2215, - STR_CELSIUS_VALUE = 2216, - STR_FAHRENHEIT_VALUE = 2217, STR_NEWS_VEHICLE_HAS_STALLED = 2218, STR_X_PEOPLE_DIED_ON_X = 2219, - STR_PARK_RATING_LABEL = 2220, - STR_PARK_RATING_TIP = 2221, - STR_GRAPH_LABEL = 2222, - STR_GUESTS_IN_PARK_LABEL = 2223, - STR_CASH_LABEL = 2224, - STR_CASH_NEGATIVE_LABEL = 2225, - STR_PARK_VALUE_LABEL = 2226, - STR_COMPANY_VALUE_LABEL = 2227, - STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL = 2228, STR_SLOPE_UP_TO_VERTICAL = 2229, STR_VERTICAL_TRACK = 2230, STR_HOLDING_BRAKE_FOR_DROP = 2231, STR_CABLE_LIFT_HILL = 2232, - STR_PARK_INFORMATION_TIP = 2233, - STR_RECENT_MESSAGES = 2234, - STR_NEWS_DATE_FORMAT = 2235, STR_MONTH_JANUARY = 2236, // unused STR_MONTH_FEBRUARY = 2237, // unused STR_MONTH_MARCH = 2238, @@ -1674,20 +931,6 @@ enum : uint16_t STR_RESEARCH_FUNDING_MINIMUM = 2261, STR_RESEARCH_FUNDING_NORMAL = 2262, STR_RESEARCH_FUNDING_MAXIMUM = 2263, - STR_RESEARCH_FUNDING_ = 2264, - STR_RESEARCH_COST_PER_MONTH = 2265, - STR_RESEARCH_PRIORITIES = 2266, - STR_CURRENTLY_IN_DEVELOPMENT = 2267, - STR_LAST_DEVELOPMENT = 2268, - STR_RESEARCH_TYPE_LABEL = 2269, - STR_RESEARCH_PROGRESS_LABEL = 2270, - STR_RESEARCH_EXPECTED_LABEL = 2271, - STR_RESEARCH_RIDE_LABEL = 2272, - STR_RESEARCH_SCENERY_LABEL = 2273, - STR_RESEARCH_SHOW_DETAILS_TIP = 2274, - STR_FINANCES_RESEARCH_TIP = 2275, - STR_RESEARCH_AND_DEVELOPMENT_TIP = 2276, - STR_RESEARCH_UNKNOWN = 2277, STR_RESEARCH_CATEGORY_TRANSPORT = 2278, STR_RESEARCH_CATEGORY_GENTLE = 2279, STR_RESEARCH_CATEGORY_ROLLERCOASTER = 2280, @@ -1695,55 +938,14 @@ enum : uint16_t STR_RESEARCH_CATEGORY_WATER = 2282, STR_RESEARCH_CATEGORY_SHOP = 2283, STR_RESEARCH_CATEGORY_SCENERY_GROUP = 2284, - STR_RESEARCH_STAGE_INITIAL_RESEARCH = 2285, - STR_RESEARCH_STAGE_DESIGNING = 2286, - STR_RESEARCH_STAGE_COMPLETING_DESIGN = 2287, - STR_RESEARCH_STAGE_UNKNOWN = 2288, - STR_RESEARCH_EXPECTED_FORMAT = 2289, // STR_2290 : - STR_SELECT_SCENARIO = 2291, - STR_GUEST_LABEL_RIDES_BEEN_ON = 2292, - STR_NOTHING = 2293, - STR_CHANGE_BASE_LAND_TIP = 2294, - STR_CHANGE_VERTICAL_LAND_TIP = 2295, - STR_GUEST_EXPENSES_ENTRANCE_FEE = 2296, - STR_GUEST_EXPENSES_RIDE = 2297, - STR_GUEST_EXPENSES_RIDE_PLURAL = 2298, - STR_GUEST_EXPENSES_FOOD = 2299, - STR_GUEST_EXPENSES_FOOD_PLURAL = 2300, - STR_GUEST_EXPENSES_DRINK = 2301, - STR_GUEST_EXPENSES_DRINK_PLURAL = 2302, - STR_GUEST_EXPENSES_SOUVENIR = 2303, - STR_GUEST_EXPENSES_SOUVENIR_PLURAL = 2304, // STR_2305 :Track design files // STR_2306 :Save track design - STR_SELECT_DESIGN = 2307, - STR_TRACK_DESIGNS = 2308, - STR_TRACK_DESIGN_INSTALL_WINDOW_TITLE = 2309, - STR_BUILD_CUSTOM_DESIGN = 2310, - STR_TRACK_LIST_EXCITEMENT_RATING = 2311, - STR_TRACK_LIST_INTENSITY_RATING = 2312, - STR_TRACK_LIST_NAUSEA_RATING = 2313, - STR_TRACK_LIST_RIDE_LENGTH = 2314, - STR_TRACK_LIST_COST_AROUND = 2315, - STR_TRACK_LIST_SPACE_REQUIRED = 2316, // STR_2317 : // STR_2318 : // STR_2319 : // STR_2320 : - STR_NUMBER_OF_RIDES_LABEL = 2321, - STR_STAFF_LABEL = 2322, - STR_PARK_SIZE_METRIC_LABEL = 2323, - STR_PARK_SIZE_IMPERIAL_LABEL = 2324, - STR_BUY_LAND_RIGHTS_TIP = 2325, - STR_BUY_CONSTRUCTION_RIGHTS_TIP = 2326, - STR_OPTIONS = 2327, - STR_CURRENCY = 2328, - STR_DISTANCE_AND_SPEED = 2329, - STR_TEMPERATURE = 2330, - STR_HEIGHT_LABELS = 2331, STR_UNITS = 2332, - STR_SOUND_EFFECTS = 2333, STR_POUNDS = 2334, STR_DOLLARS = 2335, STR_FRANC = 2336, @@ -1754,47 +956,10 @@ enum : uint16_t STR_GUILDERS = 2341, STR_KRONA = 2342, STR_EUROS = 2343, - STR_IMPERIAL = 2344, - STR_METRIC = 2345, // STR_DISPLAY = 2346, // Unused STR_NEWS_ITEM_GUEST_DROWNED = 2347, - STR_STAFF_STATS_TIP = 2348, - STR_STAFF_STAT_WAGES = 2349, - STR_STAFF_STAT_EMPLOYED_FOR = 2350, - STR_STAFF_STAT_LAWNS_MOWN = 2351, - STR_STAFF_STAT_GARDENS_WATERED = 2352, - STR_STAFF_STAT_LITTER_SWEPT = 2353, - STR_STAFF_STAT_BINS_EMPTIED = 2354, - STR_STAFF_STAT_RIDES_FIXED = 2355, - STR_STAFF_STAT_RIDES_INSPECTED = 2356, // STR_2357 :House - STR_HEIGHT_IN_UNITS = 2358, - STR_REAL_VALUES = 2359, - STR_DISPLAY_RESOLUTION = 2360, - STR_TILE_SMOOTHING = 2361, - STR_TILE_SMOOTHING_TIP = 2362, - STR_GRIDLINES = 2363, - STR_GRIDLINES_TIP = 2364, STR_BANK_REFUSES_TO_INCREASE_LOAN = 2365, - STR_CELSIUS = 2366, - STR_FAHRENHEIT = 2367, - STR_PEEP_STAT_NAUSEA_TOLERANCE_NONE = 2368, - STR_PEEP_STAT_NAUSEA_TOLERANCE_LOW = 2369, - STR_PEEP_STAT_NAUSEA_TOLERANCE_AVERAGE = 2370, - STR_PEEP_STAT_NAUSEA_TOLERANCE_HIGH = 2371, - STR_RATING_LOW = 2372, - STR_RATING_MEDIUM = 2373, - STR_RATING_HIGH = 2374, - STR_RATING_VERY_HIGH = 2375, - STR_RATING_EXTREME = 2376, - STR_RATING_ULTRA_EXTREME = 2377, - STR_ADJUST_SMALLER_LAND_TIP = 2378, - STR_ADJUST_LARGER_LAND_TIP = 2379, - STR_ADJUST_SMALLER_WATER_TIP = 2380, - STR_ADJUST_LARGER_WATER_TIP = 2381, - STR_LAND = 2382, - STR_WATER = 2383, - STR_OBJECTIVE_LABEL = 2384, STR_OBJECTIVE_NONE = 2385, STR_OBJECTIVE_GUESTS_BY = STR_OBJECTIVE_NONE + 1, STR_OBJECTIVE_PARK_VALUE_BY = STR_OBJECTIVE_NONE + 2, @@ -1807,31 +972,6 @@ enum : uint16_t STR_OBJECTIVE_FINISH_5_ROLLERCOASTERS = STR_OBJECTIVE_NONE + 9, STR_OBJECTIVE_REPLAY_LOAN_AND_PARK_VALUE = STR_OBJECTIVE_NONE + 10, STR_OBJECTIVE_MONTHLY_FOOD_INCOME = STR_OBJECTIVE_NONE + 11, - STR_OBJECTIVE_DROPDOWN_NONE = 2397, - STR_OBJECTIVE_DROPDOWN_NUMBER_OF_GUESTS_AT_A_GIVEN_DATE = STR_OBJECTIVE_DROPDOWN_NONE + 1, - STR_OBJECTIVE_DROPDOWN_PARK_VALUE_AT_A_GIVEN_DATE = STR_OBJECTIVE_DROPDOWN_NONE + 2, - STR_OBJECTIVE_DROPDOWN_HAVE_FUN = STR_OBJECTIVE_DROPDOWN_NONE + 3, - STR_OBJECTIVE_DROPDOWN_BUILD_THE_BEST_RIDE_YOU_CAN = STR_OBJECTIVE_DROPDOWN_NONE + 4, - STR_OBJECTIVE_DROPDOWN_BUILD_10_ROLLER_COASTERS = STR_OBJECTIVE_DROPDOWN_NONE + 5, - STR_OBJECTIVE_DROPDOWN_NUMBER_OF_GUESTS_IN_PARK = STR_OBJECTIVE_DROPDOWN_NONE + 6, - STR_OBJECTIVE_DROPDOWN_MONTHLY_INCOME_FROM_RIDE_TICKETS = STR_OBJECTIVE_DROPDOWN_NONE + 7, - STR_OBJECTIVE_DROPDOWN_BUILD_10_ROLLER_COASTERS_OF_A_GIVEN_LENGTH = STR_OBJECTIVE_DROPDOWN_NONE + 8, - STR_OBJECTIVE_DROPDOWN_FINISH_BUILDING_5_ROLLER_COASTERS = STR_OBJECTIVE_DROPDOWN_NONE + 9, - STR_OBJECTIVE_DROPDOWN_REPAY_LOAN_AND_ACHIEVE_A_GIVEN_PARK_VALUE = STR_OBJECTIVE_DROPDOWN_NONE + 10, - STR_OBJECTIVE_DROPDOWN_MONTHLY_PROFIT_FROM_FOOD_MERCHANDISE = STR_OBJECTIVE_DROPDOWN_NONE + 11, - STR_MARKETING_CAMPAIGNS_IN_OPERATION = 2409, - STR_MARKETING_CAMPAIGNS_NONE = 2410, - STR_MARKETING_CAMPAIGNS_AVAILABLE = 2411, - STR_START_THIS_MARKETING_CAMPAIGN = 2412, - STR_MARKETING_PER_WEEK = 2413, - STR_MARKETING_NOT_SELECTED = 2414, - STR_MARKETING_RIDE = 2415, - STR_MARKETING_ITEM = 2416, - STR_LENGTH_OF_TIME = 2417, - STR_PEEP_INVENTORY_VOUCHER_PARK_ENTRY_FREE = 2418, - STR_PEEP_INVENTORY_VOUCHER_RIDE_FREE = 2419, - STR_PEEP_INVENTORY_VOUCHER_PARK_ENTRY_HALF_PRICE = 2420, - STR_PEEP_INVENTORY_VOUCHER_FOOD_OR_DRINK_FREE = 2421, // STR_2422 :Advertising campaign for {STRINGID} // STR_2423 :Advertising campaign for {STRINGID} STR_MARKETING_VOUCHERS_FOR_FREE_ENTRY_TO_THE_PARK = 2424, @@ -1846,105 +986,31 @@ enum : uint16_t STR_VOUCHERS_FOR_FREE = 2433, STR_ADVERTISING_CAMPAIGN_FOR_1 = 2434, STR_ADVERTISING_CAMPAIGN_FOR_2 = 2435, - STR_MARKETING_1_WEEK = 2436, // STR_2437 : // STR_2438 : // STR_2439 : // STR_2440 : // STR_2441 : // STR_2442 : - STR_MARKETING_COST_PER_WEEK = 2443, - STR_MARKETING_TOTAL_COST = 2444, - STR_MARKETING_START_THIS_MARKETING_CAMPAIGN = 2445, STR_MARKETING_FINISHED_FREE_ENTRY = 2446, STR_MARKETING_FINISHED_FREE_RIDES = 2447, STR_MARKETING_FINISHED_HALF_PRICE_ENTRY = 2448, STR_MARKETING_FINISHED_FREE_RIDE = 2449, STR_MARKETING_FINISHED_PARK_ADS = 2450, STR_MARKETING_FINISHED_RIDE_ADS = 2451, - STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_POSITIVE = 2452, - STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_NEGATIVE = 2453, - STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE = 2454, // STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE_POSITIVE = 2455, // Unused // STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE_NEGATIVE = 2456, // Unused - STR_FINANCES_SHOW_SUMMARY_TAB_TIP = 2457, - STR_FINANCES_SHOW_CASH_TAB_TIP = 2458, - STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP = 2459, - STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP = 2460, - STR_FINANCES_SHOW_MARKETING_TAB_TIP = 2461, - STR_PARK_ENTRANCE_TAB_TIP = 2462, - STR_PARK_RATING_TAB_TIP = 2463, - STR_PARK_GUESTS_TAB_TIP = 2464, - STR_PARK_PRICE_TAB_TIP = 2465, - STR_PARK_STATS_TAB_TIP = 2466, - STR_PARK_OBJECTIVE_TAB_TIP = 2467, - STR_PARK_AWARDS_TAB_TIP = 2468, - STR_SELECT_LEVEL_OF_RESEARCH_AND_DEVELOPMENT = 2469, - STR_RESEARCH_NEW_TRANSPORT_RIDES_TIP = 2470, - STR_RESEARCH_NEW_GENTLE_RIDES_TIP = 2471, - STR_RESEARCH_NEW_ROLLER_COASTERS_TIP = 2472, - STR_RESEARCH_NEW_THRILL_RIDES_TIP = 2473, - STR_RESEARCH_NEW_WATER_RIDES_TIP = 2474, - STR_RESEARCH_NEW_SHOPS_AND_STALLS_TIP = 2475, - STR_RESEARCH_NEW_SCENERY_AND_THEMING_TIP = 2476, - STR_SELECT_OPERATING_MODE = 2477, - STR_SHOW_GRAPH_OF_VELOCITY_AGAINST_TIME_TIP = 2478, - STR_SHOW_GRAPH_OF_ALTITUDE_AGAINST_TIME_TIP = 2479, - STR_SHOW_GRAPH_OF_VERTICAL_ACCELERATION_AGAINST_TIME_TIP = 2480, - STR_SHOW_GRAPH_OF_LATERAL_ACCELERATION_AGAINST_TIME_TIP = 2481, - STR_PROFIT_PER_WEEK_AND_PARK_VALUE_TIP = 2482, - STR_FINANCES_WEEKLY_PROFIT_POSITIVE = 2483, - STR_FINANCES_WEEKLY_PROFIT_LOSS = 2484, // STR_CONTROLS = 2485, // Unused // STR_GENERAL = 2486, // Unused - STR_REAL_NAME = 2487, - STR_REAL_NAME_TIP = 2488, - STR_HOTKEY = 2489, - STR_SHORTCUTS_TITLE = 2490, STR_SHORTCUT_ACTION_RESET = 2491, - STR_SHORTCUT_ACTION_RESET_TIP = 2492, - STR_SHORTCUT_CLOSE_TOP_MOST_WINDOW = 2493, - STR_SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS = 2494, - STR_SHORTCUT_CANCEL_CONSTRUCTION_MODE = 2495, - STR_SHORTCUT_PAUSE_GAME = 2496, - STR_SHORTCUT_ZOOM_VIEW_OUT = 2497, - STR_SHORTCUT_ZOOM_VIEW_IN = 2498, - STR_SHORTCUT_ROTATE_VIEW_CLOCKWISE = 2499, - STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT = 2500, - STR_SHORTCUT_UNDERGROUND_VIEW_TOGGLE = 2501, - STR_SHORTCUT_REMOVE_BASE_LAND_TOGGLE = 2502, - STR_SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE = 2503, - STR_SHORTCUT_SEE_THROUGH_RIDES_TOGGLE = 2504, - STR_SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE = 2505, - STR_SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE = 2506, STR_SHORTCUT_INVISIBLE_PEOPLE_TOGGLE = 2507, - STR_SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE = 2508, - STR_SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE = 2509, - STR_SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE = 2510, - STR_SHORTCUT_ADJUST_LAND = 2511, - STR_SHORTCUT_ADJUST_WATER = 2512, - STR_SHORTCUT_BUILD_SCENERY = 2513, - STR_SHORTCUT_BUILD_PATHS = 2514, - STR_SHORTCUT_BUILD_NEW_RIDE = 2515, - STR_SHORTCUT_SHOW_FINANCIAL_INFORMATION = 2516, - STR_SHORTCUT_SHOW_RESEARCH_INFORMATION = 2517, - STR_SHORTCUT_SHOW_RIDES_LIST = 2518, - STR_SHORTCUT_SHOW_PARK_INFORMATION = 2519, - STR_SHORTCUT_SHOW_GUEST_LIST = 2520, - STR_SHORTCUT_SHOW_STAFF_LIST = 2521, - STR_SHORTCUT_SHOW_RECENT_MESSAGES = 2522, STR_SHORTCUT_SHOW_MAP = 2523, - STR_SHORTCUT_SCREENSHOT = 2524, // 2525--2532 unused - STR_SHORTCUT_BACKSPACE = 2533, - STR_SHORTCUT_TAB = 2534, - // 2535--2536 unused STR_SHORTCUT_CLEAR = 2537, - STR_SHORTCUT_RETURN = 2538, // 2539--2542 unused @@ -1954,25 +1020,14 @@ enum : uint16_t // 2546--2551 unused - STR_SHORTCUT_ESCAPE = 2552, - // 2553--2556 unused - STR_SHORTCUT_SPACEBAR = 2557, - STR_SHORTCUT_PGUP = 2558, - STR_SHORTCUT_PGDN = 2559, STR_SHORTCUT_END = 2560, STR_SHORTCUT_HOME = 2561, - STR_SHORTCUT_LEFT = 2562, - STR_SHORTCUT_UP = 2563, - STR_SHORTCUT_RIGHT = 2564, - STR_SHORTCUT_DOWN = 2565, STR_SHORTCUT_SELECT = 2566, STR_SHORTCUT_PRINT = 2567, STR_SHORTCUT_EXECUTE = 2568, STR_SHORTCUT_SNAPSHOT = 2569, - STR_SHORTCUT_INSERT = 2570, - STR_SHORTCUT_DELETE = 2571, STR_SHORTCUT_HELP = 2572, // 2573--2617 unused @@ -1981,25 +1036,8 @@ enum : uint16_t // 2619--2620 unused - STR_SHORTCUT_NUMPAD_0 = 2621, - STR_SHORTCUT_NUMPAD_1 = 2622, - STR_SHORTCUT_NUMPAD_2 = 2623, - STR_SHORTCUT_NUMPAD_3 = 2624, - STR_SHORTCUT_NUMPAD_4 = 2625, - STR_SHORTCUT_NUMPAD_5 = 2626, - STR_SHORTCUT_NUMPAD_6 = 2627, - STR_SHORTCUT_NUMPAD_7 = 2628, - STR_SHORTCUT_NUMPAD_8 = 2629, - STR_SHORTCUT_NUMPAD_9 = 2630, - STR_SHORTCUT_NUMPAD_MULTIPLY = 2631, - STR_SHORTCUT_NUMPAD_PLUS = 2632, - // 2633 unused - STR_SHORTCUT_NUMPAD_MINUS = 2634, - STR_SHORTCUT_NUMPAD_PERIOD = 2635, - STR_SHORTCUT_NUMPAD_DIVIDE = 2636, - // 2637--2668 unused STR_SHORTCUT_NUMLOCK = 2669, @@ -2007,42 +1045,14 @@ enum : uint16_t // 2671--2679 unused - STR_RESEARCH_COMPLETED_AL = 2680, // STR_2681 : // STR_2682 : // STR_2683 : - STR_CHEAT_LARGE_TRAM_GUESTS_TIP = 2684, - STR_MAPGEN_SIMPLEX_NOISE = 2685, - STR_MAPGEN_SIMPLEX_NOISE_LOW_ = 2686, - STR_MAPGEN_SIMPLEX_NOISE_HIGH = 2687, - STR_MAPGEN_SIMPLEX_NOISE_BASE_FREQUENCY = 2688, - STR_MAPGEN_SIMPLEX_NOISE_OCTAVES = 2689, - STR_MAPGEN_WINDOW_TITLE = 2690, - STR_BASE_HEIGHT_LABEL = 2691, - STR_WATER_LEVEL_LABEL = 2692, - STR_TERRAIN_LABEL = 2693, - STR_MAPGEN_ACTION_GENERATE = 2694, - STR_MAPGEN_OPTION_RANDOM_TERRAIN = 2695, - STR_MAPGEN_OPTION_PLACE_TREES = 2696, // 2697--2699 unused - STR_OPTIONS_AUTOSAVE_FREQUENCY_LABEL = 2700, - STR_SAVE_EVERY_MINUTE = 2701, - STR_SAVE_EVERY_5MINUTES = 2702, - STR_SAVE_EVERY_15MINUTES = 2703, - STR_SAVE_EVERY_30MINUTES = 2704, - STR_SAVE_EVERY_HOUR = 2705, - STR_SAVE_NEVER = 2706, - STR_FILEBROWSER_USE_SYSTEM_WINDOW = 2707, - STR_FILEBROWSER_OVERWRITE_PROMPT = 2708, - STR_FILEBROWSER_OVERWRITE_TITLE = 2709, - STR_FILEBROWSER_FILE_NAME_PROMPT = 2710, - // 2711--2717 unused - STR_FILEBROWSER_ACTION_UP = 2718, - STR_FILEBROWSER_ACTION_NEW_FILE = 2719, STR_DURATION_SEC = 2720, STR_DURATION_SECS = 2721, STR_DURATION_MIN_SEC = 2722, @@ -2061,18 +1071,12 @@ enum : uint16_t STR_UNIT_SUFFIX_KILOMETRES_PER_HOUR = 2735, STR_DATE_FORMAT_MY = 2736, STR_DATE_FORMAT_DMY = 2737, - STR_OPTIONS_MUSIC_LABEL = 2738, - STR_OPTIONS_MUSIC_VALUE_NONE = 2739, - STR_ROLLERCOASTER_TYCOON_1_DROPDOWN = 2740, STR_ROLLERCOASTER_TYCOON_2_DROPDOWN = 2741, // 2744--2748 unused STR_MY_NEW_SCENARIO = 2749, - STR_MOVE_ALL_TOP = 2750, - STR_MOVE_ALL_BOTTOM = 2751, STR_CHEAT_CLEAR_GRASS = 2752, - STR_CHEAT_MOWED_GRASS = 2753, STR_CHEAT_WATER_PLANTS = 2754, STR_CHEAT_FIX_VANDALISM = 2755, STR_CHEAT_REMOVE_LITTER = 2756, @@ -2084,42 +1088,10 @@ enum : uint16_t STR_CHEAT_FREEZE_WEATHER = 2767, STR_CHEAT_OPEN_PARK = 2769, - STR_CHEAT_CLOSE_PARK = 2770, // STR_2771 :Slower Gamespeed // STR_2772 :Faster Gamespeed - STR_OPTIONS_DISPLAY_WINDOWED = 2773, - STR_OPTIONS_DISPLAY_FULLSCREEN = 2774, - STR_OPTIONS_DISPLAY_FULLSCREEN_BORDERLESS = 2775, - STR_OPTIONS_LANGUAGE = 2776, - STR_OPTIONS_DROPDOWN_ITEM = 2777, - STR_OPTIONS_DROPDOWN_ITEM_SELECTED = 2778, // used as STR_OPTIONS_DROPDOWN_ITEM + 1 - STR_VIEWPORT_NO = 2779, - STR_EXTRA_VIEWPORT = 2780, - STR_SHORTCUT_ENTRY_FORMAT = 2781, STR_SHIFT_PLUS = 2782, STR_CTRL_PLUS = 2783, - STR_SHORTCUT_CHANGE_TITLE = 2784, - STR_SHORTCUT_CHANGE_PROMPT = 2785, - STR_SHORTCUT_LIST_TIP = 2786, - STR_FINANCES_PARK_VALUE = 2787, - STR_OBJECTIVE_ACHIEVED = 2788, - STR_OBJECTIVE_FAILED = 2789, - STR_ENTER_NAME_INTO_SCENARIO_CHART = 2790, - STR_ENTER_NAME = 2791, - STR_PLEASE_ENTER_YOUR_NAME_FOR_THE_SCENARIO_CHART = 2792, - STR_COMPLETED_BY = 2793, - STR_COMPLETED_BY_WITH_COMPANY_VALUE = 2794, - STR_SORT = 2795, - STR_RIDE_LIST_SORT_TIP = 2796, - STR_SCREEN_EDGE_SCROLLING = 2797, - STR_SCREEN_EDGE_SCROLLING_TIP = 2798, - STR_HOTKEY_TIP = 2799, - STR_TOTAL_ADMISSIONS = 2800, - STR_INCOME_FROM_ADMISSIONS = 2801, - STR_MAP_LABEL = 2802, - STR_SHOW_GUESTS_ON_MAP_TIP = 2803, - STR_SHOW_STAFF_ON_MAP_TIP = 2804, - STR_SHOW_MAP_TIP = 2805, STR_PEEPS_DISGUSTED_BY_PATHS = 2806, STR_PEEPS_DISLIKE_LITTER = 2807, STR_PEEPS_DISLIKE_VANDALISM = 2808, @@ -2128,23 +1100,6 @@ enum : uint16_t STR_PEEPS_CANT_FIND_TOILET = 2811, STR_PEEPS_GETTING_LOST_OR_STUCK = 2812, STR_ENTRANCE_FEE_TOO_HI = 2813, - STR_AWARD_MOST_UNTIDY = 2814, - STR_AWARD_MOST_TIDY = STR_AWARD_MOST_UNTIDY + 1, - STR_AWARD_BEST_ROLLERCOASTERS = STR_AWARD_MOST_UNTIDY + 2, - STR_AWARD_BEST_VALUE = STR_AWARD_MOST_UNTIDY + 3, - STR_AWARD_MOST_BEAUTIFUL = STR_AWARD_MOST_UNTIDY + 4, - STR_AWARD_WORST_VALUE = STR_AWARD_MOST_UNTIDY + 5, - STR_AWARD_SAFEST = STR_AWARD_MOST_UNTIDY + 6, - STR_AWARD_BEST_STAFF = STR_AWARD_MOST_UNTIDY + 7, - STR_AWARD_BEST_FOOD = STR_AWARD_MOST_UNTIDY + 8, - STR_AWARD_WORST_FOOD = STR_AWARD_MOST_UNTIDY + 9, - STR_AWARD_BEST_TOILETS = STR_AWARD_MOST_UNTIDY + 10, - STR_AWARD_MOST_DISAPPOINTING = STR_AWARD_MOST_UNTIDY + 11, - STR_AWARD_BEST_WATER_RIDES = STR_AWARD_MOST_UNTIDY + 12, - STR_AWARD_BEST_CUSTOM_DESIGNED_RIDES = STR_AWARD_MOST_UNTIDY + 13, - STR_AWARD_MOST_DAZZLING_RIDE_COLOURS = STR_AWARD_MOST_UNTIDY + 14, - STR_AWARD_MOST_CONFUSING_LAYOUT = STR_AWARD_MOST_UNTIDY + 15, - STR_AWARD_BEST_GENTLE_RIDES = STR_AWARD_MOST_UNTIDY + 16, STR_NEWS_ITEM_AWARD_MOST_UNTIDY = 2831, STR_NEWS_ITEM_MOST_TIDY = STR_NEWS_ITEM_AWARD_MOST_UNTIDY + 1, STR_NEWS_ITEM_BEST_ROLLERCOASTERS = STR_NEWS_ITEM_AWARD_MOST_UNTIDY + 2, @@ -2162,7 +1117,6 @@ enum : uint16_t STR_NEWS_ITEM_MOST_DAZZLING_RIDE_COLOURS = STR_NEWS_ITEM_AWARD_MOST_UNTIDY + 14, STR_NEWS_ITEM_MOST_CONFUSING_LAYOUT = STR_NEWS_ITEM_AWARD_MOST_UNTIDY + 15, STR_NEWS_ITEM_BEST_GENTLE_RIDES = STR_NEWS_ITEM_AWARD_MOST_UNTIDY + 16, - STR_NO_RECENT_AWARDS = 2848, // STR_2849 :New scenario installed successfully // STR_2850 :New track design installed successfully // STR_2851 :Scenario already installed @@ -2172,48 +1126,11 @@ enum : uint16_t STR_EXIT_NOT_CONNECTED = 2855, STR_CANT_START_MARKETING_CAMPAIGN = 2858, // STR_2859 :Another instance of OpenRCT2 is already running - STR_LICENSED_TO_INFOGRAMES_INTERACTIVE_INC = 2861, - STR_MAIN_COLOUR_SCHEME = 2971, - STR_ALTERNATIVE_COLOUR_SCHEME_1 = 2972, - STR_ALTERNATIVE_COLOUR_SCHEME_2 = 2973, - STR_ALTERNATIVE_COLOUR_SCHEME_3 = 2974, - STR_COLOUR_SCHEME_TO_CHANGE_TIP = 2975, - STR_PAINT_INDIVIDUAL_AREA_TIP = 2976, - STR_STAFF_TITLE_STAFF_MEMBER_NAME = 2977, - STR_STAFF_PROMPT_ENTER_NAME = 2978, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER = 2979, STR_TOO_MANY_BANNERS_IN_GAME = 2980, STR_NO_ENTRY = 2981, - STR_BANNER_TEXT = 2982, - STR_ENTER_BANNER_TEXT = 2983, STR_ERR_CANT_SET_BANNER_TEXT = 2984, - STR_BANNER_WINDOW_TITLE = 2985, - STR_CHANGE_BANNER_TEXT_TIP = 2986, - STR_SET_AS_NO_ENTRY_BANNER_TIP = 2987, - STR_DEMOLISH_BANNER_TIP = 2988, - STR_SELECT_MAIN_SIGN_COLOUR_TIP = 2989, - STR_SELECT_TEXT_COLOUR_TIP = 2990, - STR_SIGN = 2991, - STR_SIGN_TEXT_TITLE = 2992, - STR_SIGN_TEXT_PROMPT = 2993, - STR_CHANGE_SIGN_TEXT_TIP = 2994, - STR_DEMOLISH_SIGN_TIP = 2995, - STR_TEXT_COLOUR_BLACK = 2996, - STR_TEXT_COLOUR_GREY = 2997, - STR_TEXT_COLOUR_WHITE = 2998, - STR_TEXT_COLOUR_RED = 2999, - STR_TEXT_COLOUR_GREEN = 3000, - STR_TEXT_COLOUR_YELLOW = 3001, - STR_TEXT_COLOUR_TOPAZ = 3002, - STR_TEXT_COLOUR_CELADON = 3003, - STR_TEXT_COLOUR_BABYBLUE = 3004, - STR_TEXT_COLOUR_PALELAVENDER = 3005, - STR_TEXT_COLOUR_PALEGOLD = 3006, - STR_TEXT_COLOUR_LIGHTPINK = 3007, - STR_TEXT_COLOUR_PEARLAQUA = 3008, - STR_TEXT_COLOUR_PALESILVER = 3009, - STR_UNABLE_TO_LOAD_FILE = 3010, STR_FILE_CONTAINS_INVALID_DATA = 3011, STR_MUSIC_STYLE_DODGEMS_BEAT = 3012, STR_MUSIC_STYLE_FAIRGROUND_ORGAN = 3013, @@ -2248,7 +1165,6 @@ enum : uint16_t STR_MUSIC_STYLE_PIRATES = 3042, STR_MUSIC_STYLE_ROCK_STYLE_3 = 3043, STR_MUSIC_STYLE_CANDY_STYLE = 3044, - STR_SELECT_MUSIC_STYLE_TIP = 3045, // STR_THIS_RIDE_CANNOT_BE_MODIFIED = 3046, // Unused STR_LOCAL_AUTHORITY_FORBIDS_DEMOLITION_OR_MODIFICATIONS_TO_THIS_RIDE = 3047, STR_MARKETING_CAMPAIGNS_FORBIDDEN_BY_LOCAL_AUTHORITY = 3048, @@ -2257,12 +1173,6 @@ enum : uint16_t STR_GOLF_HOLE_C = 3051, STR_GOLF_HOLE_D = 3052, STR_GOLF_HOLE_E = 3053, - STR_RIDE_DESIGN_MAZE_BRICK_WALLS = 3058, - STR_RIDE_DESIGN_MAZE_HEDGES = 3059, - STR_RIDE_DESIGN_MAZE_ICE_BLOCKS = 3060, - STR_RIDE_DESIGN_MAZE_WOODEN_FENCES = 3061, - STR_RIDE_CONSTRUCTION_STANDARD_RC_TRACK_TIP = 3062, - STR_RIDE_CONSTRUCTION_WATER_CHANNEL_TIP = 3063, STR_BEGINNER_PARKS = 3064, STR_CHALLENGING_PARKS = STR_BEGINNER_PARKS + 1, STR_EXPERT_PARKS = STR_BEGINNER_PARKS + 2, @@ -2270,77 +1180,25 @@ enum : uint16_t STR_OTHER_PARKS = STR_BEGINNER_PARKS + 4, STR_TOP_SECTION = 3069, STR_SLOPE_TO_LEVEL = 3070, - STR_SAME_PRICE_THROUGHOUT_PARK = 3071, - STR_SAME_PRICE_THROUGHOUT_PARK_TIP = 3072, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING = 3073, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING = 3074, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING = 3075, STR_PARK_RATING_WARNING_1_WEEK_REMAINING = 3076, STR_PARK_HAS_BEEN_CLOSED_DOWN = 3077, - STR_SELECT_STYLE_OF_ENTRANCE_EXIT_STATION_TIP = 3090, STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION = 3091, STR_NOT_ALLOWED_TO_MODIFY_STATION = 3092, - STR_FAVOURITE_RIDE = 3093, - STR_PEEP_FAVOURITE_RIDE_NOT_AVAILABLE = 3094, - STR_LIFT_HILL_CHAIN_SPEED = 3095, - STR_LIFT_HILL_CHAIN_SPEED_VALUE = 3096, STR_SELECT_LIFT_HILL_CHAIN_SPEED_TIP = 3097, // STR_3098 :Can't change lift hill speed... - STR_SELECT_COLOUR = 3099, - STR_SELECT_SECONDARY_COLOUR = 3100, - STR_SELECT_TERTIARY_COLOUR = 3101, - STR_SCENERY_PAINTBRUSH_TIP = 3102, STR_CANT_REPAINT_THIS = 3103, - STR_LIST_RIDES_TIP = 3104, - STR_LIST_SHOPS_AND_STALLS_TIP = 3105, - STR_LIST_KIOSKS_AND_FACILITIES_TIP = 3106, - STR_CLOSE_RIDE = 3107, - STR_TEST_RIDE = 3108, - STR_OPEN_RIDE = 3109, - STR_BLOCK_SECTIONS = 3110, - STR_CLICK_ON_DESIGN_TO_BUILD_IT_TIP = 3111, - STR_CLICK_ON_DESIGN_TO_RENAME_OR_DELETE_IT = 3112, - STR_SELECT_A_DIFFERENT_DESIGN = 3113, - STR_GO_BACK_TO_DESIGN_SELECTION_WINDOW_TIP = 3114, - STR_SAVE_TRACK_DESIGN = 3115, - STR_SAVE_TRACK_DESIGN_NOT_POSSIBLE = 3116, - STR_CALLING_MECHANIC = 3117, - STR_MEHCANIC_IS_HEADING_FOR_THE_RIDE = 3118, - STR_MEHCANIC_IS_FIXING_THE_RIDE = 3119, - STR_LOCATE_NEAREST_AVAILABLE_MECHANIC_TIP = 3120, - STR_UNABLE_TO_LOCATE_MECHANIC = 3121, - STR_FAVOURITE_RIDE_OF_GUEST = 3122, - STR_FAVOURITE_RIDE_OF_GUESTS = 3123, - STR_BROKEN = 3124, - STR_EXCITEMENT_FACTOR = 3125, - STR_INTENSITY_FACTOR = 3126, - STR_NAUSEA_FACTOR = 3127, - STR_SAVE_TRACK_DESIGN_ITEM = 3128, - STR_SAVE_TRACK_DESIGN_WITH_SCENERY_ITEM = 3129, - STR_DESIGN_SAVE = 3130, - STR_DESIGN_CANCEL = 3131, - STR_CLICK_ITEMS_OF_SCENERY_TO_SELECT = 3132, STR_ERR_UNABLE_TO_BUILD_THIS_ON_SLOPE = 3133, - STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE = 3134, - STR_VEHICLE_DESIGN_UNAVAILABLE = 3135, - STR_THIS_DESIGN_WILL_BE_BUILT_WITH_AN_ALTERNATIVE_VEHICLE_TYPE = 3136, - STR_SELECT_NEARBY_SCENERY = 3137, - STR_RESET_SELECTION = 3138, STR_CABLE_LIFT_UNABLE_TO_WORK_IN_THIS_OPERATING_MODE = 3139, STR_CABLE_LIFT_HILL_MUST_START_IMMEDIATELY_AFTER_STATION = 3140, STR_MULTICIRCUIT_NOT_POSSIBLE_WITH_CABLE_LIFT_HILL = 3141, - STR_CAPACITY = 3142, - STR_SHOW_PEOPLE_ON_MAP_TIP = 3143, - STR_SHOW_RIDES_STALLS_ON_MAP_TIP = 3144, STR_SELECT_NUMBER_OF_CIRCUITS_TIP = 3160, STR_ERR_REASON_NOT_ENOUGH_MEMORY = 3162, - STR_OBJECT_SELECTION_SELECTION_SIZE = 3164, - - STR_INCLUDES_X_OBJECTS = 3167, - STR_OBJECT_SELECTION_ERR_OBJECT_DATA_NOT_FOUND = 3169, STR_OBJECT_SELECTION_ERR_NOT_ENOUGH_SPACE_FOR_GRAPHICS = 3170, STR_OBJECT_SELECTION_ERR_TOO_MANY_OF_TYPE_SELECTED = 3171, @@ -2348,386 +1206,67 @@ enum : uint16_t STR_OBJECT_SELECTION_ERR_CURRENTLY_IN_USE = 3173, STR_OBJECT_SELECTION_ERR_IS_REQUIRED_BY_ANOTHER = 3174, STR_OBJECT_SELECTION_ERR_ALWAYS_REQUIRED = 3175, - STR_UNABLE_TO_SELECT_THIS_OBJECT = 3176, - STR_UNABLE_TO_DE_SELECT_THIS_OBJECT = 3177, STR_AT_LEAST_ONE_RIDE_OBJECT_MUST_BE_SELECTED = 3179, STR_INVALID_SELECTION_OF_OBJECTS = 3180, - STR_OBJECT_SELECTION = 3181, STR_PARK_ENTRANCE_TYPE_MUST_BE_SELECTED = 3182, STR_WATER_TYPE_MUST_BE_SELECTED = 3183, - STR_OBJECT_SELECTION_RIDE_VEHICLES_ATTRACTIONS = 3184, - STR_OBJECT_SELECTION_SMALL_SCENERY = 3185, - STR_OBJECT_SELECTION_LARGE_SCENERY = 3186, - STR_OBJECT_SELECTION_WALLS_FENCES = 3187, - STR_OBJECT_SELECTION_PATH_SIGNS = 3188, - STR_OBJECT_SELECTION_FOOTPATHS = 3189, - STR_OBJECT_SELECTION_PATH_EXTRAS = 3190, - STR_OBJECT_SELECTION_SCENERY_GROUPS = 3191, STR_OBJECT_SELECTION_PARK_ENTRANCE = 3192, - STR_OBJECT_SELECTION_WATER = 3193, - STR_INVENTION_LIST = 3195, - STR_INVENTION_RESEARCH_GROUP = 3196, - STR_INVENTION_PREINVENTED_ITEMS = 3197, - STR_INVENTION_TO_BE_INVENTED_ITEMS = 3198, - STR_RANDOM_SHUFFLE = 3199, - STR_RANDOM_SHUFFLE_TIP = 3200, - STR_EDITOR_STEP_OBJECT_SELECTION = 3201, - STR_EDITOR_STEP_LANDSCAPE_EDITOR = 3202, - STR_EDITOR_STEP_INVENTIONS_LIST_SET_UP = 3203, - STR_EDITOR_STEP_OPTIONS_SELECTION = 3204, - STR_EDITOR_STEP_OBJECTIVE_SELECTION = 3205, - STR_EDITOR_STEP_SAVE_SCENARIO = 3206, - STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER = 3207, - STR_EDITOR_STEP_TRACK_DESIGNS_MANAGER = 3208, - STR_BACK_TO_PREVIOUS_STEP = 3209, - STR_FORWARD_TO_NEXT_STEP = 3210, - STR_MAP_SIZE = 3211, - STR_POP16_COMMA16 = 3212, STR_CANT_DECREASE_MAP_SIZE_ANY_FURTHER = 3213, STR_CANT_INCREASE_MAP_SIZE_ANY_FURTHER = 3214, STR_TOO_CLOSE_TO_EDGE_OF_MAP = 3215, - STR_SELECT_PARK_OWNED_LAND_TIP = 3216, - STR_LAND_OWNED = 3217, - STR_CONSTRUCTION_RIGHTS_OWNED = 3218, - STR_LAND_SALE = 3219, - STR_CONSTRUCTION_RIGHTS_SALE = 3220, - STR_SET_LAND_TO_BE_OWNED_TIP = 3221, - STR_SET_CONSTRUCTION_RIGHTS_TO_BE_OWNED_TIP = 3222, - STR_SET_LAND_TO_BE_AVAILABLE_TIP = 3223, - STR_SET_CONSTRUCTION_RIGHTS_TO_BE_AVAILABLE_TIP = 3224, - STR_SCENERY_CLUSTER_TIP = 3225, - STR_BUILD_PARK_ENTRANCE_TIP = 3226, STR_ERR_TOO_MANY_PARK_ENTRANCES = 3227, - STR_SET_STARTING_POSITIONS_TIP = 3228, STR_BLOCK_BRAKES_CANNOT_BE_USED_DIRECTLY_AFTER_STATION = 3229, STR_BLOCK_BRAKES_CANNOT_BE_USED_DIRECTLY_AFTER_EACH_OTHER = 3230, STR_BLOCK_BRAKES_CANNOT_BE_USED_DIRECTLY_AFTER_THE_TOP_OF_THIS_LIFT_HILL = 3231, - STR_SCENARIO_OPTIONS_FINANCIAL = 3232, - STR_SCENARIO_OPTIONS_GUESTS = 3233, - STR_SCENARIO_OPTIONS_PARK = 3234, - STR_SCENARIO_OPTIONS_FINANCIAL_TIP = 3235, - STR_SCENARIO_OPTIONS_GUESTS_TIP = 3236, - STR_SCENARIO_OPTIONS_PARK_TIP = 3237, STR_MAKE_PARK_NO_MONEY = 3238, - STR_MAKE_PARK_NO_MONEY_TIP = 3239, - STR_INIT_CASH_LABEL = 3240, - STR_INIT_LOAN_LABEL = 3241, - STR_MAX_LOAN_LABEL = 3242, - STR_INTEREST_RATE_LABEL = 3243, - STR_FORBID_MARKETING = 3244, - STR_FORBID_MARKETING_TIP = 3245, - STR_CURRENCY_FORMAT_LABEL = 3246, - STR_PERCENT_FORMAT_LABEL = 3247, - STR_CANT_INCREASE_CASH = 3248, - STR_CANT_REDUCE_CASH = 3249, - STR_CANT_INCREASE_INIT_LOAN = 3250, - STR_CANT_REDUCE_INIT_LOAN = 3251, - STR_CANT_INCREASE_MAX_LOAN = 3252, - STR_CANT_REDUCE_MAX_LOAN = 3253, - STR_CANT_INCREASE_INTEREST_RATE = 3254, - STR_CANT_REDUCE_INTEREST_RATE = 3255, - 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_CASH_PER_GUEST_LABEL = 3260, - STR_GUEST_INIT_HAPPINESS = 3261, - STR_GUEST_INIT_HUNGER = 3262, - STR_GUEST_INIT_THIRST = 3263, - STR_CANT_INCREASE_FURTHER = 3264, - STR_CANT_REDUCE_FURTHER = 3265, - STR_PAY_FOR_PARK_PAY_FOR_RIDES_TIP = 3266, - STR_FORBID_TREE_REMOVAL = 3267, - STR_FORBID_TREE_REMOVAL_TIP = 3268, - STR_FORBID_LANDSCAPE_CHANGES = 3269, - STR_FORBID_LANDSCAPE_CHANGES_TIP = 3270, - STR_FORBID_HIGH_CONSTRUCTION = 3271, - STR_FORBID_HIGH_CONSTRUCTION_TIP = 3272, - STR_HARD_PARK_RATING = 3273, - STR_HARD_PARK_RATING_TIP = 3274, - STR_HARD_GUEST_GENERATION = 3275, - STR_HARD_GUEST_GENERATION_TIP = 3276, - STR_LAND_COST_LABEL = 3277, - STR_RIGHTS_COST_LABEL = 3278, - STR_FREE_PARK_ENTER = 3279, - STR_PAY_PARK_ENTER = 3280, - STR_ENTRY_PRICE_LABEL = 3281, - STR_SELECT_OBJECTIVE_AND_PARK_NAME_TIP = 3282, - STR_SELECT_RIDES_TO_BE_PRESERVED_TIP = 3283, - STR_OBJECTIVE_SELECTION = 3284, STR_OBJECTIVE_PRESERVED_RIDES_TITLE = 3285, - STR_SELECT_OBJECTIVE_FOR_THIS_SCENARIO_TIP = 3286, - STR_OBJECTIVE_WINDOW = 3287, - STR_SELECT_CLIMATE_TIP = 3288, - STR_CLIMATE_LABEL = 3289, - 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_CHANGE = 3294, - STR_CHANGE_NAME_OF_PARK_TIP = 3295, - STR_CHANGE_NAME_OF_SCENARIO_TIP = 3296, - STR_CHANGE_DETAIL_NOTES_ABOUT_PARK_SCENARIO_TIP = 3297, - STR_WINDOW_PARK_NAME = 3298, // Unused - STR_WINDOW_PARK_DETAILS = 3299, - STR_WINDOW_SCENARIO_NAME = 3300, - STR_WINDOW_OBJECTIVE_DATE = 3301, - STR_WINDOW_OBJECTIVE_VALUE_DATE = 3302, - STR_WINDOW_OBJECTIVE_GUEST_COUNT = 3303, - STR_WINDOW_OBJECTIVE_PARK_VALUE = 3304, - STR_WINDOW_OBJECTIVE_MONTHLY_INCOME = 3305, - STR_WINDOW_OBJECTIVE_MONTHLY_PROFIT = 3306, - STR_WINDOW_OBJECTIVE_MINIMUM_LENGTH = 3307, - STR_WINDOW_OBJECTIVE_EXCITEMENT_RATING = 3308, - STR_WINDOW_COLOUR_2_COMMA32 = 3309, - STR_WINDOW_COLOUR_2_LENGTH = 3310, - STR_WINDOW_COLOUR_2_COMMA2DP32 = 3311, - STR_WINDOW_PRESERVATION_ORDER = 3312, - STR_SCENARIO_NAME = 3313, - STR_ENTER_SCENARIO_NAME = 3314, - STR_PARK_SCENARIO_DETAILS = 3315, - STR_ENTER_SCENARIO_DESCRIPTION = 3316, STR_NO_DETAILS_YET = 3317, - STR_SELECT_WHICH_GROUP_THIS_SCENARIO_APPEARS_IN = 3318, - STR_WINDOW_SCENARIO_GROUP = 3319, - STR_UNABLE_TO_SAVE_SCENARIO_FILE = 3320, - - STR_OBJECTIVE = 3322, STR_WINDOW_NO_IMAGE = 3326, STR_PEEP_SPAWNS_NOT_SET = 3327, - STR_CANT_ADVANCE_TO_NEXT_EDITOR_STAGE = 3328, STR_NO_PARK_ENTRANCES = 3329, STR_PARK_MUST_OWN_SOME_LAND = 3330, STR_PARK_ENTRANCE_PATH_INCOMPLETE_OR_COMPLEX = 3331, STR_PARK_ENTRANCE_WRONG_DIRECTION_OR_NO_PATH = 3332, - STR_SAVE_PLUGIN_DATA = 3333, - STR_SAVE_PLUGIN_DATA_TIP = 3334, - STR_ROLLER_COASTER_DESIGNER_SELECT_RIDE_TYPES_VEHICLES = 3335, - STR_TRACK_DESIGNS_MANAGER_SELECT_RIDE_TYPE = 3336, - STR_CUSTOM_DESIGNED_LAYOUT = 3338, - STR_1_DESIGN_AVAILABLE = 3339, - STR_X_DESIGNS_AVAILABLE = 3340, - STR_GAME_TOOLS_TIP = 3341, - STR_SCENARIO_EDITOR = 3342, - STR_CONVERT_SAVED_GAME_TO_SCENARIO = 3343, - STR_ROLLER_COASTER_DESIGNER = 3344, - STR_TRACK_DESIGNS_MANAGER = 3345, STR_CANT_SAVE_TRACK_DESIGN = 3346, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY = 3347, - STR_TRACK_MANAGE_RENAME = 3348, - STR_TRACK_MANAGE_DELETE = 3349, - STR_TRACK_DESIGN_RENAME_TITLE = 3350, - STR_TRACK_DESIGN_RENAME_DESC = 3351, - STR_CANT_RENAME_TRACK_DESIGN = 3352, - STR_NEW_NAME_CONTAINS_INVALID_CHARACTERS = 3353, - STR_ANOTHER_FILE_EXISTS_WITH_NAME_OR_FILE_IS_WRITE_PROTECTED = 3354, - STR_FILE_IS_WRITE_PROTECTED_OR_LOCKED = 3355, - STR_DELETE_FILE = 3356, - STR_ARE_YOU_SURE_YOU_WANT_TO_PERMANENTLY_DELETE_TRACK = 3357, - STR_CANT_DELETE_TRACK_DESIGN = 3358, - STR_NO_TRACK_DESIGNS_OF_THIS_TYPE = 3359, STR_WARNING = 3360, STR_TOO_MANY_TRACK_DESIGNS_OF_THIS_TYPE = 3361, - STR_OBJECT_SELECTION_ADVANCED = 3364, - STR_OBJECT_SELECTION_ADVANCED_TIP = 3365, - STR_MAP_RIDE = 3366, - STR_MAP_FOOD_STALL = 3367, - STR_MAP_DRINK_STALL = 3368, - STR_MAP_SOUVENIR_STALL = 3369, - STR_MAP_INFO_KIOSK = 3370, - STR_MAP_FIRST_AID = 3371, - STR_MAP_CASH_MACHINE = 3372, - STR_MAP_TOILET = 3373, - STR_WARNING_TOO_MANY_OBJECTS_SELECTED = 3374, - STR_NOT_ALL_OBJECTS_IN_THIS_SCENERY_GROUP_COULD_BE_SELECTED = 3375, - STR_INSTALL_NEW_TRACK_DESIGN = 3376, - STR_INSTALL_NEW_TRACK_DESIGN_TIP = 3377, - STR_INSTALL_NEW_TRACK_DESIGN_INSTALL = 3378, - STR_INSTALL_NEW_TRACK_DESIGN_CANCEL = 3379, - STR_UNABLE_TO_INSTALL_THIS_TRACK_DESIGN = 3380, - - STR_SELECT_NEW_NAME_FOR_TRACK_DESIGN = 3383, - STR_AN_EXISTING_TRACK_DESIGN_ALREADY_HAS_THIS_NAME = 3384, - STR_SAVE_TRACK_SCENERY_UNABLE_TO_SELECT_ADDITIONAL_ITEM_OF_SCENERY = 3389, STR_SAVE_TRACK_SCENERY_TOO_MANY_ITEMS_SELECTED = 3390, - STR_CLEAR_SCENERY_TIP = 3437, STR_UNABLE_TO_REMOVE_ALL_SCENERY_FROM_HERE = 3438, - STR_CLEAR_SCENERY = 3439, STR_SET_PATROL_AREA = 3445, - STR_CLEAR_PATROL_AREA = 3446, // 3447--5119 reserved for user strings. - STR_OPENRCT2_BEGIN_STRING_ID = 5120, - - STR_FINANCES_BUTTON_ON_TOOLBAR = 5120, - STR_RESEARCH_BUTTON_ON_TOOLBAR = 5121, - STR_CHEAT_RENEW_RIDES = 5123, STR_CHEAT_MAKE_DESTRUCTABLE = 5125, - STR_OPTIONS_MUSIC_VALUE_RANDOM = 5126, - STR_DISABLE_ELEVATION = 5127, - STR_SELECTION_SIZE = 5128, - STR_ENTER_SELECTION_SIZE = 5129, - STR_MAP_SIZE_2 = 5130, - STR_ENTER_MAP_SIZE = 5131, STR_CHEAT_FIX_ALL_RIDES = 5132, - STR_ADJUST_SMALLER_LAND_RIGHTS_TIP = 5133, - STR_ADJUST_LARGER_LAND_RIGHTS_TIP = 5134, - STR_BUY_LAND_AND_CONSTRUCTION_RIGHTS_TIP = 5135, - STR_LAND_RIGHTS = 5136, STR_CHEAT_UNLOCK_OPERATING_LIMITS = 5137, - STR_SMALL_WINDOW_COLOUR_2_STRINGID = 5138, - STR_WHITE_STRING = 5139, STR_CHEAT_DISABLE_BRAKES_FAILURE = 5140, STR_CHEAT_DISABLE_BREAKDOWNS = 5141, - STR_SPEED_NORMAL = 5142, - STR_SPEED_QUICK = 5143, - STR_SPEED_FAST = 5144, - STR_SPEED_TURBO = 5145, - STR_SPEED_HYPER = 5146, - STR_CHEATS_BUTTON_ON_TOOLBAR = 5147, - STR_GAME_SPEED_TIP = 5148, - STR_CHEATS_TIP = 5149, - STR_ENABLE_DEBUGGING_TOOLS = 5150, STR_LOCALE_THOUSANDS_SEPARATOR = 5151, STR_LOCALE_DECIMAL_POINT = 5152, - STR_EDIT_THEMES_BUTTON = 5153, STR_HARDWARE_DISPLAY = 5154, // Unused STR_CHEAT_UNLOCK_PRICES = 5157, - STR_QUIT_TO_MENU = 5158, - STR_EXIT_OPENRCT2 = 5159, STR_DATE_FORMAT_MDY = 5160, - STR_DATE_FORMAT = 5161, STR_DATE_FORMAT_DAY_MONTH_YEAR = 5162, STR_DATE_FORMAT_MONTH_DAY_YEAR = 5163, - STR_FULLSCREEN_MODE = 5177, - STR_FINANCIAL_CHEATS_TIP = 5178, - STR_GUEST_CHEATS_TIP = 5179, - STR_PARK_CHEATS_TIP = 5180, - STR_RIDE_CHEATS_TIP = 5181, - STR_FORMAT_INTEGER = 5182, - STR_BASE_HEIGHT = 5183, - STR_ENTER_BASE_HEIGHT = 5184, - STR_WATER_LEVEL = 5185, - STR_ENTER_WATER_LEVEL = 5186, - STR_THEMES_WINDOW_FINANCES = 5187, - STR_THEMES_WINDOW_NEW_CAMPAIGN = 5188, - STR_THEMES_WINDOW_RESEARCH = 5189, - STR_THEMES_WINDOW_MAP = 5190, - STR_THEMES_WINDOW_VIEWPORT = 5191, - STR_THEMES_WINDOW_RECENT_NEWS = 5192, - STR_THEMES_WINDOW_LAND = 5193, - STR_THEMES_WINDOW_WATER = 5194, - STR_THEMES_WINDOW_CLEAR_SCENERY = 5195, - STR_THEMES_WINDOW_LAND_RIGHTS = 5196, - STR_THEMES_WINDOW_SCENERY = 5197, - STR_THEMES_WINDOW_FOOTPATH = 5198, - STR_THEMES_WINDOW_RIDE_CONSTRUCTION = 5199, - STR_THEMES_WINDOW_TRACK_DESIGN_PLACE = 5200, - STR_THEMES_WINDOW_CONSTRUCT_RIDE = 5201, - STR_THEMES_WINDOW_TRACK_DESIGN_LIST = 5202, - STR_THEMES_WINDOW_RIDE = 5203, - STR_THEMES_WINDOW_RIDE_LIST = 5204, - STR_THEMES_WINDOW_PEEP = 5205, - STR_THEMES_WINDOW_GUEST_LIST = 5206, - STR_THEMES_WINDOW_STAFF = 5207, - STR_THEMES_WINDOW_STAFF_LIST = 5208, - STR_THEMES_WINDOW_BANNER = 5209, - STR_THEMES_WINDOW_EDITOR_OBJECT_SELECTION = 5210, - STR_THEMES_WINDOW_EDITOR_INVENTION_LIST = 5211, - STR_THEMES_WINDOW_EDITOR_SCENARIO_OPTIONS = 5212, - STR_THEMES_WINDOW_EDTIOR_OBJECTIVE_OPTIONS = 5213, - STR_THEMES_WINDOW_MAPGEN = 5214, - STR_THEMES_WINDOW_MANAGE_TRACK_DESIGN = 5215, - STR_THEMES_WINDOW_INSTALL_TRACK = 5216, STR_CHEAT_TITLE = 5217, - STR_THEMES_WINDOW_THEMES = 5218, - STR_THEMES_WINDOW_OPTIONS = 5219, - STR_THEMES_WINDOW_KEYBOARD_SHORTCUT_LIST = 5220, - STR_THEMES_WINDOW_CHANGE_KEYBOARD_SHORTCUT = 5221, - STR_THEMES_WINDOW_LOADSAVE = 5222, - STR_THEMES_WINDOW_SAVE_PROMPT = 5223, - STR_THEMES_WINDOW_DEMOLISH_RIDE_PROMPT = 5224, - STR_THEMES_WINDOW_FIRE_PROMPT = 5225, - STR_THEMES_WINDOW_TRACK_DELETE_PROMPT = 5226, - STR_THEMES_WINDOW_LOADSAVE_OVERWRITE_PROMPT = 5227, - STR_THEMES_TAB_MAIN_TIP = 5228, - STR_THEMES_TAB_PARK_TIP = 5229, - STR_THEMES_TAB_TOOLS_TIP = 5230, - STR_THEMES_TAB_RIDES_AND_GUESTS_TIP = 5231, - STR_THEMES_TAB_EDITORS_TIP = 5232, - STR_THEMES_TAB_MISC_TIP = 5233, - STR_THEMES_TAB_PROMPTS_TIP = 5234, - STR_THEMES_TAB_SETTINGS_TIP = 5235, - STR_THEMES_HEADER_WINDOW = 5236, - STR_THEMES_HEADER_PALETTE = 5237, - STR_THEMES_LABEL_CURRENT_THEME = 5238, - STR_THEMES_ACTION_DUPLICATE = 5239, - STR_THEMES_PROMPT_ENTER_THEME_NAME = 5240, - STR_THEMES_ERR_CANT_CHANGE_THIS_THEME = 5241, - STR_THEMES_ERR_NAME_ALREADY_EXISTS = 5242, - STR_ERROR_INVALID_CHARACTERS = 5243, - STR_THEMES_TITLE = 5244, - STR_THEMES_WINDOW_TOP_TOOLBAR = 5245, - STR_THEMES_WINDOW_BOTTOM_TOOLBAR = 5246, - STR_THEMES_WINDOW_BOTTOM_TOOLBAR_TRACK_EDITOR = 5247, - STR_THEMES_WINDOW_BOTTOM_TOOLBAR_SCENARIO_EDITOR = 5248, - STR_THEMES_WINDOW_TITLE_MENU_BUTTONS = 5249, - STR_THEMES_WINDOW_TITLE_MENU_EXIT = 5250, - STR_THEMES_WINDOW_TITLE_MENU_OPTIONS = 5251, - STR_THEMES_WINDOW_TITLE_MENU_SCENARIO_SELECTION = 5252, - STR_THEMES_WINDOW_PARK_INFORMATION = 5253, - STR_THEMES_DESC_CANT_CHANGE_THIS_THEME = 5256, - STR_THEMES_ACTION_DUPLICATE_TIP = 5257, - STR_THEMES_ACTION_DELETE_TIP = 5258, - STR_THEMES_ACTION_RENAME_TIP = 5259, - STR_GIANT_SCREENSHOT = 5260, - STR_OBJECT_FILTER = 5261, STR_OBJECT_FILTER_WW = 5262, STR_OBJECT_FILTER_TT = 5263, STR_OBJECT_FILTER_CUSTOM = 5264, - STR_OBJECT_FILTER_TIP = 5265, - STR_OPTIONS_DISPLAY_TIP = 5266, - STR_OPTIONS_CULTURE_TIP = 5267, - STR_OPTIONS_AUDIO_TIP = 5268, - STR_OPTIONS_CONTROLS_AND_INTERFACE_TIP = 5269, - STR_OPTIONS_MISCELLANEOUS_TIP = 5270, - STR_CLEAR_SCENERY_REMOVE_SMALL_SCENERY_TIP = 5272, - STR_CLEAR_SCENERY_REMOVE_LARGE_SCENERY_TIP = 5273, - STR_CLEAR_SCENERY_REMOVE_FOOTPATHS_TIP = 5274, STR_OBJECT_SEARCH = 5275, // Unused (commented out) STR_OBJECT_SEARCH_DESC = 5276, // Unused (commented out) - STR_OBJECT_SEARCH_CLEAR = 5277, STR_CHEAT_SANDBOX_MODE = 5278, STR_CHEAT_SANDBOX_MODE_DISABLE = 5279, STR_CHEAT_SANDBOX_MODE_TIP = 5280, - STR_THEMES_TAB_FEATURES_TIP = 5281, - STR_THEMES_OPTION_RCT1_RIDE_CONTROLS = 5282, - STR_THEMES_OPTION_RCT1_PARK_CONTROLS = 5283, - STR_THEMES_OPTION_RCT1_SCENARIO_SELECTION_FONT = 5284, - STR_DEBUG_RIDE_ALREADY_BROKEN = 5287, - STR_DEBUG_RIDE_IS_CLOSED = 5288, - STR_DEBUG_NO_BREAKDOWNS_AVAILABLE = 5289, - STR_DEBUG_FIX_RIDE = 5290, - STR_DEBUG_CANT_FORCE_BREAKDOWN = 5291, - STR_DEBUG_FORCE_BREAKDOWN_TIP = 5292, - STR_CLOSE_RIDE_TIP = 5293, - STR_TEST_RIDE_TIP = 5294, - STR_OPEN_RIDE_TIP = 5295, - STR_CLOSE_PARK_TIP = 5296, - STR_OPEN_PARK_TIP = 5297, - STR_RED_STRINGID = 5298, - STR_LIGHTPINK_STRINGID = 5299, - STR_QUICK_FIRE_STAFF = 5300, STR_CHEAT_CLEAR_LOAN_TIP = 5301, STR_CHEAT_CLEAR_LOAN = 5302, STR_CHEAT_BUILD_IN_PAUSE_MODE = 5303, @@ -2737,244 +1276,54 @@ enum : uint16_t STR_TITLE_SEQUENCE_RCT1_AA_LL = 5307, STR_TITLE_SEQUENCE_RCT2 = 5308, STR_TITLE_SEQUENCE_OPENRCT2 = 5309, - STR_TITLE_SEQUENCE_RANDOM = 5310, - STR_DEBUG_TIP = 5311, - STR_DEBUG_DROPDOWN_CONSOLE = 5312, - STR_DEBUG_DROPDOWN_TILE_INSPECTOR = 5313, - STR_TILE_INSPECTOR_TITLE = 5314, - STR_TILE_INSPECTOR_ENTRANCE_TYPE_RIDE_ENTRANCE = 5335, - STR_TILE_INSPECTOR_ENTRANCE_TYPE_RIDE_EXIT = 5336, - STR_TILE_INSPECTOR_ENTRANCE_TYPE_PARK_ENTRANC = 5337, - STR_TILE_INSPECTOR_ELEMENT_TYPE = 5338, - STR_TILE_INSPECTOR_BASE_HEIGHT = 5339, - STR_TILE_INSPECTOR_CLEARANCE_HEIGHT = 5340, - STR_AUTO_STAFF_PLACEMENT = 5343, STR_CHANGELOG_TITLE = 5344, - STR_CHEAT_TITLE_FINANCIAL = 5345, - STR_CHEAT_TITLE_GUEST = 5346, - STR_CHEAT_TITLE_PARK = 5347, - STR_CHEAT_TITLE_RIDE = 5348, - STR_OBJECT_FILTER_ALL_RIDES_TIP = 5349, - STR_MAX = 5350, - STR_MIN = 5351, - STR_CHEAT_GUEST_HAPPINESS = 5352, - STR_CHEAT_GUEST_ENERGY = 5353, - STR_CHEAT_GUEST_HUNGER = 5354, - STR_CHEAT_GUEST_THIRST = 5355, - STR_CHEAT_GUEST_NAUSEA = 5356, - STR_CHEAT_GUEST_NAUSEA_TOLERANCE = 5357, - STR_CHEAT_GUEST_TOILET = 5358, STR_CHEAT_REMOVE_ALL_GUESTS = 5359, - STR_CHEAT_REMOVE_ALL_GUESTS_TIP = 5360, STR_CHEAT_GIVE_ALL_GUESTS = 5361, - STR_CHEAT_GUEST_PREFERRED_INTENSITY = 5362, - STR_CHEAT_MORE_THAN_1 = 5363, - STR_CHEAT_LESS_THAN_15 = 5364, STR_CHEAT_STAFF_SPEED = 5365, - STR_NORMAL = 5366, - STR_FAST = 5367, STR_CHEAT_RESET_CRASH_STATUS = 5368, - STR_DEBUG_DROPDOWN_OBJECT_SELECTION = 5371, - STR_INVERT_RIGHT_MOUSE_DRAG = 5372, - STR_NAME = 5373, - STR_DATE = 5374, STR_UP = 5375, STR_DOWN = 5376, STR_ERROR_EXISTING_NAME = 5404, - STR_MINIMISE_FULLSCREEN_ON_FOCUS_LOSS = 5440, STR_FORCE_PARK_RATING = 5442, - STR_OBJECTS_SORT_TYPE = 5447, - STR_OBJECTS_SORT_RIDE = 5448, - STR_SHORTCUT_REDUCE_GAME_SPEED = 5449, - STR_SHORTCUT_INCREASE_GAME_SPEED = 5450, - STR_SHORTCUT_OPEN_CHEATS_WINDOW = 5451, - STR_SHORTCUT_TOGGLE_VISIBILITY_OF_TOOLBARS = 5452, - STR_SELECT_OTHER_RIDE = 5453, - STR_UNCAP_FPS = 5454, - STR_ENABLE_SANDBOX_MODE = 5455, STR_DISABLE_CLEARANCE_CHECKS = 5456, STR_DISABLE_SUPPORT_LIMITS = 5457, - STR_ROTATE_CLOCKWISE = 5458, - STR_ROTATE_ANTI_CLOCKWISE = 5459, - STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE = 5460, STR_CHEAT_SET_GUESTS_PARAMETERS = 5461, - STR_CURRENCY_FORMAT = 5462, STR_CHEAT_HAVE_FUN = 5463, - STR_CHEAT_GENERAL_GROUP = 5464, - STR_CHEAT_WEATHER_GROUP = 5465, - STR_CHEAT_STAFF_GROUP = 5466, STR_ALT_PLUS = 5467, - STR_SHOW_RECENT_MESSAGES_ON_TOOLBAR = 5468, - STR_SHORTCUT_SCROLL_MAP_UP = 5469, - STR_SHORTCUT_SCROLL_MAP_LEFT = 5470, - STR_SHORTCUT_SCROLL_MAP_DOWN = 5471, - STR_SHORTCUT_SCROLL_MAP_RIGHT = 5472, - STR_CYCLE_DAY_NIGHT = 5473, - STR_UPPERCASE_BANNERS = 5474, - STR_X_WEEKS = 5475, - STR_HARDWARE_GROUP = 5476, - STR_RENDERING_GROUP = 5477, - STR_CONTROLS_GROUP = 5478, - STR_TOOLBAR_BUTTONS_GROUP = 5479, - STR_SHOW_TOOLBAR_BUTTONS_FOR = 5480, - STR_THEMES_GROUP = 5481, - STR_TIME_SINCE_LAST_INSPECTION_MINUTE = 5482, - STR_X_WEEKS_REMAINING = 5483, - STR_1_WEEK_REMAINING = 5484, - STR_BOTTOM_TOOLBAR_NEWS_TEXT = 5485, - STR_LAND_TOOL_SIZE_VALUE = 5486, - STR_SHOW_RECENT_MESSAGES_TIP = 5487, - STR_TRACKED_GUESTS_ONLY_TIP = 5489, - STR_AUDIO_FOCUS = 5490, - STR_DEBUG_DROPDOWN_INVENTIONS_LIST = 5491, - STR_DEBUG_DROPDOWN_SCENARIO_OPTIONS = 5492, - STR_SEND_MESSAGE = 5493, STR_PLAYER_LIST = 5495, // Unused - STR_PLAYER = 5496, - STR_PING = 5497, STR_SERVER_LIST = 5498, - STR_PLAYER_NAME = 5499, - STR_ADD_SERVER = 5500, - STR_START_SERVER = 5501, STR_MULTIPLAYER = 5502, - STR_ENTER_HOSTNAME_OR_IP_ADDRESS = 5503, - STR_SHOW_MULTIPLAYER_STATUS_TIP = 5504, STR_UNABLE_TO_CONNECT_TO_SERVER = 5505, STR_CHEAT_IGNORE_INTENSITY = 5506, STR_OPTIONS_SOUND_VALUE_DEFAULT = 5510, STR_OPTIONS_SOUND_VALUE_UNKNOWN = 5511, - STR_SAVE_GAME_AS = 5512, STR_SHORTCUT_QUICK_SAVE_GAME = 5513, STR_CHEAT_DISABLE_VANDALISM = 5514, - STR_CHEAT_DISABLE_VANDALISM_TIP = 5515, - STR_COLOUR_BLACK_TIP = 5516, - STR_COLOUR_GREY_TIP = 5517, - STR_COLOUR_WHITE_TIP = 5518, - STR_COLOUR_DARK_PURPLE_TIP = 5519, - STR_COLOUR_LIGHT_PURPLE_TIP = 5520, - STR_COLOUR_BRIGHT_PURPLE_TIP = 5521, - STR_COLOUR_DARK_BLUE_TIP = 5522, - STR_COLOUR_LIGHT_BLUE_TIP = 5523, - STR_COLOUR_ICY_BLUE_TIP = 5524, - STR_COLOUR_TEAL_TIP = 5525, - STR_COLOUR_AQUAMARINE_TIP = 5526, - STR_COLOUR_SATURATED_GREEN_TIP = 5527, - STR_COLOUR_DARK_GREEN_TIP = 5528, - STR_COLOUR_MOSS_GREEN_TIP = 5529, - STR_COLOUR_BRIGHT_GREEN_TIP = 5530, - STR_COLOUR_OLIVE_GREEN_TIP = 5531, - STR_COLOUR_DARK_OLIVE_GREEN_TIP = 5532, - STR_COLOUR_BRIGHT_YELLOW_TIP = 5533, - STR_COLOUR_YELLOW_TIP = 5534, - STR_COLOUR_DARK_YELLOW_TIP = 5535, - STR_COLOUR_LIGHT_ORANGE_TIP = 5536, - STR_COLOUR_DARK_ORANGE_TIP = 5537, - STR_COLOUR_LIGHT_BROWN_TIP = 5538, - STR_COLOUR_SATURATED_BROWN_TIP = 5539, - STR_COLOUR_DARK_BROWN_TIP = 5540, - STR_COLOUR_SALMON_PINK_TIP = 5541, - STR_COLOUR_BORDEAUX_RED_TIP = 5542, - STR_COLOUR_SATURATED_RED_TIP = 5543, - STR_COLOUR_BRIGHT_RED_TIP = 5544, - STR_COLOUR_DARK_PINK_TIP = 5545, - STR_COLOUR_BRIGHT_PINK_TIP = 5546, - STR_COLOUR_LIGHT_PINK_TIP = 5547, STR_CHEAT_SHOW_ALL_OPERATING_MODES = 5548, STR_DATE_FORMAT_YEAR_MONTH_DAY = 5549, STR_DATE_FORMAT_YMD = 5550, STR_DATE_FORMAT_YEAR_DAY_MONTH = 5551, STR_DATE_FORMAT_YDM = 5552, - STR_STEAM_OVERLAY_PAUSE = 5553, - STR_ENABLE_MOUNTAIN_TOOL_TIP = 5554, STR_CHEAT_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES = 5555, - STR_KICK_PLAYER_TIP = 5556, - STR_STAY_CONNECTED_AFTER_DESYNC = 5557, - STR_RESTART_REQUIRED = 5558, STR_CHEAT_10_MINUTE_INSPECTIONS = 5559, - STR_CHEAT_10_MINUTE_INSPECTIONS_TIP = 5560, - STR_LANGUAGE_LOAD_FAILED = 5561, - STR_WARNING_IN_CAPS = 5562, - STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE = 5563, - STR_PASSWORD = 5566, - STR_ADVERTISE = 5567, - STR_PASSWORD_REQUIRED = 5568, - STR_PASSWORD_REQUIRED_DESC = 5569, - STR_FETCH_SERVERS = 5570, - STR_JOIN_GAME = 5571, - STR_ADD_TO_FAVOURITES = 5572, - STR_REMOVE_FROM_FAVOURITES = 5573, - STR_SERVER_NAME = 5574, - STR_MAX_PLAYERS = 5575, - STR_PORT = 5576, STR_WON = 5577, STR_ROUBLE = 5578, - STR_UI_SCALING_DESC = 5579, STR_CZECH_KORUNA = 5580, - STR_SHOW_FPS = 5581, - STR_TRAP_MOUSE = 5582, STR_UNIT_SUFFIX_METRES_PER_SECOND = 5583, - STR_SI = 5584, - STR_CHEAT_UNLOCK_OPERATING_LIMITS_TIP = 5585, - STR_AUTO_OPEN_SHOPS = 5586, - STR_AUTO_OPEN_SHOPS_TIP = 5587, - STR_SHOW_MULTIPLAYER_TIP = 5588, - STR_NOTIFICATION_SETTINGS = 5589, - STR_NOTIFICATION_PARK_AWARD = 5590, - STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED = 5591, - STR_NOTIFICATION_PARK_WARNINGS = 5592, - STR_NOTIFICATION_PARK_RATING_WARNINGS = 5593, - STR_NOTIFICATION_RIDE_BROKEN_DOWN = 5594, - STR_NOTIFICATION_RIDE_CRASHED = 5595, - STR_NOTIFICATION_RIDE_WARNINGS = 5596, - STR_NOTIFICATION_RIDE_RESEARCHED = 5597, - STR_NOTIFICATION_GUEST_WARNINGS = 5598, - STR_NOTIFICATION_GUEST_LEFT_PARK = 5600, - STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE = 5601, - STR_NOTIFICATION_GUEST_ON_RIDE = 5602, - STR_NOTIFICATION_GUEST_LEFT_RIDE = 5603, - STR_NOTIFICATION_GUEST_BOUGHT_ITEM = 5604, - STR_NOTIFICATION_GUEST_USED_FACILITY = 5605, - STR_NOTIFICATION_GUEST_DIED = 5606, - STR_TILE_INSPECTOR_BASE_HEIGHT_SHORT = 5608, - STR_TILE_INSPECTOR_CLEARANGE_HEIGHT_SHORT = 5609, - STR_REMOVE_SELECTED_ELEMENT_TIP = 5610, - STR_TILE_INSPECTOR_FLAG_GHOST_SHORT = 5611, - STR_TILE_INSPECTOR_FLAG_GHOST = 5612, STR_TILE_INSPECTOR_FLAG_BROKEN_SHORT = 5613, STR_TILE_INSPECTOR_FLAG_BROKEN = 5614, - STR_TILE_INSPECTOR_FLAG_LAST_SHORT = 5615, - STR_TILE_INSPECTOR_FLAG_LAST = 5616, - STR_MOVE_SELECTED_ELEMENT_UP_TIP = 5617, - STR_MOVE_SELECTED_ELEMENT_DOWN_TIP = 5618, STR_SCENARIO_CATEGORY_RCT1 = 5619, STR_SCENARIO_CATEGORY_RCT1_AA = 5620, STR_SCENARIO_CATEGORY_RCT1_LL = 5621, - STR_SCENARIO_CATEGORY_RCT2 = 5622, - STR_SCENARIO_CATEGORY_RCT2_WW = 5623, - STR_SCENARIO_CATEGORY_RCT2_TT = 5624, - STR_SCENARIO_CATEGORY_REAL_PARKS = 5625, - STR_SCENARIO_CATEGORY_OTHER_PARKS = 5626, - STR_OPTIONS_SCENARIO_GROUPING = 5627, - STR_OPTIONS_SCENARIO_ORIGIN = 5628, - STR_OPTIONS_SCENARIO_DIFFICULTY = 5629, - STR_OPTIONS_SCENARIO_UNLOCKING = 5630, STR_DLC_PARKS = 5631, STR_BUILD_YOUR_OWN_PARKS = 5632, STR_CMD_PLUS = 5633, STR_OPTION_PLUS = 5634, - STR_MONEY_SPENT = 5635, - STR_COMMANDS_RAN = 5636, STR_CANT_DO_THIS = 5637, STR_PERMISSION_DENIED = 5638, - STR_PLAYERS_TIP = 5639, - STR_GROUPS_TIP = 5640, - STR_DEFAULT_GROUP = 5641, - STR_GROUP = 5642, - STR_ADD_GROUP = 5643, - STR_REMOVE_GROUP = 5644, STR_ACTION_CHAT = 5645, STR_ACTION_TERRAFORM = 5646, STR_ACTION_TOGGLE_PAUSE = 5647, @@ -2992,46 +1341,23 @@ enum : uint16_t STR_ACTION_KICK_PLAYER = 5659, STR_ACTION_MODIFY_GROUPS = 5660, STR_ACTION_SET_PLAYER_GROUP = 5661, - STR_ACTION_NA = 5662, STR_ACTION_CLEAR_LANDSCAPE = 5663, STR_ACTION_CHEAT = 5664, STR_ACTION_TOGGLE_SCENERY_CLUSTER = 5665, STR_ACTION_PASSWORDLESS_LOGIN = 5666, // Empty block - STR_LAST_ACTION_RAN = 5701, - STR_LOCATE_PLAYER_TIP = 5702, STR_CANT_KICK_THE_HOST = 5703, - STR_LAST_ACTION = 5704, STR_CANT_SET_TO_THIS_GROUP = 5705, STR_CANT_REMOVE_GROUP_THAT_PLAYERS_BELONG_TO = 5706, STR_THIS_GROUP_CANNOT_BE_MODIFIED = 5707, STR_CANT_CHANGE_GROUP_THAT_THE_HOST_BELONGS_TO = 5708, - STR_RENAME_GROUP = 5709, - STR_GROUP_NAME = 5710, - STR_ENTER_NEW_NAME_FOR_THIS_GROUP = 5711, STR_CANT_MODIFY_PERMISSION_THAT_YOU_DO_NOT_HAVE_YOURSELF = 5712, // STR_5713 :Kick Player (unused) - STR_SHORTCUT_SHOW_OPTIONS = 5714, - STR_NEW_GAME = 5715, STR_NOT_ALLOWED_IN_MULTIPLAYER = 5716, // Unused - STR_NETWORK_VERSION = 5717, - STR_NETWORK_VERSION_TIP = 5718, - STR_SUNNY = 5719, - STR_PARTIALLY_CLOUDY = STR_SUNNY + 1, - STR_CLOUDY = STR_SUNNY + 2, - STR_RAIN = STR_SUNNY + 3, - STR_HEAVY_RAIN = STR_SUNNY + 4, - STR_THUNDERSTORM = STR_SUNNY + 5, STR_CHANGE_WEATHER = 5725, - STR_CHANGE_WEATHER_TOOLTIP = 5726, - STR_OPTIONS_RENDERING_TIP = 5734, - STR_THEMES_WINDOW_NETWORK_STATUS = 5735, - STR_THEMES_WINDOW_PLAYER = 5736, STR_CLOSED_WITH_PERSON = 5737, STR_CLOSED_WITH_PEOPLE = 5738, - STR_CUSTOMERS_ON_RIDE = 5739, STR_CHEAT_NEVERENDING_MARKETING = 5740, - STR_CHEAT_NEVERENDING_MARKETING_TIP = 5741, STR_MULTIPLAYER_AUTHENTICATING = 5742, STR_MULTIPLAYER_CONNECTING = 5743, STR_MULTIPLAYER_RESOLVING = 5744, @@ -3057,290 +1383,45 @@ enum : uint16_t STR_INVALID_RIDE_TYPE = 5764, STR_CANT_EDIT_INVALID_RIDE_TYPE = 5765, STR_HUNGARIAN_FORINT = 5766, - STR_RIDE_LIST_INCOME = 5767, - STR_RIDE_LIST_TOTAL_CUSTOMERS = 5768, - STR_RIDE_LIST_TOTAL_PROFIT = 5769, - STR_RIDE_LIST_CUSTOMERS_PER_HOUR = 5770, - STR_RIDE_LIST_RUNNING_COST = 5771, - STR_RIDE_LIST_AGE = 5772, - STR_RIDE_LIST_TOTAL_CUSTOMERS_LABEL = 5773, - STR_RIDE_LIST_TOTAL_PROFIT_LABEL = 5774, - STR_RIDE_LIST_CUSTOMERS_PER_HOUR_LABEL = 5775, - STR_RIDE_LIST_BUILT_THIS_YEAR_LABEL = 5776, - STR_RIDE_LIST_BUILT_LAST_YEAR_LABEL = 5777, - STR_RIDE_LIST_BUILT_X_YEARS_AGO_LABEL = 5778, - STR_RIDE_LIST_INCOME_LABEL = 5779, - STR_RIDE_LIST_RUNNING_COST_LABEL = 5780, - STR_RIDE_LIST_RUNNING_COST_UNKNOWN = 5781, STR_MULTIPLAYER_CONNECTED_CHAT_HINT = 5782, - STR_SCENARIO_LOCKED = 5783, - STR_SCENARIO_LOCKED_DESC = 5784, STR_CANT_RENAME_GROUP = 5785, STR_INVALID_GROUP_NAME = 5786, - STR_X_PLAYERS_ONLINE = 5787, - STR_DEFAULT_INSPECTION_INTERVAL = 5788, - STR_DISABLE_LIGHTNING_EFFECT = 5789, STR_CHEAT_UNLOCK_PRICES_TIP = 5790, - STR_CHEAT_RENEW_RIDES_TIP = 5791, - STR_CHEAT_FIX_ALL_RIDES_TIP = 5792, - STR_CHEAT_RESET_CRASH_STATUS_TIP = 5793, - STR_CHEAT_MAKE_DESTRUCTABLE_TIP = 5794, - STR_CHEAT_IGNORE_INTENSITY_TIP = 5795, - STR_CHEAT_OPEN_PARK_TIP = 5796, - STR_CHEAT_FREEZE_WEATHER_TIP = 5797, - STR_CHEAT_BUILD_IN_PAUSE_MODE_TIP = 5798, - STR_CHEAT_DISABLE_BRAKES_FAILURE_TIP = 5799, - STR_CHEAT_DISABLE_BREAKDOWNS_TIP = 5800, STR_CHEAT_DISABLE_LITTERING = 5801, - STR_CHEAT_DISABLE_LITTERING_TIP = 5802, - STR_ROTATE_SELECTED_ELEMENT_TIP = 5803, - STR_SHORTCUT_MUTE_SOUND = 5804, - STR_ADVERTISE_SERVER_TIP = 5805, - STR_SHORTCUT_WINDOWED_MODE_TOGGLE = 5806, - STR_NUMBER_RIDES = 5807, - STR_NUMBER_SHOPS_AND_STALLS = 5808, - STR_NUMBER_TOILETS_AND_INFORMATION_KIOSKS = 5809, STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT = 5810, - STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT_TIP = 5811, - STR_SHORTCUT_SHOW_MULTIPLAYER = 5812, - STR_TRACK_LIST_NAME_FORMAT = 5813, - STR_TRACK_PREVIEW_NAME_FORMAT = 5814, - STR_SHOW_FPS_TIP = 5815, - STR_WINDOW_SCALE_TIP = 5816, - STR_STEAM_OVERLAY_PAUSE_TIP = 5819, - STR_MINIMISE_FULLSCREEN_ON_FOCUS_LOSS_TIP = 5820, - STR_CYCLE_DAY_NIGHT_TIP = 5822, - STR_UPPERCASE_BANNERS_TIP = 5823, - STR_DISABLE_LIGHTNING_EFFECT_TIP = 5824, - STR_TRAP_MOUSE_TIP = 5825, - STR_INVERT_RIGHT_MOUSE_DRAG_TIP = 5826, - STR_CURRENT_THEME_TIP = 5827, - STR_DISTANCE_AND_SPEED_TIP = 5828, - STR_CURRENCY_TIP = 5829, - STR_LANGUAGE_TIP = 5830, - STR_TEMPERATURE_FORMAT_TIP = 5831, - STR_HEIGHT_LABELS_UNITS_TIP = 5832, - STR_DATE_FORMAT_TIP = 5833, - STR_AUDIO_DEVICE_TIP = 5834, - STR_AUDIO_FOCUS_TIP = 5835, - STR_TITLE_MUSIC_TIP = 5836, - STR_EDIT_THEMES_BUTTON_TIP = 5837, - STR_FINANCES_BUTTON_ON_TOOLBAR_TIP = 5838, - STR_RESEARCH_BUTTON_ON_TOOLBAR_TIP = 5839, - STR_CHEATS_BUTTON_ON_TOOLBAR_TIP = 5840, - STR_SHOW_RECENT_MESSAGES_ON_TOOLBAR_TIP = 5841, - STR_SCENARIO_GROUPING_TIP = 5842, - STR_SCENARIO_UNLOCKING_TIP = 5843, - STR_STAY_CONNECTED_AFTER_DESYNC_TIP = 5844, - STR_ENABLE_DEBUGGING_TOOLS_TIP = 5845, - STR_AUTOSAVE_FREQUENCY_TIP = 5846, - STR_TITLE_SEQUENCE_TIP = 5847, - STR_AUTO_STAFF_PLACEMENT_TIP = 5849, STR_HANDYMEN_MOW_BY_DEFAULT_TIP = 5850, - STR_DEFAULT_INSPECTION_INTERVAL_TIP = 5851, - STR_SOUND_EFFECTS_TIP = 5853, - STR_RIDE_MUSIC_TIP = 5854, - STR_FULLSCREEN_MODE_TIP = 5855, - STR_DISPLAY_RESOLUTION_TIP = 5856, - STR_OPTIONS_TIP = 5857, STR_HARDWARE_DISPLAY_TIP = 5858, // Unused - STR_UNCAP_FPS_TIP = 5859, STR_SHORTCUT_PAINT_ORIGINAL = 5860, STR_MULTIPLAYER_VERIFICATION_FAILURE = 5861, - STR_ALLOW_KNOWN_KEYS_ONLY = 5862, - STR_ALLOW_KNOWN_KEYS_ONLY_TIP = 5863, STR_MULTIPLAYER_UNKNOWN_KEY_DISALLOWED = 5864, - STR_LOG_CHAT = 5865, - STR_LOG_CHAT_TIP = 5866, - STR_PROVIDER_NAME = 5867, - STR_PROVIDER_EMAIL = 5868, - STR_PROVIDER_WEBSITE = 5869, - STR_SHOW_SERVER_INFO_TIP = 5870, STR_CHEAT_DISABLE_PLANT_AGING = 5871, - STR_CHEAT_DISABLE_PLANT_AGING_TIP = 5872, STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK = 5873, - STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK_TIP = 5874, - STR_DRAWING_ENGINE = 5875, - STR_DRAWING_ENGINE_TIP = 5876, STR_DRAWING_ENGINE_SOFTWARE = 5877, STR_DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY = 5878, STR_DRAWING_ENGINE_OPENGL = 5879, - STR_SELECTED_ONLY = 5880, - STR_NON_SELECTED_ONLY = 5881, STR_CUSTOM_CURRENCY = 5882, - STR_CUSTOM_CURRENCY_WINDOW_TITLE = 5883, - STR_RATE = 5884, - STR_CUSTOM_CURRENCY_EQUIVALENCY = 5885, - STR_CURRENCY_SYMBOL_TEXT = 5886, - STR_PREFIX = 5887, - STR_SUFFIX = 5888, - STR_CUSTOM_CURRENCY_SYMBOL_INPUT_TITLE = 5889, - STR_CUSTOM_CURRENCY_SYMBOL_INPUT_DESC = 5890, - STR_LOADSAVE_DEFAULT = 5891, - STR_LOADSAVE_DEFAULT_TIP = 5892, - STR_RATE_INPUT_TITLE = 5893, - STR_RATE_INPUT_DESC = 5894, - STR_FILE_DIALOG_TITLE_SAVE_TRACK = 5895, - STR_TRACK_SAVE_FAILED = 5896, - STR_TRACK_LOAD_FAILED_ERROR = 5898, - STR_SHORTCUT_DEBUG_PAINT_TOGGLE = 5899, STR_DEBUG_PAINT_USE_OLD_DRAWING = 5900, - STR_DEBUG_PAINT_SHOW_SEGMENT_HEIGHTS = 5901, - STR_DEBUG_PAINT_SHOW_BOUND_BOXES = 5902, - STR_DEBUG_DROPDOWN_DEBUG_PAINT = 5903, STR_CHEAT_RESET_DATE = 5904, - STR_MAP_GENERATOR_TIP = 5905, - STR_ZOOM_TO_CURSOR = 5906, - STR_ZOOM_TO_CURSOR_TIP = 5907, STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES = 5908, - STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES_TIP = 5909, STR_APPLY = 5910, - STR_SEE_THROUGH_PATHS = 5911, - STR_SHORTCUT_SEE_THROUGH_PATHS_TOGGLE = 5912, - STR_CHAT = 5913, STR_RIDE_DESCRIPTION_UNKNOWN = 5914, STR_MULTIPLAYER_DEFAULT_NAME = 5915, - STR_MULTIPLAYER_PLAYER_COUNT = 5916, - STR_MULTIPLAYER_PLAYER_COUNT_PLURAL = 5917, - STR_SERVER_MAX_PLAYERS_VALUE = 5918, - STR_COMMA16 = 5919, - STR_RENDER_WEATHER_EFFECTS = 5920, - STR_RENDER_WEATHER_EFFECTS_TIP = 5921, - STR_MAX_VEHICLES_TIP = 5922, - STR_MAX_CARS_PER_TRAIN_TIP = 5923, - STR_TILE_INSPECTOR_GROUPBOX_SURFACE_INFO = 5924, - STR_TILE_INSPECTOR_GROUPBOX_PATH_INFO = 5925, - STR_TILE_INSPECTOR_GROUPBOX_TRACK_INFO = 5926, - STR_TILE_INSPECTOR_GROUPBOX_SCENERY_INFO = 5927, - STR_TILE_INSPECTOR_GROUPBOX_ENTRANCE_INFO = 5928, - STR_TILE_INSPECTOR_GROUPBOX_WALL_INFO = 5929, STR_TILE_INSPECTOR_GROUPBOX_LARGE_SCENERY_INFO = 5930, - STR_TILE_INSPECTOR_GROUPBOX_BANNER_INFO = 5931, - STR_TILE_INSPECTOR_GROUPBOX_PROPERTIES = 5933, - STR_TILE_INSPECTOR_SURFACE_TERAIN = 5934, - STR_TILE_INSPECTOR_SURFACE_EDGE = 5935, - STR_TILE_INSPECTOR_SURFACE_OWNERSHIP = 5936, - STR_TILE_INSPECTOR_LAND_NOT_OWNED_AND_NOT_AVAILABLE = 5937, - STR_TILE_INSPECTOR_SURFACE_WATER_LEVEL = 5938, - STR_TILE_INSPECTOR_SURFACE_REMOVE_FENCES = 5939, - STR_TILE_INSPECTOR_SURFACE_RESTORE_FENCES = 5940, - STR_TILE_INSPECTOR_BASE_HEIGHT_FULL = 5941, - STR_TILE_INSPECTOR_PATH_NAME = 5942, - STR_TILE_INSPECTOR_PATH_ADDITIONS = 5943, - STR_TILE_INSPECTOR_PATH_ADDITIONS_NONE = 5944, - STR_TILE_INSPECTOR_PATH_CONNECTED_EDGES = 5945, - STR_TILE_INSPECTOR_TRACK_RIDE_TYPE = 5946, - STR_TILE_INSPECTOR_TRACK_RIDE_ID = 5947, - STR_TILE_INSPECTOR_TRACK_RIDE_NAME = 5948, - STR_TILE_INSPECTOR_TRACK_CHAIN_LIFT = 5949, - STR_TILE_INSPECTOR_TRACK_ENTIRE_TRACK_PIECE = 5950, - STR_TILE_INSPECTOR_TRACK_PIECE_ID = 5951, - STR_TILE_INSPECTOR_TRACK_SEQUENCE = 5952, - STR_TILE_INSPECTOR_SORT_TIP = 5953, - STR_TILE_INSPECTOR_SCENERY_AGE = 5954, - STR_TILE_INSPECTOR_SCENERY_QUADRANT = 5955, - STR_TILE_INSPECTOR_SCENERY_QUADRANT_SW = 5956, - STR_TILE_INSPECTOR_SCENERY_QUADRANT_NW = 5957, - STR_TILE_INSPECTOR_SCENERY_QUADRANT_NE = 5958, - STR_TILE_INSPECTOR_SCENERY_QUADRANT_SE = 5959, - STR_TILE_INSPECTOR_SCENERY_QUADRANT_LABEL = 5960, - STR_TILE_INSPECTOR_SCENERY_ENTRY_IDX = 5961, - STR_TILE_INSPECTOR_COLLISSION = 5962, - STR_TILE_INSPECTOR_SURFACE_CORNERS = 5963, - STR_TILE_INSPECTOR_SURFACE_DIAGONAL = 5964, - STR_TILE_INSPECTOR_ENTRANCE_TYPE = 5965, - STR_TILE_INSPECTOR_ENTRANCE_PART = 5966, - STR_TILE_INSPECTOR_ENTRANCE_MIDDLE = 5967, - STR_TILE_INSPECTOR_ENTRANCE_LEFT = 5968, - STR_TILE_INSPECTOR_ENTRANCE_RIGHT = 5969, - STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID = 5970, - STR_TILE_INSPECTOR_ENTRANCE_EXIT_ID = 5971, - STR_TILE_INSPECTOR_ENTRANCE_RIDE_ID = 5972, STR_TILE_INSPECTOR_CLAMP_TO_NEXT = 5973, STR_TILE_INSPECTOR_CLAMP_TO_NEXT_TIP = 5974, - STR_TILE_INSPECTOR_WALL_SLOPE = 5975, - STR_TILE_INSPECTOR_WALL_FLAT = 5976, - STR_TILE_INSPECTOR_WALL_SLOPED_LEFT = 5977, - STR_TILE_INSPECTOR_WALL_SLOPED_RIGHT = 5978, - STR_TILE_INSPECTOR_WALL_TYPE = 5979, - STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT = 5980, - STR_TILE_INSPECTOR_ENTRY_BANNER_NONE = 5981, - STR_TILE_INSPECTOR_LARGE_SCENERY_TYPE = 5982, - STR_TILE_INSPECTOR_LARGE_SCENERY_PIECE_ID = 5983, - STR_TILE_INSPECTOR_BANNER_BLOCKED_PATHS = 5984, - STR_FILEBROWSER_ACTION_NEW_FOLDER = 5985, - STR_FILEBROWSER_FOLDER_NAME_PROMPT = 5986, - STR_UNABLE_TO_CREATE_FOLDER = 5987, - STR_NO_LAND_RIGHTS_FOR_SALE_TIP = 5988, - STR_NO_CONSTRUCTION_RIGHTS_FOR_SALE_TIP = 5989, STR_NO_LAND_OR_CONSTRUCTION_RIGHTS_FOR_SALE_TIP = 5990, STR_CANT_PASTE = 5991, STR_TILE_ELEMENT_LIMIT_REACHED = 5992, - STR_TILE_INSPECTOR_COPY_TIP = 5993, - STR_TILE_INSPECTOR_PASTE_TIP = 5994, STR_BOOSTER = 5995, - STR_RIDE_CONSTRUCTION_BOOSTER_SPEED = 5996, - STR_ADD_SET_MONEY = 5997, - STR_ADD_MONEY = 5998, STR_SET_MONEY = 5999, - STR_ENTER_NEW_VALUE = 6000, - STR_ENABLE_LIGHTING_EFFECTS = 6001, - STR_ENABLE_LIGHTING_EFFECTS_TIP = 6002, - - STR_VIEW_CLIPPING_MENU = 6003, STR_VIEW_CLIPPING_TITLE = 6004, - STR_VIEW_CLIPPING_HEIGHT_ENABLE = 6005, - STR_VIEW_CLIPPING_HEIGHT_ENABLE_TIP = 6006, - STR_VIEW_CLIPPING_HEIGHT_VALUE = 6007, - STR_VIEW_CLIPPING_HEIGHT_VALUE_TOGGLE = 6008, - STR_VIEW_CLIPPING_HEIGHT_SCROLL_TIP = 6009, - STR_UNIT2DP_SUFFIX_METRES = 6010, - STR_UNIT1DP_SUFFIX_FEET = 6011, - STR_UNIT1DP_NO_SUFFIX = 6012, - STR_RIDE_INCOME_ADMISSION_PAY_FOR_ENTRY_TIP = 6013, - STR_ADMISSION_PRICE_PAY_PER_RIDE_TIP = 6014, - STR_TILE_INSPECTOR_PATH_SLOPED = 6015, STR_ACTION_MODIFY_TILE = 6016, STR_NETWORK_ACTION_RATE_LIMIT_MESSAGE = 6017, - STR_SHORTCUT_CONSTRUCTION_TURN_LEFT = 6018, - STR_SHORTCUT_CONSTRUCTION_TURN_RIGHT = 6019, - STR_SHORTCUT_CONSTRUCTION_USE_TRACK_DEFAULT = 6020, - STR_SHORTCUT_CONSTRUCTION_SLOPE_DOWN = 6021, - STR_SHORTCUT_CONSTRUCTION_SLOPE_UP = 6022, - STR_SHORTCUT_CONSTRUCTION_CHAIN_LIFT_TOGGLE = 6023, - STR_SHORTCUT_CONSTRUCTION_BANK_LEFT = 6024, - STR_SHORTCUT_CONSTRUCTION_BANK_RIGHT = 6025, - STR_SHORTCUT_CONSTRUCTION_PREVIOUS_TRACK = 6026, - STR_SHORTCUT_CONSTRUCTION_NEXT_TRACK = 6027, - STR_SHORTCUT_CONSTRUCTION_BUILD_CURRENT = 6028, - STR_SHORTCUT_CONSTRUCTION_DEMOLISH_CURRENT = 6029, - - STR_SCENERY_EYEDROPPER_TIP = 6030, - - STR_SERVER_DESCRIPTION = 6031, - STR_SERVER_GREETING = 6032, - - STR_PATH_TO_RCT1 = 6033, - STR_STRING_TOOLTIP = 6034, - STR_PATH_TO_RCT1_BROWSER = 6035, - STR_PATH_TO_RCT1_CLEAR_TIP = 6036, - STR_PATH_TO_RCT1_WRONG_ERROR = 6037, - STR_PATH_TO_RCT1_TIP = 6038, - - STR_QUICK_DEMOLISH_RIDE = 6039, STR_ACTION_EDIT_SCENARIO_OPTIONS = 6040, - STR_NO_MECHANICS_ARE_HIRED_MESSAGE = 6041, - - STR_FILE_DIALOG_TITLE_LOAD_HEIGHTMAP = 6042, - STR_MAPGEN_SELECT_HEIGHTMAP = 6043, - STR_MAPGEN_SMOOTH_HEIGHTMAP = 6044, - STR_MAPGEN_SMOOTH_STRENGTH = 6045, - STR_MAPGEN_NORMALIZE = 6046, - STR_MAPGEN_SMOOTH_TILE = 6047, STR_HEIGHT_MAP_ERROR = 6048, STR_ERROR_READING_PNG = 6049, STR_ERROR_READING_BITMAP = 6050, @@ -3348,23 +1429,12 @@ enum : uint16_t STR_ERROR_HEIHGT_MAP_TOO_BIG = 6052, STR_ERROR_CANNOT_NORMALIZE = 6053, STR_ERROR_24_BIT_BITMAP = 6054, - STR_OPENRCT2_HEIGHTMAP_FILE = 6055, - STR_TOOLBAR_MUTE_TIP = 6056, - STR_MUTE_BUTTON_ON_TOOLBAR_TIP = 6057, - STR_MUTE_BUTTON_ON_TOOLBAR = 6058, - - STR_RIGHTGUILLEMET = 6059, - - STR_SHOW_GUEST_PURCHASES = 6060, - STR_SHOW_GUEST_PURCHASES_TIP = 6061, STR_MONEY_EFFECT_RECEIVE_HIGHP = 6062, STR_MONEY_EFFECT_SPEND_HIGHP = 6063, STR_CHEAT_OWN_ALL_LAND = 6064, - STR_LOG_SERVER_ACTIONS = 6065, - STR_LOG_SERVER_ACTIONS_TIP = 6066, STR_LOG_SERVER_STARTED = 6067, STR_LOG_SERVER_STOPPED = 6068, STR_LOG_PLAYER_KICKED = 6069, @@ -3400,210 +1470,59 @@ enum : uint16_t STR_LOG_CLIENT_STARTED = 6099, STR_LOG_CLIENT_STOPPED = 6100, STR_CHEAT_DISABLE_RIDE_VALUE_AGING = 6101, - STR_CHEAT_DISABLE_RIDE_VALUE_AGING_TIP = 6102, - STR_OPTION_DISABLED_DURING_NETWORK_PLAY = 6103, - - STR_RIDE_NAME_HYPERCOASTER = 6105, - STR_RIDE_NAME_MONSTER_TRUCKS = 6107, - STR_RIDE_NAME_HYPER_TWISTER = 6109, - STR_RIDE_NAME_CLASSIC_MINI_ROLLER_COASTER = 6111, - STR_RIDE_DESCRIPTION_HYPERCOASTER = 6113, - STR_RIDE_DESCRIPTION_MONSTER_TRUCKS_GROUP = 6115, - STR_RIDE_DESCRIPTION_TWISTER_ROLLER_COASTER = 6116, - STR_RIDE_DESCRIPTION_CLASSIC_MINI_COASTER = 6119, STR_NEWS_ITEM_RESEARCH_NEW_VEHICLE_AVAILABLE = 6120, - STR_CHEAT_OWN_ALL_LAND_TIP = 6121, - STR_NOT_ENOUGH_ROLLER_COASTERS = 6122, - STR_OBJECT_LOAD_ERROR_TITLE = 6123, - STR_OBJECT_NAME = 6124, - STR_OBJECT_TYPE = 6125, STR_UNKNOWN_OBJECT_TYPE = 6126, - STR_OBJECT_ERROR_WINDOW_FILE = 6127, - STR_OBJECT_ERROR_WINDOW_EXPLANATION = 6128, - STR_COPY_SELECTED = 6129, - STR_COPY_ALL = 6130, - STR_OBJECT_SOURCE = 6131, STR_CHEAT_IGNORE_RESEARCH_STATUS = 6132, - STR_CHEAT_IGNORE_RESEARCH_STATUS_TIP = 6133, - - STR_SHORTCUT_CLEAR_SCENERY = 6134, STR_MULTIPLAYER_CLIENT_INVALID_REQUEST = 6135, STR_MULTIPLAYER_SERVER_INVALID_REQUEST = 6136, - STR_ABOUT_OPENRCT2_DESCRIPTION = 6137, - STR_ABOUT_OPENRCT2_DESCRIPTION_2 = 6138, - STR_ABOUT_OPENRCT2_DESCRIPTION_3 = 6139, - - STR_CHANGELOG_ELLIPSIS = 6140, - - STR_THEMES_OPTION_RCT1_BOTTOM_TOOLBAR = 6141, - - STR_TRACK_DESIGN_NAME = 6142, - STR_TRACK_DESIGN_TYPE = 6143, - - STR_DEBUG_PAINT_SHOW_DIRTY_VISUALS = 6144, - - STR_RIDE_CONSTRUCTION_BOOSTER_SPEED_LIMIT_TIP = 6145, - STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES = 6146, - STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES_TIP = 6147, - STR_SERVER_LIST_CONNECTING = 6148, STR_SERVER_LIST_NO_CONNECTION = 6149, STR_SERVER_LIST_INVALID_RESPONSE_JSON_NUMBER = 6150, STR_SERVER_LIST_MASTER_SERVER_FAILED = 6151, STR_SERVER_LIST_INVALID_RESPONSE_JSON_ARRAY = 6152, - STR_PAID_ENTRY_PAID_RIDES = 6153, - STR_ADMIN_NOT_RECOMMENDED = 6154, - STR_MISSING_DIALOG_APPLICATION_ERROR = 6155, STR_ERROR_RESERVED_NAME = 6156, STR_CONSOLE = 6157, - STR_AVAILABLE_VEHICLES = 6160, - - STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE = 6161, - - STR_SPINNING_WILD_MOUSE_GROUP = 6162, - STR_SPINNING_WILD_MOUSE_GROUP_DESC = 6163, - STR_CLOSE_X_WHITE = 6164, - STR_USE_VSYNC = 6165, - STR_USE_VSYNC_TIP = 6166, - - STR_OPTIONS_ADVANCED = 6167, - STR_OPTIONS_TITLE_SEQUENCE = 6168, - STR_OPTIONS_SCENARIO_SELECTION = 6169, - STR_OPTIONS_TWEAKS = 6170, - - STR_GUESTS_FILTER_BY_NAME = 6171, - STR_GUESTS_FILTER_BY_NAME_TIP = 6172, - STR_GUESTS_ENTER_NAME_TO_SEARCH = 6173, - STR_LITTER_VOMIT = 6188, STR_DUCK = 6189, - STR_TILE_INSPECTOR_SURFACE = 6191, - STR_TILE_INSPECTOR_WALL = 6192, - - STR_BOTTOM_TOOLBAR_NUM_GUESTS_STABLE_SINGULAR = 6193, - STR_BOTTOM_TOOLBAR_NUM_GUESTS_DECREASE_SINGULAR = 6194, - STR_BOTTOM_TOOLBAR_NUM_GUESTS_INCREASE_SINGULAR = 6195, - - STR_YEAR = 6196, - STR_MONTH = 6197, - STR_DAY = 6198, - STR_DATE_SET = 6199, - STR_DATE_RESET = 6200, - STR_FORMAT_MONTH = 6201, - - STR_VIRTUAL_FLOOR_STYLE = 6202, - STR_VIRTUAL_FLOOR_STYLE_TIP = 6203, - - STR_CHEAT_GROUP_CONSTRUCTION = 6215, - STR_CHEAT_GROUP_OPERATION = 6216, - STR_CHEAT_GROUP_AVAILABILITY = 6217, - STR_OBJECT_FILTER_OPENRCT2_OFFICIAL = 6218, - STR_HIGHLIGHT_PATH_ISSUES_MENU = 6219, - - STR_TILE_INSPECTOR_ENTRANCE_MAKE_USABLE = 6220, - STR_TILE_INSPECTOR_ENTRANCE_MAKE_USABLE_TIP = 6221, - STR_ERR_CANT_PLACE_PEEP_SPAWN_HERE = 6222, STR_ERR_MUST_BE_OUTSIDE_PARK_BOUNDARIES = 6223, STR_LOG_PLACE_PEEP_SPAWN = 6224, STR_NOT_SUPPPORTED_IN_OPENGL = 6225, - STR_ALLOW_EARLY_COMPLETION = 6226, - STR_EARLY_COMPLETION_TIP = 6227, - STR_SCENARIO_OPTIONS = 6228, - - STR_WINDOW_COLOUR_2_STRINGID_STRINGID = 6229, STR_INVENTIONS_LIST_RIDE_AND_VEHICLE_NAME = 6230, STR_INVENTIONS_LIST_RIDE_AND_VEHICLE_NAME_DRAG = 6231, - STR_FROZEN = 6232, - - STR_SHORTCUT_VIEW_CLIPPING = 6233, - STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE = 6234, - - STR_MULTIPLAYER_INFORMATION_TITLE = 6235, - STR_MULTIPLAYER_PLAYERS_TITLE = 6236, - STR_MULTIPLAYER_GROUPS_TITLE = 6237, - STR_MULTIPLAYER_OPTIONS_TITLE = 6238, - - STR_VIEW_CLIPPING_VERTICAL_CLIPPING = 6239, - STR_VIEW_CLIPPING_HORIZONTAL_CLIPPING = 6240, - STR_VIEW_CLIPPING_SELECT_AREA = 6241, - STR_VIEW_CLIPPING_CLEAR_SELECTION = 6242, - - STR_REFURBISH_RIDE_TIP = 6243, STR_CANT_REFURBISH_RIDE = 6244, STR_CANT_REFURBISH_NOT_NEEDED = 6245, - STR_REFURBISH = 6246, - STR_REFURBISH_RIDE = 6247, - STR_REFURBISH_RIDE_ID_MONEY = 6248, - STR_REFURBISH_RIDE_ID_NO_MONEY = 6249, - STR_DEMOLISH_RIDE_ID_MONEY = 6250, STR_RIDE_NOT_YET_EMPTY = 6251, STR_INVALID_URL = 6255, - STR_EFFECTS_GROUP = 6256, - STR_VIRTUAL_FLOOR_STYLE_GLASSY = 6257, - STR_VIRTUAL_FLOOR_STYLE_TRANSPARENT = 6258, - STR_VIRTUAL_FLOOR_STYLE_DISABLED = 6259, - - STR_DEBUG_PAINT_SHOW_BLOCKED_TILES = 6260, - STR_DEBUG_PAINT_SHOW_WIDE_PATHS = 6261, - - STR_MASTER_VOLUME = 6262, - STR_MASTER_VOLUME_TIP = 6263, - - STR_ALWAYS_NATIVE_LOADSAVE = 6264, - STR_ALWAYS_NATIVE_LOADSAVE_TIP = 6265, - - STR_OPEN_USER_CONTENT_FOLDER = 6266, - - STR_SHORTCUT_OPEN_TILE_INSPECTOR = 6267, - - STR_ADVANCE_TO_NEXT_TICK = 6268, - STR_INVALID_CLIMATE_ID = 6269, - STR_OBJECT_SELECTION_TERRAIN_SURFACES = 6270, - STR_OBJECT_SELECTION_TERRAIN_EDGES = 6271, - STR_OBJECT_SELECTION_STATIONS = 6272, - STR_OBJECT_SELECTION_MUSIC = 6273, - STR_CANT_SET_COLOUR_SCHEME = 6274, - STR_STATION_STYLE = 6275, STR_GUESTS_GETTING_STUCK_ON_RIDE = 6276, - STR_TILE_INSPECTOR_STATION_INDEX = 6277, - - STR_AUTOSAVE_AMOUNT = 6278, - STR_AUTOSAVE_AMOUNT_TIP = 6279, - - STR_TOOLBAR_CHAT_TIP = 6280, - STR_CHAT_BUTTON_ON_TOOLBAR_TIP = 6281, - STR_CHAT_BUTTON_ON_TOOLBAR = 6282, - STR_CHAT_UNAVAILABLE = 6283, - STR_SIZE_BYTE = 6293, STR_SIZE_KILOBYTE = 6294, STR_SIZE_MEGABYTE = 6295, @@ -3612,126 +1531,29 @@ enum : uint16_t STR_NETWORK_SPEED_SEC = 6298, - STR_DOWNLOAD_ALL = 6299, - STR_DOWNLOAD_ALL_TIP = 6300, - STR_COPY_SELECTED_TIP = 6301, - STR_COPY_ALL_TIP = 6302, - STR_DOWNLOADING_OBJECTS = 6303, - - STR_SHORTCUT_OPEN_SCENERY_PICKER = 6304, - - STR_MULTITHREADING = 6305, - STR_MULTITHREADING_TIP = 6306, - - STR_TILE_INSPECTOR_COLOUR_SCHEME = 6307, - STR_TILE_INSPECTOR_TRACK_BLOCK_BRAKE = 6319, - STR_TILE_INSPECTOR_TRACK_IS_INDESTRUCTIBLE = 6320, - STR_TILE_INSPECTOR_PATH_BROKEN = 6321, - - STR_MAP_TOOLTIP_BANNER_STRINGID_STRINGID = 6308, - - STR_MULTIPLAYER_RECONNECT = 6309, - - STR_PEEP_DEBUG_POSITION = 6310, - STR_PEEP_DEBUG_NEXT = 6311, - STR_PEEP_DEBUG_NEXT_SURFACE = 6312, - STR_PEEP_DEBUG_NEXT_SLOPE = 6313, - STR_PEEP_DEBUG_DEST = 6314, - STR_PEEP_DEBUG_PATHFIND_GOAL = 6315, - STR_PEEP_DEBUG_PATHFIND_HISTORY = 6316, - STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM = 6317, - STR_PEEP_DEBUG_SPRITE_INDEX = 6322, - STR_DESYNC_REPORT = 6318, STR_SIMULATING = 6323, - STR_SIMULATE_RIDE = 6324, - STR_SIMULATE_RIDE_TIP = 6325, STR_CANT_SIMULATE = 6326, - STR_TRANSPARENT_SCREENSHOT = 6327, - STR_TRANSPARENT_SCREENSHOT_TIP = 6328, - STR_STRING_STRINGID = 6329, - STR_DOWNLOADING_OBJECTS_FROM = 6330, - - STR_CREATE_DUCKS = 6331, - STR_REMOVE_DUCKS = 6332, - STR_SHORTCUT_SCALE_UP = 6333, - STR_SHORTCUT_SCALE_DOWN = 6334, - - STR_SHORTCUT_COPY_ELEMENT = 6336, - STR_SHORTCUT_PASTE_ELEMENT = 6337, - STR_SHORTCUT_REMOVE_ELEMENT = 6338, - STR_SHORTCUT_MOVE_ELEMENT_UP = 6339, - STR_SHORTCUT_MOVE_ELEMENT_DOWN = 6340, - STR_SHORTCUT_INCREASE_X_COORD = 6341, - STR_SHORTCUT_DECREASE_X_COORD = 6342, - STR_SHORTCUT_INCREASE_Y_COORD = 6343, - STR_SHORTCUT_DECREASE_Y_COORD = 6344, - STR_SHORTCUT_INCREASE_ELEM_HEIGHT = 6345, - STR_SHORTCUT_DECREASE_ELEM_HEIGHT = 6346, STR_CANNOT_BUILD_PATH_ADDITIONS_ON_LEVEL_CROSSINGS = 6347, STR_REMOVE_LEVEL_CROSSING_FIRST = 6348, STR_OPTIONS_RANDOM_TITLE_SEQUENCE = 6349, - STR_SCENERY_SCATTER = 6350, - STR_THEMES_WINDOW_SCENERY_SCATTER = 6351, - STR_SCATTER_TOOL_DENSITY = 6352, - STR_SCATTER_TOOL_DENSITY_LOW = 6353, - STR_SCATTER_TOOL_DENSITY_MEDIUM = 6354, - STR_SCATTER_TOOL_DENSITY_HIGH = 6355, - - STR_CREATE_DUCKS_TIP = 6356, - STR_REMOVE_DUCKS_TIP = 6357, - - STR_PAGE_X = 6358, - STR_ARG_4_PAGE_X = 6359, - - STR_GRAPH_AXIS_LABEL = 6360, - - STR_ENABLE_LIGHTING_VEHICLES = 6361, - STR_ENABLE_LIGHTING_VEHICLES_TIP = 6362, - - STR_COPY_INPUT_TO_CLIPBOARD = 6363, - STR_X_PERSON_DIED_ON_X = 6364, - STR_NOTIFICATION_RIDE_CASUALTIES = 6365, - STR_NOTIFICATION_RIDE_VEHICLE_STALLED = 6366, - - STR_TILE_INSPECTOR_WALL_ANIMATION_FRAME = 6367, - STR_WINE_NOT_RECOMMENDED = 6368, STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS = 6369, - STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS_TIP = 6370, - - STR_PATH_TO_RCT1_DOES_NOT_CONTAIN_CSG1I_DAT = 6371, - STR_PATH_TO_RCT1_IS_WRONG_VERSION = 6372, - - STR_SHORTCUT_TOGGLE_CLEARANCE_CHECKS = 6373, - STR_OVERLAY_CLEARANCE_CHECKS_DISABLED = 6374, STR_UNKNOWN_RIDE = 6375, - STR_RESEARCH_VEHICLE_LABEL = 6376, - STR_RESEARCH_TYPE_LABEL_VEHICLE = 6377, - STR_MULTIPLAYER_RECEIVING_OBJECTS_LIST = 6378, STR_MULTIPLAYER_RECEIVED_INVALID_DATA = 6379, - STR_UPDATE_AVAILABLE = 6380, - STR_JOIN_DISCORD = 6381, - STR_NEW_RELEASE_VERSION_INFO = 6382, - STR_NEW_RELEASE_DOWNLOAD_PAGE = 6383, - - STR_SNOW = 6384, - STR_HEAVY_SNOW = 6385, - STR_BLIZZARD = 6386, - STR_CANT_LOWER_ELEMENT_HERE = 6387, STR_CANT_RAISE_ELEMENT_HERE = 6388, STR_NO_CLEARANCE = 6389, @@ -3740,13 +1562,6 @@ enum : uint16_t STR_PICK_RCT2_DIR = 6391, STR_COULD_NOT_FIND_AT_PATH = 6392, - STR_CHEATS_MENU_OBJECTIVE_OPTIONS = 6393, - STR_CHEAT_OBJECTIVE_GROUP = 6394, - STR_CHEAT_MAINTENANCE_GROUP = 6395, - - STR_DISABLE_SCREENSAVER = 6396, - STR_DISABLE_SCREENSAVER_TIP = 6397, - STR_FILE_CONTAINS_UNSUPPORTED_RIDE_TYPES = 6398, STR_NEEDS_RCT2_FILES_MANUAL = 6399, @@ -3762,104 +1577,20 @@ enum : uint16_t STR_INSTALL_INNOEXTRACT = 6408, STR_NOT_THE_GOG_INSTALLER = 6409, - STR_ZOOM_BUTTON_ON_TOOLBAR = 6410, - STR_ZOOM_BUTTON_ON_TOOLBAR_TIP = 6411, - - STR_SHORTCUT_NUMPAD_RETURN = 6412, - - STR_SHORTCUT_MOD_SHIFT = 6413, - STR_SHORTCUT_MOD_LSHIFT = 6414, - STR_SHORTCUT_MOD_RSHIFT = 6415, - STR_SHORTCUT_MOD_CTRL = 6416, - STR_SHORTCUT_MOD_LCTRL = 6417, - STR_SHORTCUT_MOD_RCTRL = 6418, - STR_SHORTCUT_MOD_ALT = 6419, - STR_SHORTCUT_MOD_LALT = 6420, - STR_SHORTCUT_MOD_RALT = 6421, - STR_SHORTCUT_MOD_GUI = 6422, - STR_SHORTCUT_MOD_LGUI = 6423, - STR_SHORTCUT_MOD_RGUI = 6424, - - STR_SHORTCUT_JOY_LEFT = 6425, - STR_SHORTCUT_JOY_RIGHT = 6426, - STR_SHORTCUT_JOY_UP = 6427, - STR_SHORTCUT_JOY_DOWN = 6428, - STR_SHORTCUT_JOY_NUMBER = 6429, - - STR_SHORTCUT_MOUSE_LEFT = 6430, - STR_SHORTCUT_MOUSE_RIGHT = 6431, - STR_SHORTCUT_MOUSE_NUMBER = 6432, - - STR_SHORTCUT_REMOVE = 6433, - STR_SHORTCUT_REMOVE_TIP = 6434, - - STR_STAFF_STAT_VANDALS_STOPPED = 6435, - STR_TILE_INSPECTOR_TOGGLE_INVISIBILITY_TIP = 6436, - STR_TILE_INSPECTOR_FLAG_INVISIBLE = 6437, - STR_TILE_INSPECTOR_INVISIBLE_SHORT = 6438, - STR_SHORTCUT_TOGGLE_INVISIBILITY = 6439, STR_VIEWPORT_TRANSPARENT_WATER = 6440, STR_AT_LEAST_ONE_FOOTPATH_NON_QUEUE_SURFACE_OBJECT_MUST_BE_SELECTED = 6441, STR_AT_LEAST_ONE_FOOTPATH_QUEUE_SURFACE_OBJECT_MUST_BE_SELECTED = 6442, STR_AT_LEAST_ONE_FOOTPATH_RAILING_OBJECT_MUST_BE_SELECTED = 6443, - STR_OBJECT_SELECTION_FOOTPATH_SURFACES = 6444, - STR_OBJECT_SELECTION_FOOTPATH_RAILINGS = 6445, - STR_TILE_INSPECTOR_FOOTPATH_SURFACE_NAME = 6446, - STR_TILE_INSPECTOR_FOOTPATH_RAILINGS_NAME = 6447, STR_UNSUPPORTED_OBJECT_FORMAT = 6448, - STR_MUSIC_OBJECT_TRACK_HEADER = 6449, - STR_MUSIC_OBJECT_TRACK_LIST_ITEM = 6450, - STR_MUSIC_OBJECT_TRACK_LIST_ITEM_WITH_COMPOSER = 6451, - - STR_RIDE_OBJECT_SHOP_SELLS = 6452, - - STR_COPY_BUILD_HASH = 6453, - STR_CANT_RENAME_BANNER = 6454, STR_CANT_RENAME_SIGN = 6455, - STR_SHORTCUT_GIANT_SCREENSHOT = 6456, - - STR_FILE_BUG_ON_GITHUB = 6457, - - STR_FOLLOW_SUBJECT_TIP = 6458, - - STR_TILE_INSPECTOR_DIRECTION_SHORT = 6460, - STR_TILE_INSPECTOR_DIRECTION = 6461, - - STR_RIDE_LIST_EXCITEMENT = 6462, - STR_EXCITEMENT_LABEL = 6463, - STR_RIDE_LIST_INTENSITY = 6464, - STR_INTENSITY_LABEL = 6465, - STR_RIDE_LIST_NAUSEA = 6466, - STR_NAUSEA_LABEL = 6467, - STR_RATING_UKNOWN_LABEL = 6468, - - STR_ADJUST_SMALLER_PATROL_AREA_TIP = 6469, - STR_ADJUST_LARGER_PATROL_AREA_TIP = 6470, - - STR_SEE_THROUGH_VEGETATION = 6471, - STR_SEE_THROUGH_VEHICLES = 6472, - STR_SEE_THROUGH_SUPPORTS = 6473, - STR_SEE_THROUGH_GUESTS = 6474, - STR_SEE_THROUGH_STAFF = 6475, - STR_INVISIBLE_VEGETATION = 6476, - STR_INVISIBLE_SCENERY = 6477, - STR_INVISIBLE_PATHS = 6478, - STR_INVISIBLE_RIDES = 6479, - STR_INVISIBLE_VEHICLES = 6480, - STR_TRANSPARENCY_OPTIONS = 6481, STR_TRANSPARENCY_OPTIONS_TITLE = 6482, - STR_SHORTCUT_OPEN_TRANSPARENCY_OPTIONS = 6483, - STR_SHORTCUT_SEE_THROUGH_VEGETATION_TOGGLE = 6484, - STR_SHORTCUT_SEE_THROUGH_VEHICLES_TOGGLE = 6485, - STR_SHORTCUT_SEE_THROUGH_GUESTS_TOGGLE = 6486, - STR_SHORTCUT_SEE_THROUGH_STAFF_TOGGLE = 6487, STR_PEEPS_COMPLAINING_ABOUT_QUEUE_LENGTH_WARNING = 6488, @@ -3869,21 +1600,9 @@ enum : uint16_t STR_ERROR_PARK_VERSION_TOO_OLD_MESSAGE = 6492, STR_WARNING_PARK_VERSION_MESSAGE = 6493, - STR_GROUP_BY_TRACK_TYPE = 6494, - STR_GROUP_BY_TRACK_TYPE_TIP = 6495, - STR_NEW_RIDE_VEHICLE_NAME = 6496, - - STR_TILE_INSPECTOR_SELECT_TILE_HINT = 6497, - - STR_MAINTAIN_SQUARE_MAP_TOOLTIP = 6498, - STR_VEHICLE_UNSUPPORTED_TD6 = 6499, STR_TRACK_ELEM_UNSUPPORTED_TD6 = 6500, - STR_RANDOM_COLOUR = 6501, - - STR_ENTER_VALUE = 6502, - STR_AT_LEAST_ONE_STATION_OBJECT_MUST_BE_SELECTED = 6503, STR_AT_LEAST_ONE_TERRAIN_SURFACE_OBJECT_MUST_BE_SELECTED = 6504, STR_AT_LEAST_ONE_TERRAIN_EDGE_OBJECT_MUST_BE_SELECTED = 6505, @@ -3899,116 +1618,37 @@ enum : uint16_t STR_INVALID_HEIGHT = 6514, - STR_OBJECT_USES_FALLBACK_IMAGES = 6515, - STR_OBJECT_SELECTION_FALLBACK_IMAGES_WARNING = 6516, STR_PARK_USES_FALLBACK_IMAGES_WARNING = 6517, - STR_SCENARIO_HOVER_HINT = 6518, - - STR_SCENARIO_CATEGORY_EXTRAS_PARKS = 6519, - - STR_ASSET_PACKS = 6520, - STR_LOW_PRIORITY = 6521, - STR_HIGH_PRIORITY = 6522, - STR_DECREASE_PRIOTITY_TIP = 6523, - STR_INCREASE_PRIOTITY_TIP = 6524, - STR_RELOAD_ASSET_PACKS_TIP = 6525, - STR_BASE_GRAPHICS_MUSIC_SOUND = 6526, - STR_COMPETITIONS = 6527, STR_INVALID_TRACK_PARAMETERS = 6528, STR_INVALID_COLOUR_SCHEME_PARAMETER = 6529, - STR_SCENARIO_CATEGORY_UCES = 6530, STR_UCES_TM = 6531, STR_UCES_KD = 6532, - STR_EXCITEMENT_FACTOR_NEGATIVE = 6533, - STR_INTENSITY_FACTOR_NEGATIVE = 6534, - STR_NAUSEA_FACTOR_NEGATIVE = 6535, - STR_ERROR_PARK_VERSION_TOO_NEW_MESSAGE_2 = 6536, STR_CHEAT_ALLOW_PATH_AS_QUEUE = 6537, - STR_CHEAT_ALLOW_PATH_AS_QUEUE_TIP = 6538, - - STR_TILE_INSPECTOR_TRACK_BRAKE_CLOSED = 6539, - - STR_ABOUT_SPECIAL_THANKS_1 = 6540, - STR_ABOUT_SPECIAL_THANKS_2 = 6541, - - STR_CONTRIBUTORS_WINDOW = 6542, - STR_CONTRIBUTORS_WINDOW_BUTTON = 6543, STR_LOAN_CANT_BE_NEGATIVE = 6544, - STR_RCT1_INTEREST = 6545, - STR_RCT1_INTEREST_TIP = 6546, - STR_ALL_SCENERY = 6547, - - STR_TILE_INSPECTOR_PATH_JUNCTION_RAILINGS = 6548, - STR_OBJECT_SELECTION_ERR_COMPAT_OBJECT = 6549, - STR_OBJECT_SELECTION_COMPAT_OBJECT_DESCRIPTION = 6550, - STR_COLOUR_DARK_OLIVE_DARK_TIP = 6551, - STR_COLOUR_DARK_OLIVE_LIGHT_TIP = 6552, - STR_COLOUR_SATURATED_BROWN_LIGHT_TIP = 6553, - STR_COLOUR_BORDEAUX_RED_DARK_TIP = 6554, - STR_COLOUR_BORDEAUX_RED_LIGHT_TIP = 6555, - STR_COLOUR_GRASS_GREEN_DARK_TIP = 6556, - STR_COLOUR_GRASS_GREEN_LIGHT_TIP = 6557, - STR_COLOUR_OLIVE_DARK_TIP = 6558, - STR_COLOUR_OLIVE_LIGHT_TIP = 6559, - STR_COLOUR_SATURATED_GREEN_LIGHT_TIP = 6560, - STR_COLOUR_TAN_DARK_TIP = 6561, - STR_COLOUR_TAN_LIGHT_TIP = 6562, - STR_COLOUR_DULL_PURPLE_LIGHT_TIP = 6563, - STR_COLOUR_DULL_GREEN_DARK_TIP = 6564, - STR_COLOUR_DULL_GREEN_LIGHT_TIP = 6565, - STR_COLOUR_SATURATED_PURPLE_DARK_TIP = 6566, - STR_COLOUR_SATURATED_PURPLE_LIGHT_TIP = 6567, - STR_COLOUR_ORANGE_LIGHT_TIP = 6568, - STR_COLOUR_AQUA_DARK_TIP = 6569, - STR_COLOUR_MAGENTA_LIGHT_TIP = 6570, - STR_COLOUR_DULL_BROWN_DARK_TIP = 6571, - STR_COLOUR_DULL_BROWN_LIGHT_TIP = 6572, - STR_COLOUR_INVISIBLE_TIP = 6573, - STR_COLOUR_VOID_TIP = 6574, STR_CHEAT_ALLOW_SPECIAL_COLOUR_SCHEMES = 6575, - STR_CHEAT_ALLOW_SPECIAL_COLOUR_SCHEMES_TIP = 6576, STR_RIDE_CONSTRUCTION_BLOCK_BRAKE_SPEED = 6577, STR_RIDE_CONSTRUCTION_BLOCK_BRAKE_SPEED_LIMIT_TIP = 6578, STR_TRACK_DESIGN_BLOCK_BRAKE_SPEED_RESET = 6579, - STR_RESET = 6580, - STR_RESET_SHORTCUT_KEYS_PROMPT = 6581, - - STR_SHORTCUT_OPEN_KEYBOARD_SHORTCUTS_WINDOW = 6582, - - STR_OPTION_REVERSE_TRAINS = 6583, - STR_OPTION_REVERSE_TRAINS_TIP = 6584, STR_RIDE_SET_VEHICLE_REVERSED_FAIL = 6585, - STR_OPENRCT2_DROPDOWN = 6586, - STR_ABOUT_OPENRCT2_TITLE = 6587, - STR_ABOUT_FAIRGROUND_ORGAN = 6588, - - STR_WINDOW_BUTTONS_ON_THE_LEFT = 6589, - STR_WINDOW_BUTTONS_ON_THE_LEFT_TIP = 6590, - STR_CANT_FIRE_STAFF_FIXING = 6591, STR_CANT_FIRE_STAFF_INSPECTING = 6592, STR_CHEAT_REMOVE_PARK_FENCES = 6593, - STR_SHORTCUT_TOGGLE_WALL_SLOPE = 6594, - - STR_SCENERY_AUTHOR = 6595, - STR_SCENERY_AUTHOR_PLURAL = 6596, - STR_ERR_INVALID_PARAMETER = 6597, STR_ERR_VALUE_OUT_OF_RANGE = 6598, STR_ERR_GHOST_ELEMENT_NOT_FOUND = 6599, @@ -4025,7 +1665,6 @@ enum : uint16_t STR_ERR_PATH_ELEMENT_NOT_FOUND = 6610, STR_ERR_WALL_ELEMENT_NOT_FOUND = 6611, STR_ERR_BANNER_ELEMENT_NOT_FOUND = 6612, - STR_RELOAD_OBJECT_TIP = 6613, STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE = 6614, STR_ERR_TRACK_ON_THIS_TILE_NEEDS_WATER = 6615, STR_ERR_ACTION_INVALID_FOR_THAT_STAFF_TYPE = 6616, @@ -4034,19 +1673,25 @@ enum : uint16_t STR_CANT_RESTRICT_OBJECT = 6618, STR_OBJECT_TYPE_CANNOT_BE_RESTRICTED = 6619, STR_OBJECT_NOT_FOUND = 6620, - STR_RESTRICT_SCENERY = 6621, - STR_RESTRICT_SCENERY_TIP = 6622, - - STR_CONSOLE_HELPER_TEXT = 6623, - - STR_SHORTCUT_SORT_ELEMENTS = 6624, STR_ERR_INVALID_COLOUR = 6625, - STR_TILE_INSPECTOR_WALL_ANIMATION_IS_BACKWARDS = 6626, - STR_SPEED_TOO_HIGH = 6627, + STR_CAN_ONLY_BE_PLACED_ON_PATH_EDGES = 6628, + + STR_LOADING_GENERIC = 6631, + STR_CHECKING_OBJECT_FILES = 6632, + STR_CHECKING_SCENARIO_FILES = 6633, + STR_CHECKING_TRACK_DESIGN_FILES = 6634, + STR_CHECKING_ASSET_PACKS = 6635, + STR_CHECKING_TITLE_SEQUENCES = 6636, + STR_LOADING_TITLE_SEQUENCE = 6637, + + STR_THEME_LOADING_WINDOW = 6641, + STR_STRING_M_OF_N = 6642, + STR_STRING_M_OF_N_KIB = 6643, + // 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/localisation/UTF8.cpp b/src/openrct2/localisation/UTF8.cpp index 6eab29376b..bd5df3326f 100644 --- a/src/openrct2/localisation/UTF8.cpp +++ b/src/openrct2/localisation/UTF8.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "Language.h" #include "Localisation.h" #include diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index 7eb6facaf2..c9a0fbee80 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -468,7 +468,7 @@ static bool AwardIsDeservedBestCustomDesignedRides(int32_t activeAwardTypes) continue; if (ride.lifecycle_flags & RIDE_LIFECYCLE_NOT_CUSTOM_DESIGN) continue; - if (ride.excitement < RIDE_RATING(5, 50)) + if (ride.ratings.excitement < RIDE_RATING(5, 50)) continue; if (ride.status != RideStatus::Open || (ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) continue; @@ -630,7 +630,7 @@ void AwardUpdateAll() } // Check if there was a free award entry - if (currentAwards.size() < OpenRCT2::Limits::MaxAwards) + if (currentAwards.size() < OpenRCT2::Limits::kMaxAwards) { // Get a random award type not already active AwardType awardType; @@ -644,7 +644,7 @@ void AwardUpdateAll() { // Add award currentAwards.push_back(Award{ 5u, awardType }); - if (gConfigNotifications.ParkAward) + if (Config::Get().notifications.ParkAward) { News::AddItemToQueue(News::ItemType::Award, AwardNewsStrings[EnumValue(awardType)], 0, {}); } diff --git a/src/openrct2/management/Finance.cpp b/src/openrct2/management/Finance.cpp index 10d4b113e6..cf3b0de93e 100644 --- a/src/openrct2/management/Finance.cpp +++ b/src/openrct2/management/Finance.cpp @@ -78,7 +78,7 @@ void FinancePayment(money64 amount, ExpenditureType type) { // overflow check auto& gameState = GetGameState(); - gameState.Cash = AddClamp_money64(gameState.Cash, -amount); + gameState.Cash = AddClamp(gameState.Cash, -amount); gameState.ExpenditureTable[0][EnumValue(type)] -= amount; if (dword_988E60[EnumValue(type)] & 1) @@ -186,14 +186,14 @@ void FinancePayRideUpkeep() void FinanceResetHistory() { auto& gameState = GetGameState(); - for (int32_t i = 0; i < FINANCE_GRAPH_SIZE; i++) + for (auto i = 0; i < kFinanceGraphSize; i++) { gameState.CashHistory[i] = kMoney64Undefined; gameState.WeeklyProfitHistory[i] = kMoney64Undefined; gameState.Park.ValueHistory[i] = kMoney64Undefined; } - for (uint32_t i = 0; i < EXPENDITURE_TABLE_MONTH_COUNT; ++i) + for (uint32_t i = 0; i < kExpenditureTableMonthCount; ++i) { for (uint32_t j = 0; j < static_cast(ExpenditureType::Count); ++j) { @@ -318,18 +318,18 @@ money64 FinanceGetCurrentCash() void FinanceShiftExpenditureTable() { auto& gameState = GetGameState(); - // If EXPENDITURE_TABLE_MONTH_COUNT months have passed then is full, sum the oldest month - if (GetDate().GetMonthsElapsed() >= EXPENDITURE_TABLE_MONTH_COUNT) + // 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[EXPENDITURE_TABLE_MONTH_COUNT - 1]), - std::cend(gameState.ExpenditureTable[EXPENDITURE_TABLE_MONTH_COUNT - 1]), money64{}); + std::cbegin(gameState.ExpenditureTable[kExpenditureTableMonthCount - 1]), + std::cend(gameState.ExpenditureTable[kExpenditureTableMonthCount - 1]), money64{}); GetGameState().HistoricalProfit += sum; } // Shift the table - for (size_t i = EXPENDITURE_TABLE_MONTH_COUNT - 1; i >= 1; i--) + for (size_t i = kExpenditureTableMonthCount - 1; i >= 1; i--) { for (size_t j = 0; j < static_cast(ExpenditureType::Count); j++) { diff --git a/src/openrct2/management/Finance.h b/src/openrct2/management/Finance.h index 33375b8966..afdd4cf544 100644 --- a/src/openrct2/management/Finance.h +++ b/src/openrct2/management/Finance.h @@ -9,7 +9,7 @@ #pragma once -#include "../common.h" +#include "../core/Money.hpp" #include "Research.h" enum class ExpenditureType : int32_t @@ -31,8 +31,8 @@ enum class ExpenditureType : int32_t Count }; -#define EXPENDITURE_TABLE_MONTH_COUNT 16 -#define FINANCE_GRAPH_SIZE 128 +constexpr uint8_t kExpenditureTableMonthCount = 16; +constexpr uint8_t kFinanceGraphSize = 128; constexpr uint8_t MaxBankLoanInterestRate = 255; diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index 718ff9e9e7..848ffc2f75 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -40,8 +40,6 @@ static constexpr uint16_t AdvertisingCampaignGuestGenerationProbabilities[] = { 400, 300, 200, 200, 250, 200, }; -std::vector gMarketingCampaigns; - uint16_t MarketingGetCampaignGuestGenerationProbability(int32_t campaignType) { auto campaign = MarketingGetCampaign(campaignType); @@ -74,7 +72,7 @@ uint16_t MarketingGetCampaignGuestGenerationProbability(int32_t campaignType) static void MarketingRaiseFinishedNotification(const MarketingCampaign& campaign) { - if (gConfigNotifications.ParkMarketingCampaignFinished) + if (Config::Get().notifications.ParkMarketingCampaignFinished) { Formatter ft; // This sets the string parameters for the marketing types that have an argument. @@ -103,10 +101,12 @@ void MarketingUpdate() { PROFILED_FUNCTION(); - if (GetGameState().Cheats.NeverendingMarketing) + auto& gameState = GetGameState(); + + if (gameState.Cheats.NeverendingMarketing) return; - for (auto it = gMarketingCampaigns.begin(); it != gMarketingCampaigns.end();) + for (auto it = gameState.MarketingCampaigns.begin(); it != gameState.MarketingCampaigns.end();) { auto& campaign = *it; if (campaign.Flags & MarketingCampaignFlags::FIRST_WEEK) @@ -123,7 +123,7 @@ void MarketingUpdate() if (campaign.WeeksLeft == 0) { MarketingRaiseFinishedNotification(campaign); - it = gMarketingCampaigns.erase(it); + it = gameState.MarketingCampaigns.erase(it); } else { @@ -222,7 +222,7 @@ bool MarketingIsCampaignTypeApplicable(int32_t campaignType) MarketingCampaign* MarketingGetCampaign(int32_t campaignType) { - for (auto& campaign : gMarketingCampaigns) + for (auto& campaign : GetGameState().MarketingCampaigns) { if (campaign.Type == campaignType) { @@ -242,7 +242,7 @@ void MarketingNewCampaign(const MarketingCampaign& campaign) } else { - gMarketingCampaigns.push_back(campaign); + GetGameState().MarketingCampaigns.push_back(campaign); } } @@ -256,7 +256,7 @@ void MarketingCancelCampaignsForRide(const RideId rideId) return false; }; - auto& v = gMarketingCampaigns; + 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/Marketing.h b/src/openrct2/management/Marketing.h index c3f9e475de..6013a609c9 100644 --- a/src/openrct2/management/Marketing.h +++ b/src/openrct2/management/Marketing.h @@ -14,8 +14,6 @@ #include "../ride/RideTypes.h" #include "../ride/ShopItem.h" -#include - struct Guest; enum @@ -61,7 +59,6 @@ namespace MarketingCampaignFlags } extern const money64 AdvertisingCampaignPricePerWeek[ADVERTISING_CAMPAIGN_COUNT]; -extern std::vector gMarketingCampaigns; uint16_t MarketingGetCampaignGuestGenerationProbability(int32_t campaign); void MarketingUpdate(); diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index ac79b73dff..6c75a5c863 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -257,7 +257,7 @@ void ResearchFinishItem(const ResearchItem& researchItem) if (!gSilentResearch) { - if (gConfigNotifications.RideResearched) + if (Config::Get().notifications.RideResearched) { News::AddItemToQueue(News::ItemType::Research, availabilityString, researchItem.rawValue, ft); } @@ -279,7 +279,7 @@ void ResearchFinishItem(const ResearchItem& researchItem) if (!gSilentResearch) { - if (gConfigNotifications.RideResearched) + if (Config::Get().notifications.RideResearched) { News::AddItemToQueue( News::ItemType::Research, STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE, researchItem.rawValue, ft); diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index f36bffeb0c..07cd6958d8 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -15,6 +15,7 @@ #include "../GameStateSnapshots.h" #include "../OpenRCT2.h" #include "../PlatformEnvironment.h" +#include "../Version.h" #include "../actions/LoadOrQuitAction.h" #include "../actions/NetworkModifyGroupAction.h" #include "../actions/PeepPickupAction.h" @@ -26,6 +27,7 @@ #include "../entity/EntityTweener.h" #include "../localisation/Formatter.h" #include "../localisation/Formatting.h" +#include "../localisation/LocalisationService.h" #include "../park/ParkFile.h" #include "../platform/Platform.h" #include "../scenario/Scenario.h" @@ -45,9 +47,9 @@ using namespace OpenRCT2; // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "0" +constexpr uint8_t kNetworkStreamVersion = 3; -#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION +const std::string kNetworkStreamID = std::string(OPENRCT2_VERSION) + "-" + std::to_string(kNetworkStreamVersion); static Peep* _pickup_peep = nullptr; static int32_t _pickup_peep_old_x = LOCATION_NULL; @@ -284,7 +286,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) // risk of tick collision with the server map and title screen map. GameActions::SuspendQueue(); - auto keyPath = NetworkGetPrivateKeyPath(gConfigNetwork.PlayerName); + auto keyPath = NetworkGetPrivateKeyPath(Config::Get().network.PlayerName); if (!File::Exists(keyPath)) { Console::WriteLine("Generating key... This may take a while"); @@ -312,7 +314,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) const std::string hash = _key.PublicKeyHash(); const utf8* publicKeyHash = hash.c_str(); - keyPath = NetworkGetPublicKeyPath(gConfigNetwork.PlayerName, publicKeyHash); + keyPath = NetworkGetPublicKeyPath(Config::Get().network.PlayerName, publicKeyHash); Console::WriteLine("Key generated, saving public bits as %s", keyPath.c_str()); try @@ -374,21 +376,20 @@ bool NetworkBase::BeginServer(uint16_t port, const std::string& address) return false; } - ServerName = gConfigNetwork.ServerName; - ServerDescription = gConfigNetwork.ServerDescription; - ServerGreeting = gConfigNetwork.ServerGreeting; - ServerProviderName = gConfigNetwork.ProviderName; - ServerProviderEmail = gConfigNetwork.ProviderEmail; - ServerProviderWebsite = gConfigNetwork.ProviderWebsite; + ServerName = Config::Get().network.ServerName; + ServerDescription = Config::Get().network.ServerDescription; + ServerGreeting = Config::Get().network.ServerGreeting; + ServerProviderName = Config::Get().network.ProviderName; + ServerProviderEmail = Config::Get().network.ProviderEmail; + ServerProviderWebsite = Config::Get().network.ProviderWebsite; IsServerPlayerInvisible = gOpenRCT2Headless; - CheatsReset(); LoadGroups(); BeginChatLog(); BeginServerLog(); - NetworkPlayer* player = AddPlayer(gConfigNetwork.PlayerName, ""); + NetworkPlayer* player = AddPlayer(Config::Get().network.PlayerName, ""); player->Flags |= NETWORK_PLAYER_FLAG_ISSERVER; player->Group = 0; player_id = player->Id; @@ -409,7 +410,7 @@ bool NetworkBase::BeginServer(uint16_t port, const std::string& address) status = NETWORK_STATUS_CONNECTED; listening_port = port; - _serverState.gamestateSnapshotsEnabled = gConfigNetwork.DesyncDebugging; + _serverState.gamestateSnapshotsEnabled = Config::Get().network.DesyncDebugging; _advertiser = CreateServerAdvertiser(listening_port); GameLoadScripts(); @@ -855,7 +856,7 @@ bool NetworkBase::CheckDesynchronizaton() intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync }); ContextOpenIntent(&intent); - if (!gConfigNetwork.StayConnected) + if (!Config::Get().network.StayConnected) { Close(); } @@ -927,12 +928,12 @@ std::string NetworkBase::GenerateAdvertiseKey() std::string NetworkBase::GetMasterServerUrl() { - if (gConfigNetwork.MasterServerUrl.empty()) + if (Config::Get().network.MasterServerUrl.empty()) { return OPENRCT2_MASTER_SERVER_URL; } - return gConfigNetwork.MasterServerUrl; + return Config::Get().network.MasterServerUrl; } NetworkGroup* NetworkBase::AddGroup() @@ -1171,7 +1172,7 @@ void NetworkBase::BeginChatLog() void NetworkBase::AppendChatLog(std::string_view s) { - if (gConfigNetwork.LogChat && _chat_log_fs.is_open()) + if (Config::Get().network.LogChat && _chat_log_fs.is_open()) { AppendLog(_chat_log_fs, s); } @@ -1209,7 +1210,7 @@ void NetworkBase::BeginServerLog() void NetworkBase::AppendServerLog(const std::string& s) { - if (gConfigNetwork.LogServerActions && _server_log_fs.is_open()) + if (Config::Get().network.LogServerActions && _server_log_fs.is_open()) { AppendLog(_server_log_fs, s); } @@ -1659,13 +1660,13 @@ void NetworkBase::ServerSendSetDisconnectMsg(NetworkConnection& connection, cons json_t NetworkBase::GetServerInfoAsJson() const { json_t jsonObj = { - { "name", gConfigNetwork.ServerName }, + { "name", Config::Get().network.ServerName }, { "requiresPassword", _password.size() > 0 }, { "version", NetworkGetVersion() }, { "players", GetNumVisiblePlayers() }, - { "maxPlayers", gConfigNetwork.Maxplayers }, - { "description", gConfigNetwork.ServerDescription }, - { "greeting", gConfigNetwork.ServerGreeting }, + { "maxPlayers", Config::Get().network.Maxplayers }, + { "description", Config::Get().network.ServerDescription }, + { "greeting", Config::Get().network.ServerGreeting }, { "dedicated", gOpenRCT2Headless }, }; return jsonObj; @@ -1679,9 +1680,9 @@ void NetworkBase::ServerSendGameInfo(NetworkConnection& connection) // Provider details json_t jsonProvider = { - { "name", gConfigNetwork.ProviderName }, - { "email", gConfigNetwork.ProviderEmail }, - { "website", gConfigNetwork.ProviderWebsite }, + { "name", Config::Get().network.ProviderName }, + { "email", Config::Get().network.ProviderEmail }, + { "website", Config::Get().network.ProviderWebsite }, }; jsonObj["provider"] = jsonProvider; @@ -2201,7 +2202,7 @@ std::string NetworkBase::MakePlayerNameUnique(const std::string& name) void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPacket& packet) { - auto keyPath = NetworkGetPrivateKeyPath(gConfigNetwork.PlayerName); + auto keyPath = NetworkGetPrivateKeyPath(Config::Get().network.PlayerName); if (!File::Exists(keyPath)) { LOG_ERROR("Key file (%s) was not found. Restart client to re-generate it.", keyPath.c_str()); @@ -2244,7 +2245,7 @@ void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPack // when process dump gets collected at some point in future. _key.Unload(); - Client_Send_AUTH(gConfigNetwork.PlayerName, gCustomPassword, pubkey, signature); + Client_Send_AUTH(Config::Get().network.PlayerName, gCustomPassword, pubkey, signature); } void NetworkBase::ServerHandleRequestGamestate(NetworkConnection& connection, NetworkPacket& packet) @@ -2381,6 +2382,15 @@ void NetworkBase::ServerHandleToken(NetworkConnection& connection, [[maybe_unuse ServerSendToken(connection); } +static void OpenNetworkProgress(StringId captionStringId) +{ + auto captionString = GetContext()->GetLocalisationService().GetString(captionStringId); + auto intent = Intent(INTENT_ACTION_PROGRESS_OPEN); + intent.PutExtra(INTENT_EXTRA_MESSAGE, captionString); + intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); + ContextOpenIntent(&intent); +} + void NetworkBase::Client_Handle_OBJECTS_LIST(NetworkConnection& connection, NetworkPacket& packet) { auto& repo = GetContext().GetObjectRepository(); @@ -2397,17 +2407,8 @@ void NetworkBase::Client_Handle_OBJECTS_LIST(NetworkConnection& connection, Netw if (totalObjects > 0) { - char objectListMsg[256]; - const uint32_t args[] = { - index + 1, - totalObjects, - }; - FormatStringLegacy(objectListMsg, 256, STR_MULTIPLAYER_RECEIVING_OBJECTS_LIST, &args); - - auto intent = Intent(WindowClass::NetworkStatus); - intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ objectListMsg }); - intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); - ContextOpenIntent(&intent); + OpenNetworkProgress(STR_MULTIPLAYER_RECEIVING_OBJECTS_LIST); + GetContext().SetProgress(index + 1, totalObjects); uint8_t objectType{}; packet >> objectType; @@ -2676,7 +2677,7 @@ void NetworkBase::ServerHandleAuth(NetworkConnection& connection, NetworkPacket& if (verified) { LOG_VERBOSE("Connection %s: Signature verification ok. Hash %s", hostName, hash.c_str()); - if (gConfigNetwork.KnownKeysOnly && _userManager.GetUserByHash(hash) == nullptr) + if (Config::Get().network.KnownKeysOnly && _userManager.GetUserByHash(hash) == nullptr) { LOG_VERBOSE("Connection %s: Hash %s, not known", hostName, hash.c_str()); connection.AuthStatus = NetworkAuth::UnknownKeyDisallowed; @@ -2732,7 +2733,7 @@ void NetworkBase::ServerHandleAuth(NetworkConnection& connection, NetworkPacket& } } - if (GetNumVisiblePlayers() >= gConfigNetwork.Maxplayers) + if (GetNumVisiblePlayers() >= Config::Get().network.Maxplayers) { connection.AuthStatus = NetworkAuth::Full; LOG_INFO("Connection %s: Server is full.", hostName); @@ -2779,17 +2780,12 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti { chunk_buffer.resize(size); } - char str_downloading_map[256]; - uint32_t downloading_map_args[2] = { - (offset + chunksize) / 1024, - size / 1024, - }; - FormatStringLegacy(str_downloading_map, 256, STR_MULTIPLAYER_DOWNLOADING_MAP, downloading_map_args); - auto intent = Intent(WindowClass::NetworkStatus); - intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_downloading_map }); - intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); - ContextOpenIntent(&intent); + const auto currentProgressKiB = (offset + chunksize) / 1024; + const auto totalSizeKiB = size / 1024; + + OpenNetworkProgress(STR_MULTIPLAYER_DOWNLOADING_MAP); + GetContext().SetProgress(currentProgressKiB, totalSizeKiB, STR_STRING_M_OF_N_KIB); std::memcpy(&chunk_buffer[offset], const_cast(static_cast(packet.Read(chunksize))), chunksize); if (offset + chunksize == size) @@ -2797,7 +2793,7 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti // Allow queue processing of game actions again. GameActions::ResumeQueue(); - ContextForceCloseWindowByClass(WindowClass::NetworkStatus); + ContextForceCloseWindowByClass(WindowClass::ProgressWindow); GameUnloadScripts(); GameNotifyMapChange(); @@ -3962,7 +3958,7 @@ void NetworkSendGameAction(const GameAction* action) void NetworkSendPassword(const std::string& password) { auto& network = OpenRCT2::GetContext()->GetNetwork(); - const auto keyPath = NetworkGetPrivateKeyPath(gConfigNetwork.PlayerName); + const auto keyPath = NetworkGetPrivateKeyPath(Config::Get().network.PlayerName); if (!File::Exists(keyPath)) { LOG_ERROR("Private key %s missing! Restart the game to generate it.", keyPath.c_str()); @@ -3985,7 +3981,7 @@ void NetworkSendPassword(const std::string& password) // Don't keep private key in memory. There's no need and it may get leaked // when process dump gets collected at some point in future. network._key.Unload(); - network.Client_Send_AUTH(gConfigNetwork.PlayerName, password, pubkey, signature); + network.Client_Send_AUTH(Config::Get().network.PlayerName, password, pubkey, signature); } void NetworkSetPassword(const char* password) @@ -4056,7 +4052,7 @@ u8string NetworkGetServerProviderWebsite() std::string NetworkGetVersion() { - return NETWORK_STREAM_ID; + return kNetworkStreamID; } NetworkStats NetworkGetStats() diff --git a/src/openrct2/network/NetworkServerAdvertiser.cpp b/src/openrct2/network/NetworkServerAdvertiser.cpp index fed1d405f5..900b80e3d7 100644 --- a/src/openrct2/network/NetworkServerAdvertiser.cpp +++ b/src/openrct2/network/NetworkServerAdvertiser.cpp @@ -92,7 +92,7 @@ public: { UpdateLAN(); # ifndef DISABLE_HTTP - if (gConfigNetwork.Advertise) + if (Config::Get().network.Advertise) { UpdateWAN(); } @@ -182,9 +182,9 @@ private: { "port", _port }, }; - if (!gConfigNetwork.AdvertiseAddress.empty()) + if (!Config::Get().network.AdvertiseAddress.empty()) { - body["address"] = gConfigNetwork.AdvertiseAddress; + body["address"] = Config::Get().network.AdvertiseAddress; } request.body = body.dump(); @@ -345,9 +345,9 @@ private: static std::string GetMasterServerUrl() { std::string result = OPENRCT2_MASTER_SERVER_URL; - if (!gConfigNetwork.MasterServerUrl.empty()) + if (!Config::Get().network.MasterServerUrl.empty()) { - result = gConfigNetwork.MasterServerUrl; + result = Config::Get().network.MasterServerUrl; } return result; } diff --git a/src/openrct2/network/ServerList.cpp b/src/openrct2/network/ServerList.cpp index b803fb77da..e3dd821c0d 100644 --- a/src/openrct2/network/ServerList.cpp +++ b/src/openrct2/network/ServerList.cpp @@ -360,9 +360,9 @@ std::future> ServerList::FetchOnlineServerListAsync auto f = p->get_future(); std::string masterServerUrl = OPENRCT2_MASTER_SERVER_URL; - if (!gConfigNetwork.MasterServerUrl.empty()) + if (!Config::Get().network.MasterServerUrl.empty()) { - masterServerUrl = gConfigNetwork.MasterServerUrl; + masterServerUrl = Config::Get().network.MasterServerUrl; } Http::Request request; diff --git a/src/openrct2/object/BannerSceneryEntry.h b/src/openrct2/object/BannerSceneryEntry.h index c6ea0cc40f..6cdfc661fc 100644 --- a/src/openrct2/object/BannerSceneryEntry.h +++ b/src/openrct2/object/BannerSceneryEntry.h @@ -10,6 +10,7 @@ #pragma once #include "../common.h" +#include "../core/Money.hpp" #include "ObjectTypes.h" enum diff --git a/src/openrct2/object/LargeSceneryEntry.h b/src/openrct2/object/LargeSceneryEntry.h index 13260f0771..4089b635fe 100644 --- a/src/openrct2/object/LargeSceneryEntry.h +++ b/src/openrct2/object/LargeSceneryEntry.h @@ -8,7 +8,8 @@ *****************************************************************************/ #pragma once -#include "../common.h" + +#include "../core/Money.hpp" #include "../interface/Cursors.h" #include "../world/Location.hpp" #include "ObjectTypes.h" diff --git a/src/openrct2/object/Object.cpp b/src/openrct2/object/Object.cpp index ada421bd26..ca2b46ee51 100644 --- a/src/openrct2/object/Object.cpp +++ b/src/openrct2/object/Object.cpp @@ -23,6 +23,7 @@ #include "ObjectLimits.h" #include "ObjectRepository.h" +#include #include #include diff --git a/src/openrct2/object/Object.h b/src/openrct2/object/Object.h index 06dba26287..f3acf220bc 100644 --- a/src/openrct2/object/Object.h +++ b/src/openrct2/object/Object.h @@ -40,8 +40,6 @@ namespace ObjectSelectionFlags constexpr uint8_t AllFlags = 0xFF; }; // namespace ObjectSelectionFlags -#define OBJECT_SELECTION_NOT_SELECTED_OR_REQUIRED 0 - enum class ObjectSourceGame : uint8_t { Custom, diff --git a/src/openrct2/object/ObjectManager.cpp b/src/openrct2/object/ObjectManager.cpp index d7b4d35287..9c0157798a 100644 --- a/src/openrct2/object/ObjectManager.cpp +++ b/src/openrct2/object/ObjectManager.cpp @@ -30,6 +30,7 @@ #include "SmallSceneryObject.h" #include "WallObject.h" +#include #include #include #include diff --git a/src/openrct2/object/ObjectRepository.cpp b/src/openrct2/object/ObjectRepository.cpp index 471dcf6562..402104d41a 100644 --- a/src/openrct2/object/ObjectRepository.cpp +++ b/src/openrct2/object/ObjectRepository.cpp @@ -13,7 +13,6 @@ #include "../OpenRCT2.h" #include "../PlatformEnvironment.h" #include "../common.h" -#include "../config/Config.h" #include "../core/Console.hpp" #include "../core/DataSerialiser.h" #include "../core/FileIndex.hpp" diff --git a/src/openrct2/object/ObjectTypes.cpp b/src/openrct2/object/ObjectTypes.cpp index 0d7d6a3a16..af6aa715bd 100644 --- a/src/openrct2/object/ObjectTypes.cpp +++ b/src/openrct2/object/ObjectTypes.cpp @@ -12,6 +12,8 @@ #include "../util/Util.h" #include "Object.h" +#include + constexpr std::array kAllObjectTypes = { ObjectType::Ride, ObjectType::SmallScenery, diff --git a/src/openrct2/object/PathAdditionEntry.h b/src/openrct2/object/PathAdditionEntry.h index d81c694825..174262642a 100644 --- a/src/openrct2/object/PathAdditionEntry.h +++ b/src/openrct2/object/PathAdditionEntry.h @@ -9,7 +9,7 @@ #pragma once -#include "../common.h" +#include "../core/Money.hpp" #include "../interface/Cursors.h" #include "ObjectTypes.h" diff --git a/src/openrct2/object/SmallSceneryEntry.h b/src/openrct2/object/SmallSceneryEntry.h index 0b6b0d028c..af6d71b3ba 100644 --- a/src/openrct2/object/SmallSceneryEntry.h +++ b/src/openrct2/object/SmallSceneryEntry.h @@ -9,7 +9,7 @@ #pragma once -#include "../common.h" +#include "../core/Money.hpp" #include "../interface/Cursors.h" #include "ObjectTypes.h" diff --git a/src/openrct2/object/WallSceneryEntry.h b/src/openrct2/object/WallSceneryEntry.h index bf873da1ce..fcc27c00e8 100644 --- a/src/openrct2/object/WallSceneryEntry.h +++ b/src/openrct2/object/WallSceneryEntry.h @@ -9,7 +9,7 @@ #pragma once -#include "../common.h" +#include "../core/Money.hpp" #include "../interface/Cursors.h" #include "ObjectTypes.h" diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index 0fb4b9745a..546aff8c52 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -14,6 +14,7 @@ #include "../core/Guard.hpp" #include "../drawing/Drawing.h" #include "../interface/Viewport.h" +#include "../localisation/Currency.h" #include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../localisation/LocalisationService.h" @@ -25,6 +26,7 @@ #include "Paint.Entity.h" #include "tile_element/Paint.TileElement.h" +#include #include using namespace OpenRCT2; @@ -391,7 +393,10 @@ template static void PaintStructsSortQuadrant(PaintStruct* pa auto* ps = child; child = child->NextQuadrantEntry; - PREFETCH(&child->Bounds); + if (child != nullptr) + { + PREFETCH(&child->Bounds); + } if (child == nullptr || child->SortFlags & PaintSortFlags::OutsideQuadrant) { break; @@ -909,14 +914,14 @@ void PaintDrawMoneyStructs(DrawPixelInfo& dpi, PaintStringStruct* ps) // Use sprite font unless the currency contains characters unsupported by the sprite font auto forceSpriteFont = false; - const auto& currencyDesc = CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; + const auto& currencyDesc = CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)]; if (LocalisationService_UseTrueTypeFont() && FontSupportsStringSprite(currencyDesc.symbol_unicode)) { forceSpriteFont = true; } GfxDrawStringWithYOffsets( - dpi, buffer, COLOUR_BLACK, ps->ScreenPos, reinterpret_cast(ps->y_offsets), forceSpriteFont, + dpi, buffer, { COLOUR_BLACK }, ps->ScreenPos, reinterpret_cast(ps->y_offsets), forceSpriteFont, FontStyle::Medium); } while ((ps = ps->NextEntry) != nullptr); } diff --git a/src/openrct2/paint/Paint.h b/src/openrct2/paint/Paint.h index b958bcc304..55ea930ea3 100644 --- a/src/openrct2/paint/Paint.h +++ b/src/openrct2/paint/Paint.h @@ -10,12 +10,12 @@ #pragma once #include "../common.h" -#include "../core/FixedVector.h" #include "../drawing/Drawing.h" #include "../interface/Colour.h" #include "../world/Location.hpp" #include "../world/Map.h" #include "Boundbox.h" +#include "tile_element/Paint.Tunnel.h" #include #include @@ -74,7 +74,10 @@ struct PaintStringStruct struct PaintEntry { private: - std::array data; + // Avoid including expensive for std::max. Manually ensure we use the largest type. + static_assert(sizeof(PaintStruct) >= sizeof(AttachedPaintStruct)); + static_assert(sizeof(PaintStruct) >= sizeof(PaintStringStruct)); + std::array data; public: PaintStruct* AsBasic() @@ -115,18 +118,10 @@ struct SupportHeight uint8_t pad; }; -struct TunnelEntry -{ - uint8_t height; - uint8_t type; -}; - // The maximum size must be kMaximumMapSizeTechnical multiplied by 2 because // the quadrant index is based on the x and y components combined. static constexpr int32_t MaxPaintQuadrants = kMaximumMapSizeTechnical * 2; -#define TUNNEL_MAX_COUNT 65 - /** * A pool of PaintEntry instances that can be rented out. * The internal implementation uses an unrolled linked list so that each @@ -202,8 +197,8 @@ struct PaintSessionCore SupportHeight SupportSegments[9]; SupportHeight Support; uint16_t WaterHeight; - TunnelEntry LeftTunnels[TUNNEL_MAX_COUNT]; - TunnelEntry RightTunnels[TUNNEL_MAX_COUNT]; + TunnelEntry LeftTunnels[kTunnelMaxCount]; + TunnelEntry RightTunnels[kTunnelMaxCount]; uint8_t LeftTunnelCount; uint8_t RightTunnelCount; uint8_t VerticalTunnelHeight; @@ -330,8 +325,6 @@ inline PaintStruct* PaintAddImageAsParentRotated( return PaintAddImageAsParentRotated(session, direction, imageId, offset, { offset, boundBoxSize }); } -void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, uint8_t type); - bool PaintAttachToPreviousAttach(PaintSession& session, const ImageId imageId, int32_t x, int32_t y); bool PaintAttachToPreviousPS(PaintSession& session, const ImageId image_id, int32_t x, int32_t y); void PaintFloatingMoneyEffect( diff --git a/src/openrct2/paint/PaintHelpers.cpp b/src/openrct2/paint/PaintHelpers.cpp index 086c605c4e..3333453d11 100644 --- a/src/openrct2/paint/PaintHelpers.cpp +++ b/src/openrct2/paint/PaintHelpers.cpp @@ -39,15 +39,3 @@ PaintStruct* PaintAddImageAsChildRotated( return PaintAddImageAsChild(session, image_id, offset, boundBox); } - -void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, uint8_t type) -{ - if (direction & 1) - { - PaintUtilPushTunnelRight(session, height, type); - } - else - { - PaintUtilPushTunnelLeft(session, height, type); - } -} diff --git a/src/openrct2/paint/Painter.cpp b/src/openrct2/paint/Painter.cpp index 89ac1a31d9..791d4ab4af 100644 --- a/src/openrct2/paint/Painter.cpp +++ b/src/openrct2/paint/Painter.cpp @@ -14,10 +14,11 @@ #include "../OpenRCT2.h" #include "../ReplayManager.h" #include "../config/Config.h" -#include "../drawing/Drawing.h" #include "../drawing/IDrawingEngine.h" +#include "../drawing/Text.h" #include "../interface/Chat.h" #include "../interface/InteractiveConsole.h" +#include "../interface/Widget.h" #include "../localisation/FormatCodes.h" #include "../localisation/Formatting.h" #include "../localisation/Language.h" @@ -79,7 +80,7 @@ void Painter::Paint(IDrawingEngine& de) if (text != nullptr) PaintReplayNotice(*dpi, text); - if (gConfigGeneral.ShowFPS) + if (Config::Get().general.ShowFPS) { PaintFPS(*dpi); } @@ -97,7 +98,7 @@ void Painter::PaintReplayNotice(DrawPixelInfo& dpi, const char* text) screenCoords.x = screenCoords.x - stringWidth; if (((GetGameState().CurrentTicks >> 1) & 0xF) > 4) - GfxDrawString(dpi, screenCoords, buffer, { COLOUR_SATURATED_RED }); + DrawText(dpi, screenCoords, { COLOUR_SATURATED_RED }, buffer); // Make area dirty so the text doesn't get drawn over the last GfxSetDirtyBlocks({ screenCoords, screenCoords + ScreenCoordsXY{ stringWidth, 16 } }); @@ -119,20 +120,27 @@ void Painter::PaintFPS(DrawPixelInfo& dpi) if (!ShouldShowFPS()) return; - ScreenCoordsXY screenCoords(_uiContext->GetWidth() / 2, 2); - MeasureFPS(); char buffer[64]{}; FormatStringToBuffer(buffer, sizeof(buffer), "{OUTLINE}{WHITE}{INT32}", _currentFPS); + const int32_t stringWidth = GfxGetStringWidth(buffer, FontStyle::Medium); - // Draw Text - int32_t stringWidth = GfxGetStringWidth(buffer, FontStyle::Medium); + // Figure out where counter should be rendered + ScreenCoordsXY screenCoords(_uiContext->GetWidth() / 2, 2); screenCoords.x = screenCoords.x - (stringWidth / 2); - GfxDrawString(dpi, screenCoords, buffer); + + // Move counter below toolbar if buttons are centred + const bool isTitle = gScreenFlags == SCREEN_FLAGS_TITLE_DEMO; + if (!isTitle && Config::Get().interface.ToolbarButtonsCentred) + { + screenCoords.y = kTopToolbarHeight + 3; + } + + DrawText(dpi, screenCoords, { COLOUR_WHITE }, buffer); // Make area dirty so the text doesn't get drawn over the last - GfxSetDirtyBlocks({ { screenCoords - ScreenCoordsXY{ 16, 4 } }, { dpi.lastStringPos.x + 16, 16 } }); + GfxSetDirtyBlocks({ { screenCoords - ScreenCoordsXY{ 16, 4 } }, { dpi.lastStringPos.x + 16, screenCoords.y + 16 } }); } void Painter::MeasureFPS() diff --git a/src/openrct2/paint/VirtualFloor.cpp b/src/openrct2/paint/VirtualFloor.cpp index 416fa59aff..5c118a0efe 100644 --- a/src/openrct2/paint/VirtualFloor.cpp +++ b/src/openrct2/paint/VirtualFloor.cpp @@ -336,9 +336,9 @@ void VirtualFloorPaint(PaintSession& session) // Try the four tiles next to us for the same parameters as above, // if our parameters differ we set an edge towards that tile - for (uint8_t i = 0; i < NumOrthogonalDirections; i++) + for (uint8_t i = 0; i < kNumOrthogonalDirections; i++) { - uint8_t effectiveRotation = (NumOrthogonalDirections + i - direction) % NumOrthogonalDirections; + uint8_t effectiveRotation = (kNumOrthogonalDirections + i - direction) % kNumOrthogonalDirections; CoordsXY theirLocation = session.MapPosition + scenery_half_tile_offsets[effectiveRotation]; bool theyAreOccupied; @@ -352,7 +352,7 @@ void VirtualFloorPaint(PaintSession& session) theirLocation, virtualFloorClipHeight, &theyAreOccupied, &theyAreOwned, &theirOccupiedEdges, &theyAreBelowGround, &theyAreAboveGround, &theyAreLit); - if (theirOccupiedEdges & (1 << ((effectiveRotation + 2) % NumOrthogonalDirections)) && (weAreOwned && !theyAreOwned)) + if (theirOccupiedEdges & (1 << ((effectiveRotation + 2) % kNumOrthogonalDirections)) && (weAreOwned && !theyAreOwned)) { occupiedEdges |= 1 << i; } @@ -405,7 +405,7 @@ void VirtualFloorPaint(PaintSession& session) { { 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NW) ? -2 : 0) }, { 0, 0, 1 } }); } - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Glassy) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Glassy) return; if (!weAreOccupied && !weAreLit && weAreAboveGround && weAreOwned) diff --git a/src/openrct2/paint/support/MetalSupports.cpp b/src/openrct2/paint/support/MetalSupports.cpp index de7e41b04d..c181cd161a 100644 --- a/src/openrct2/paint/support/MetalSupports.cpp +++ b/src/openrct2/paint/support/MetalSupports.cpp @@ -13,9 +13,11 @@ #include "../../interface/Viewport.h" #include "../../util/Util.h" #include "../../world/Surface.h" +#include "../../world/tile_element/Slope.h" #include "../Paint.SessionFlags.h" #include "../Paint.h" -#include "Generic.h" + +constexpr auto kMetalSupportSkip = 9 * 4 * 2; /** rct2: 0x0097AF20, 0x0097AF21 */ // clang-format off @@ -133,52 +135,66 @@ static constexpr uint8_t supportTypeToHeight[] = { }; struct MetalSupportsImages { - uint16_t base_id; - uint16_t beam_id; + ImageIndex base; + ImageIndex beamA; + ImageIndex beamB; }; -/** rct2: 0x0097B15C */ -static constexpr MetalSupportsImages _97B15C[] = { - { 3243, 3209 }, // MetalSupportType::Tubes - { 3279, 3262 }, // MetalSupportType::Fork - { 3298, 3262 }, // MetalSupportType::ForkAlt - { 3334, 3317 }, // MetalSupportType::Boxed - { 0, 3658 }, // MetalSupportType::Stick - { 0, 3658 }, // MetalSupportType::StickAlt - { 0, 3141 }, // MetalSupportType::ThickCentred - { 0, 3158 }, // MetalSupportType::Thick - { 0, 3175 }, // MetalSupportType::ThickAlt - { 0, 3192 }, // MetalSupportType::ThickAltCentred - { 0, 3124 }, // MetalSupportType::Truss - { 3243, 3209 }, // MetalSupportType::TubesInverted - { 3334, 3353 }, // MetalSupportType::BoxedCoated -}; - -/** rct2: 0x0097B190 */ -static constexpr MetalSupportsImages _97B190[] = { - { 3243, 3226 }, // 3209 - { 3279, 3262 }, - { 3298, 3262 }, - { 3334, 3317 }, - { 0, 3658 }, - { 0, 3658 }, - { 0, 3141 }, - { 0, 3158 }, - { 0, 3175 }, - { 0, 3192 }, - { 0, 3124 }, - { 3243, 3226 }, // 3209 - { 3334, 3353 }, +/** rct2: 0x0097B15C, 0x0097B190 */ +static constexpr MetalSupportsImages kSupportBasesAndBeams[] = { + { 3243, 3209, 3226 }, // MetalSupportType::Tubes + { 3279, 3262, 3262 }, // MetalSupportType::Fork + { 3298, 3262, 3262 }, // MetalSupportType::ForkAlt + { 3334, 3317, 3317 }, // MetalSupportType::Boxed + { 0, 3658, 3658 }, // MetalSupportType::Stick + { 0, 3658, 3658 }, // MetalSupportType::StickAlt + { 0, 3141, 3141 }, // MetalSupportType::ThickCentred + { 0, 3158, 3158 }, // MetalSupportType::Thick + { 0, 3175, 3175 }, // MetalSupportType::ThickAlt + { 0, 3192, 3192 }, // MetalSupportType::ThickAltCentred + { 0, 3124, 3124 }, // MetalSupportType::Truss + { 3243, 3209, 3226 }, // MetalSupportType::TubesInverted + { 3334, 3353, 3353 }, // MetalSupportType::BoxedCoated }; /** rct2: 0x0097B404 */ -static constexpr uint8_t metal_supports_slope_image_map[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, - 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, 0, 17, 18, 0, +static constexpr uint8_t kMetalSupportsSlopeImageOffsetMap[] = { + 0, // kTileSlopeFlat + 1, // kTileSlopeNCornerUp + 2, // kTileSlopeECornerUp + 3, // kTileSlopeNESideUp + 4, // kTileSlopeSCornerUp + 5, // kTileSlopeNSValley + 6, // kTileSlopeSESideUp + 7, // kTileSlopeWCornerDown + 8, // kTileSlopeWCornerUp + 9, // kTileSlopeNWSideUp + 10, // kTileSlopeWEValley + 11, // kTileSlopeSCornerDown + 12, // kTileSlopeSWSideUp + 13, // kTileSlopeECornerDown + 14, // kTileSlopeNCornerDown + 0, // (invalid) + 0, // (invalid) + 0, // (invalid) + 0, // (invalid) + 0, // (invalid) + 0, // (invalid) + 0, // (invalid) + 0, // (invalid) + 15, // kTileSlopeDiagonalFlag | kTileSlopeWCornerDown + 0, // (invalid) + 0, // (invalid) + 0, // (invalid) + 16, // kTileSlopeDiagonalFlag | kTileSlopeSCornerDown + 0, // (invalid) + 17, // kTileSlopeDiagonalFlag | kTileSlopeECornerDown + 18, // kTileSlopeDiagonalFlag | kTileSlopeNCornerDown + 0, // (invalid) }; // clang-format on -static constexpr MetalSupportPlace kMetalSupportPlacementRotated[][NumOrthogonalDirections] = { +static constexpr MetalSupportPlace kMetalSupportPlacementRotated[][kNumOrthogonalDirections] = { { MetalSupportPlace::TopCorner, MetalSupportPlace::RightCorner, MetalSupportPlace::BottomCorner, MetalSupportPlace::LeftCorner }, { MetalSupportPlace::LeftCorner, MetalSupportPlace::TopCorner, MetalSupportPlace::RightCorner, @@ -198,6 +214,25 @@ static constexpr MetalSupportPlace kMetalSupportPlacementRotated[][NumOrthogonal MetalSupportPlace::TopRightSide }, }; +constexpr uint8_t MetalSupportTypeCount = 13; +constexpr MetalSupportType kMetalSupportTypeRotated[MetalSupportTypeCount][kNumOrthogonalDirections] = { + { MetalSupportType::Tubes, MetalSupportType::Tubes, MetalSupportType::Tubes, MetalSupportType::Tubes }, + { MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt }, + { MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork }, + { MetalSupportType::Boxed, MetalSupportType::Boxed, MetalSupportType::Boxed, MetalSupportType::Boxed }, + { MetalSupportType::Stick, MetalSupportType::StickAlt, MetalSupportType::Stick, MetalSupportType::StickAlt }, + { MetalSupportType::StickAlt, MetalSupportType::Stick, MetalSupportType::StickAlt, MetalSupportType::Stick }, + { MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred, MetalSupportType::Thick, MetalSupportType::ThickAlt }, + { MetalSupportType::Thick, MetalSupportType::ThickAlt, MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred }, + { MetalSupportType::ThickAlt, MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred, MetalSupportType::Thick }, + { MetalSupportType::ThickAltCentred, MetalSupportType::Thick, MetalSupportType::ThickAlt, MetalSupportType::ThickCentred }, + { MetalSupportType::Truss, MetalSupportType::Truss, MetalSupportType::Truss, MetalSupportType::Truss }, + { MetalSupportType::TubesInverted, MetalSupportType::TubesInverted, MetalSupportType::TubesInverted, + MetalSupportType::TubesInverted }, + { MetalSupportType::BoxedCoated, MetalSupportType::BoxedCoated, MetalSupportType::BoxedCoated, + MetalSupportType::BoxedCoated }, +}; + /** * Metal pole supports * @param supportType (edi) @@ -211,10 +246,6 @@ bool MetalASupportsPaintSetup( PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, int32_t special, int32_t height, ImageId imageTemplate) { - uint8_t segment = EnumValue(placement); - auto supportType = EnumValue(supportTypeMember); - SupportHeight* supportSegments = session.SupportSegments; - if (!(session.Flags & PaintSessionFlags::PassedSurface)) { return false; @@ -229,11 +260,13 @@ bool MetalASupportsPaintSetup( imageTemplate = ImageId(0).WithTransparency(FilterPaletteID::PaletteDarken1); } + uint8_t segment = EnumValue(placement); + auto supportType = EnumValue(supportTypeMember); + SupportHeight* supportSegments = session.SupportSegments; int16_t originalHeight = height; - int32_t originalSegment = segment; + const auto originalSegment = segment; - const uint8_t rotation = session.CurrentRotation; - int16_t unk9E3294 = -1; + uint16_t unk9E3294 = 0xFFFF; if (height < supportSegments[segment].height) { unk9E3294 = height; @@ -242,20 +275,20 @@ bool MetalASupportsPaintSetup( if (height < 0) return false; - const uint8_t* esi = &(_97AF32[rotation * 2]); + const uint8_t* esi = &(_97AF32[session.CurrentRotation * 2]); uint8_t newSegment = esi[segment * 8]; if (height <= supportSegments[newSegment].height) { - esi += 72; + esi += kMetalSupportSkip; newSegment = esi[segment * 8]; if (height <= supportSegments[newSegment].height) { - esi += 72; + esi += kMetalSupportSkip; newSegment = esi[segment * 8]; if (height <= supportSegments[newSegment].height) { - esi += 72; + esi += kMetalSupportSkip; newSegment = esi[segment * 8]; if (height <= supportSegments[newSegment].height) { @@ -276,8 +309,8 @@ bool MetalASupportsPaintSetup( segment = newSegment; } int16_t si = height; - if (supportSegments[segment].slope & SUPPORTS_SLOPE_5 || height - supportSegments[segment].height < 6 - || _97B15C[supportType].base_id == 0) + if (supportSegments[segment].slope & kTileSlopeAboveTrackOrScenery || height - supportSegments[segment].height < 6 + || kSupportBasesAndBeams[supportType].base == 0) { height = supportSegments[segment].height; } @@ -286,8 +319,8 @@ bool MetalASupportsPaintSetup( int8_t xOffset = SupportBoundBoxes[segment].x; int8_t yOffset = SupportBoundBoxes[segment].y; - uint32_t imageIndex = _97B15C[supportType].base_id; - imageIndex += metal_supports_slope_image_map[supportSegments[segment].slope & kTileElementSurfaceSlopeMask]; + auto imageIndex = kSupportBasesAndBeams[supportType].base; + imageIndex += kMetalSupportsSlopeImageOffsetMap[supportSegments[segment].slope & kTileSlopeMask]; auto image_id = imageTemplate.WithIndex(imageIndex); PaintAddImageAsParent(session, image_id, { xOffset, yOffset, supportSegments[segment].height }, { 0, 0, 5 }); @@ -310,7 +343,7 @@ bool MetalASupportsPaintSetup( int8_t xOffset = SupportBoundBoxes[segment].x; int8_t yOffset = SupportBoundBoxes[segment].y; - uint32_t imageIndex = _97B15C[supportType].beam_id; + uint32_t imageIndex = kSupportBasesAndBeams[supportType].beamA; imageIndex += heightDiff - 1; auto image_id = imageTemplate.WithIndex(imageIndex); @@ -325,33 +358,33 @@ bool MetalASupportsPaintSetup( if (count >= 4) count = 0; - int16_t z = height + 16; - if (z > si) + int16_t beamLength = height + 16; + if (beamLength > si) { - z = si; + beamLength = si; } - z -= height; - if (z <= 0) + beamLength -= height; + if (beamLength <= 0) break; int8_t xOffset = SupportBoundBoxes[segment].x; int8_t yOffset = SupportBoundBoxes[segment].y; - uint32_t imageIndex = _97B15C[supportType].beam_id; - imageIndex += z - 1; + uint32_t imageIndex = kSupportBasesAndBeams[supportType].beamA; + imageIndex += beamLength - 1; - if (count == 3 && z == 0x10) + if (count == 3 && beamLength == 0x10) imageIndex++; auto image_id = imageTemplate.WithIndex(imageIndex); - PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { 0, 0, z - 1 }); + PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { 0, 0, beamLength - 1 }); - height += z; + height += beamLength; } supportSegments[segment].height = unk9E3294; - supportSegments[segment].slope = 0x20; + supportSegments[segment].slope = kTileSlopeAboveTrackOrScenery; height = originalHeight; segment = originalSegment; @@ -365,30 +398,30 @@ bool MetalASupportsPaintSetup( } CoordsXYZ boundBoxOffset = CoordsXYZ(SupportBoundBoxes[segment], height); - si = height + special; + const auto combinedHeight = height + special; while (1) { - int16_t z = height + 16; - if (z > si) + int16_t beamLength = height + 16; + if (beamLength > combinedHeight) { - z = si; + beamLength = combinedHeight; } - z -= height; - if (z <= 0) + beamLength -= height; + if (beamLength <= 0) break; int8_t xOffset = SupportBoundBoxes[segment].x; int8_t yOffset = SupportBoundBoxes[segment].y; - uint32_t imageIndex = _97B190[supportType].beam_id; - imageIndex += z - 1; + auto imageIndex = kSupportBasesAndBeams[supportType].beamB; + imageIndex += beamLength - 1; auto image_id = imageTemplate.WithIndex(imageIndex); PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { boundBoxOffset, { 0, 0, 0 } }); - height += z; + height += beamLength; } return true; @@ -398,6 +431,7 @@ bool MetalASupportsPaintSetupRotated( PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, Direction direction, int32_t special, int32_t height, ImageId imageTemplate) { + supportTypeMember = kMetalSupportTypeRotated[EnumValue(supportTypeMember)][direction]; placement = kMetalSupportPlacementRotated[EnumValue(placement)][direction]; return MetalASupportsPaintSetup(session, supportTypeMember, placement, special, height, imageTemplate); } @@ -418,11 +452,6 @@ bool MetalBSupportsPaintSetup( PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, int32_t special, int32_t height, ImageId imageTemplate) { - uint8_t segment = EnumValue(placement); - auto supportType = EnumValue(supportTypeMember); - SupportHeight* supportSegments = session.SupportSegments; - uint8_t originalSegment = segment; - if (!(session.Flags & PaintSessionFlags::PassedSurface)) { return false; // AND @@ -437,12 +466,15 @@ bool MetalBSupportsPaintSetup( imageTemplate = ImageId(0).WithTransparency(FilterPaletteID::PaletteDarken1); } - uint16_t _9E3294 = 0xFFFF; + const uint8_t segment = EnumValue(placement); + auto supportType = EnumValue(supportTypeMember); + SupportHeight* supportSegments = session.SupportSegments; + uint16_t unk9E3294 = 0xFFFF; int32_t baseHeight = height; if (height < supportSegments[segment].height) { - _9E3294 = height; + unk9E3294 = height; baseHeight -= supportTypeToHeight[supportType]; if (baseHeight < 0) @@ -455,15 +487,15 @@ bool MetalBSupportsPaintSetup( uint8_t ebp = _97AF32[baseIndex + segment * 8]; if (baseHeight <= supportSegments[ebp].height) { - baseIndex += 9 * 4 * 2; // 9 segments, 4 directions, 2 values + baseIndex += kMetalSupportSkip; // 9 segments, 4 directions, 2 values uint8_t ebp2 = _97AF32[baseIndex + segment * 8]; if (baseHeight <= supportSegments[ebp2].height) { - baseIndex += 9 * 4 * 2; + baseIndex += kMetalSupportSkip; uint8_t ebp3 = _97AF32[baseIndex + segment * 8]; if (baseHeight <= supportSegments[ebp3].height) { - baseIndex += 9 * 4 * 2; + baseIndex += kMetalSupportSkip; uint8_t ebp4 = _97AF32[baseIndex + segment * 8]; if (baseHeight <= supportSegments[ebp4].height) { @@ -481,20 +513,20 @@ bool MetalBSupportsPaintSetup( PaintAddImageAsParent( session, imageTemplate.WithIndex(_metalSupportTypeToCrossbeamImages[supportType][ebp]), - { SupportBoundBoxes[originalSegment] + Loc97B052[ebp], baseHeight }, { _97B062[ebp], 1 }); + { SupportBoundBoxes[segment] + Loc97B052[ebp], baseHeight }, { _97B062[ebp], 1 }); } int32_t si = baseHeight; - if ((supportSegments[segment].slope & 0x20) || (baseHeight - supportSegments[segment].height < 6) - || (_97B15C[supportType].base_id == 0)) + if ((supportSegments[segment].slope & kTileSlopeAboveTrackOrScenery) || (baseHeight - supportSegments[segment].height < 6) + || (kSupportBasesAndBeams[supportType].beamA == 0)) { baseHeight = supportSegments[segment].height; } else { - uint32_t imageOffset = metal_supports_slope_image_map[supportSegments[segment].slope & kTileElementSurfaceSlopeMask]; - uint32_t imageId = _97B15C[supportType].base_id + imageOffset; + uint32_t imageOffset = kMetalSupportsSlopeImageOffsetMap[supportSegments[segment].slope & kTileSlopeMask]; + uint32_t imageId = kSupportBasesAndBeams[supportType].base + imageOffset; PaintAddImageAsParent( session, imageTemplate.WithIndex(imageId), { SupportBoundBoxes[segment], supportSegments[segment].height }, @@ -513,7 +545,7 @@ bool MetalBSupportsPaintSetup( if (heightDiff > 0) { PaintAddImageAsParent( - session, imageTemplate.WithIndex(_97B15C[supportType].beam_id + (heightDiff - 1)), + session, imageTemplate.WithIndex(kSupportBasesAndBeams[supportType].beamA + (heightDiff - 1)), { SupportBoundBoxes[segment], baseHeight }, { 0, 0, heightDiff - 1 }); } @@ -537,7 +569,7 @@ bool MetalBSupportsPaintSetup( break; } - uint32_t imageId = _97B15C[supportType].beam_id + (beamLength - 1); + uint32_t imageId = kSupportBasesAndBeams[supportType].beamA + (beamLength - 1); if (i % 4 == 0) { @@ -555,19 +587,19 @@ bool MetalBSupportsPaintSetup( i++; } - supportSegments[segment].height = _9E3294; - supportSegments[segment].slope = 0x20; + supportSegments[segment].height = unk9E3294; + supportSegments[segment].slope = kTileSlopeAboveTrackOrScenery; if (special != 0) { baseHeight = height; - si = height + special; + const auto si2 = height + special; while (true) { endHeight = baseHeight + 16; - if (endHeight > si) + if (endHeight > si2) { - endHeight = si; + endHeight = si2; } int16_t beamLength = endHeight - baseHeight; @@ -576,10 +608,10 @@ bool MetalBSupportsPaintSetup( break; } - uint32_t imageId = _97B15C[supportType].beam_id + (beamLength - 1); + uint32_t imageId = kSupportBasesAndBeams[supportType].beamA + (beamLength - 1); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageId), { SupportBoundBoxes[originalSegment], baseHeight }, - { { SupportBoundBoxes[originalSegment], height }, { 0, 0, 0 } }); + session, imageTemplate.WithIndex(imageId), { SupportBoundBoxes[segment], baseHeight }, + { { SupportBoundBoxes[segment], height }, { 0, 0, 0 } }); baseHeight += beamLength; } } @@ -591,33 +623,15 @@ bool MetalBSupportsPaintSetupRotated( PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, Direction direction, int32_t special, int32_t height, ImageId imageTemplate) { + supportTypeMember = kMetalSupportTypeRotated[EnumValue(supportTypeMember)][direction]; placement = kMetalSupportPlacementRotated[EnumValue(placement)][direction]; return MetalBSupportsPaintSetup(session, supportTypeMember, placement, special, height, imageTemplate); } -constexpr uint8_t MetalSupportTypeCount = 13; -constexpr MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][NumOrthogonalDirections] = { - { MetalSupportType::Tubes, MetalSupportType::Tubes, MetalSupportType::Tubes, MetalSupportType::Tubes }, - { MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt }, - { MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork }, - { MetalSupportType::Boxed, MetalSupportType::Boxed, MetalSupportType::Boxed, MetalSupportType::Boxed }, - { MetalSupportType::Stick, MetalSupportType::StickAlt, MetalSupportType::Stick, MetalSupportType::StickAlt }, - { MetalSupportType::StickAlt, MetalSupportType::Stick, MetalSupportType::StickAlt, MetalSupportType::Stick }, - { MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred, MetalSupportType::Thick, MetalSupportType::ThickAlt }, - { MetalSupportType::Thick, MetalSupportType::ThickAlt, MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred }, - { MetalSupportType::ThickAlt, MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred, MetalSupportType::Thick }, - { MetalSupportType::ThickAltCentred, MetalSupportType::Thick, MetalSupportType::ThickAlt, MetalSupportType::ThickCentred }, - { MetalSupportType::Truss, MetalSupportType::Truss, MetalSupportType::Truss, MetalSupportType::Truss }, - { MetalSupportType::TubesInverted, MetalSupportType::TubesInverted, MetalSupportType::TubesInverted, - MetalSupportType::TubesInverted }, - { MetalSupportType::BoxedCoated, MetalSupportType::BoxedCoated, MetalSupportType::BoxedCoated, - MetalSupportType::BoxedCoated }, -}; - void DrawSupportsSideBySide( PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special) { - type = RotatedMetalSupports[EnumValue(type)][direction]; + type = kMetalSupportTypeRotated[EnumValue(type)][direction]; if (direction & 1) { @@ -672,14 +686,14 @@ bool PathPoleSupportsPaintSetup( uint16_t baseHeight; - if ((supportSegments[segment].slope & 0x20) || (height - supportSegments[segment].height < 6) + if ((supportSegments[segment].slope & kTileSlopeAboveTrackOrScenery) || (height - supportSegments[segment].height < 6) || !(pathPaintInfo.RailingFlags & RAILING_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE)) { baseHeight = supportSegments[segment].height; } else { - uint8_t imageOffset = metal_supports_slope_image_map[supportSegments[segment].slope & kTileElementSurfaceSlopeMask]; + uint8_t imageOffset = kMetalSupportsSlopeImageOffsetMap[supportSegments[segment].slope & kTileSlopeMask]; baseHeight = supportSegments[segment].height; PaintAddImageAsParent( @@ -760,7 +774,7 @@ bool PathPoleSupportsPaintSetup( // Loc6A34D8 supportSegments[segment].height = 0xFFFF; - supportSegments[segment].slope = 0x20; + supportSegments[segment].slope = kTileSlopeAboveTrackOrScenery; if (isSloped) { diff --git a/src/openrct2/paint/support/MetalSupports.h b/src/openrct2/paint/support/MetalSupports.h index c1e3b95db1..cec5e65918 100644 --- a/src/openrct2/paint/support/MetalSupports.h +++ b/src/openrct2/paint/support/MetalSupports.h @@ -87,6 +87,8 @@ enum class MetalSupportPlace : uint8_t TopRightSide = 6, BottomLeftSide = 7, BottomRightSide = 8, + + None = 255, }; struct FootpathPaintInfo; diff --git a/src/openrct2/paint/support/WoodenSupports.cpp b/src/openrct2/paint/support/WoodenSupports.cpp index 2c14a51ffc..e51f34a974 100644 --- a/src/openrct2/paint/support/WoodenSupports.cpp +++ b/src/openrct2/paint/support/WoodenSupports.cpp @@ -12,10 +12,10 @@ #include "../../sprites.h" #include "../../world/Map.h" #include "../../world/Surface.h" +#include "../../world/tile_element/Slope.h" #include "../Boundbox.h" #include "../Paint.SessionFlags.h" #include "../Paint.h" -#include "Generic.h" constexpr auto kNumWoodenSupportTypes = 2; constexpr auto kNumWoodenSupportSubTypes = 6; @@ -55,7 +55,7 @@ constexpr SupportsIdDescriptor GetWoodenSupportIds(WoodenSupportType supportType return WoodenSupportImageIds[EnumValue(supportType)][EnumValue(subType)]; } -using ImagesByTransitionTypeArray = std::array, 21>; +using ImagesByTransitionTypeArray = std::array, 21>; static constexpr ImagesByTransitionTypeArray WoodenCurveSupportImageIds0 = { { { 3465, 3466, 3467, 3468 }, // Flat to gentle @@ -274,7 +274,7 @@ static constexpr uint16_t word_97B3C4[] = { }; // clang-format on -static WoodenSupportSubType rotatedWoodenSupportSubTypes[kNumWoodenSupportSubTypes][NumOrthogonalDirections] = { +static WoodenSupportSubType rotatedWoodenSupportSubTypes[kNumWoodenSupportSubTypes][kNumOrthogonalDirections] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::NwSe, @@ -353,7 +353,7 @@ static bool WoodenABSupportPaintSetupPaintSpecial( PaintSession& session, WoodenSupportType supportType, WoodenSupportSubType subType, WoodenSupportTransitionType transitionType, Direction direction, const ImageId& imageTemplate, uint16_t baseHeight) { - const uint16_t supportsDescriptorIndex = (EnumValue(transitionType) * NumOrthogonalDirections) + direction; + const uint16_t supportsDescriptorIndex = (EnumValue(transitionType) * kNumOrthogonalDirections) + direction; const UnkSupportsDescriptor& supportsDesc = SupportsDescriptors[supportsDescriptorIndex]; const auto* imageIds = WoodenCurveSupportImageIds[EnumValue(supportType)][EnumValue(subType)]; @@ -426,12 +426,12 @@ bool WoodenASupportsPaintSetup( // Draw base support (usually shaped to the slope) auto slope = session.Support.slope; - if (slope & SUPPORTS_SLOPE_5) + if (slope & kTileSlopeAboveTrackOrScenery) { // Above scenery (just put a base piece above it) drawFlatPiece = true; } - else if (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + else if (slope & kTileSlopeDiagonalFlag) { // Steep diagonal (place the correct shaped support for the slope) heightSteps -= 2; @@ -447,7 +447,7 @@ bool WoodenASupportsPaintSetup( } else { - auto imageId = imageTemplate.WithIndex(imageIndex + word_97B3C4[slope & kTileElementSurfaceSlopeMask]); + auto imageId = imageTemplate.WithIndex(imageIndex + word_97B3C4[slope & kTileSlopeMask]); PaintAddImageAsParent(session, imageId, { 0, 0, baseHeight }, { { 0, 0, baseHeight + 2 }, { 32, 32, 11 } }); PaintAddImageAsParent( @@ -459,7 +459,7 @@ bool WoodenASupportsPaintSetup( baseHeight += 32; } - else if ((slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) != 0) + else if ((slope & kTileSlopeRaisedCornersMask) != 0) { // 1 to 3 quarters up heightSteps--; @@ -475,7 +475,7 @@ bool WoodenASupportsPaintSetup( } else { - auto imageId = imageTemplate.WithIndex(imageIndex + word_97B3C4[slope & kTileElementSurfaceSlopeMask]); + auto imageId = imageTemplate.WithIndex(imageIndex + word_97B3C4[slope & kTileSlopeMask]); PaintAddImageAsParent(session, imageId, { 0, 0, baseHeight }, { { 0, 0, baseHeight + 2 }, { 32, 32, 11 } }); hasSupports = true; } @@ -558,12 +558,12 @@ bool WoodenBSupportsPaintSetup( // Draw base support (usually shaped to the slope) auto slope = session.Support.slope; - if (slope & SUPPORTS_SLOPE_5) + if (slope & kTileSlopeAboveTrackOrScenery) { // Above scenery (just put a base piece above it) drawFlatPiece = true; } - else if (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + else if (slope & kTileSlopeDiagonalFlag) { // Steep diagonal (place the correct shaped support for the slope) heightSteps -= 2; @@ -579,7 +579,7 @@ bool WoodenBSupportsPaintSetup( } else { - auto imageId = imageTemplate.WithIndex(imageIndex + word_97B3C4[slope & kTileElementSurfaceSlopeMask]); + auto imageId = imageTemplate.WithIndex(imageIndex + word_97B3C4[slope & kTileSlopeMask]); PaintAddImageAsParent(session, imageId, { 0, 0, baseHeight }, { { 0, 0, baseHeight + 2 }, { 32, 32, 11 } }); PaintAddImageAsParent( @@ -591,7 +591,7 @@ bool WoodenBSupportsPaintSetup( baseHeight += 32; } - else if ((slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) != 0) + else if ((slope & kTileSlopeRaisedCornersMask) != 0) { // 1 to 3 quarters up heightSteps--; @@ -607,7 +607,7 @@ bool WoodenBSupportsPaintSetup( } else { - auto imageId = imageTemplate.WithIndex(imageIndex + word_97B3C4[slope & kTileElementSurfaceSlopeMask]); + auto imageId = imageTemplate.WithIndex(imageIndex + word_97B3C4[slope & kTileSlopeMask]); PaintAddImageAsParent(session, imageId, { 0, 0, baseHeight }, { { 0, 0, baseHeight + 2 }, { 32, 32, 3 } }); hasSupports = true; } @@ -689,7 +689,7 @@ bool PathBoxSupportsPaintSetup( int16_t heightSteps = supportLength / 16; - if (session.Support.slope & 0x20) + if (session.Support.slope & kTileSlopeAboveTrackOrScenery) { // save dx2 PaintAddImageAsParent( @@ -704,7 +704,7 @@ bool PathBoxSupportsPaintSetup( return false; } - uint32_t imageId = supportOrientationOffset + word_97B3C4[session.Support.slope & kTileElementSurfaceSlopeMask] + uint32_t imageId = supportOrientationOffset + word_97B3C4[session.Support.slope & kTileSlopeMask] + pathPaintInfo.BridgeImageId; PaintAddImageAsParent( @@ -725,7 +725,7 @@ bool PathBoxSupportsPaintSetup( return false; } - uint32_t ebx = supportOrientationOffset + word_97B3C4[session.Support.slope & kTileElementSurfaceSlopeMask] + uint32_t ebx = supportOrientationOffset + word_97B3C4[session.Support.slope & kTileSlopeMask] + pathPaintInfo.BridgeImageId; PaintAddImageAsParent( diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index 06becae32e..f6b22ec944 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -16,6 +16,7 @@ #include "../../localisation/Formatter.h" #include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../object/BannerObject.h" #include "../../object/ObjectEntryManager.h" #include "../../profiling/Profiling.h" @@ -49,7 +50,7 @@ static void PaintBannerScrollingText( return; auto scrollingMode = bannerEntry.scrolling_mode + (direction & 3); - if (scrollingMode >= MAX_SCROLLING_TEXT_MODES) + if (scrollingMode >= kMaxScrollingTextModes) { return; } @@ -58,7 +59,7 @@ static void PaintBannerScrollingText( banner.FormatTextTo(ft, true); char text[256]; - if (gConfigGeneral.UpperCaseBanners) + if (Config::Get().general.UpperCaseBanners) { FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } diff --git a/src/openrct2/paint/tile_element/Paint.Entrance.cpp b/src/openrct2/paint/tile_element/Paint.Entrance.cpp index 40a3ac289b..a737543380 100644 --- a/src/openrct2/paint/tile_element/Paint.Entrance.cpp +++ b/src/openrct2/paint/tile_element/Paint.Entrance.cpp @@ -31,6 +31,7 @@ #include "../../world/TileInspector.h" #include "../support/WoodenSupports.h" #include "Paint.TileElement.h" +#include "Segment.h" using namespace OpenRCT2; @@ -62,7 +63,7 @@ static void PaintRideEntranceExitScrollingText( } char text[256]; - if (gConfigGeneral.UpperCaseBanners) + if (Config::Get().general.UpperCaseBanners) { FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } @@ -189,7 +190,7 @@ static void PaintRideEntranceExit(PaintSession& session, uint8_t direction, int3 { { (direction & 1) ? 28 : 2, (direction & 1) ? 2 : 28, height }, boundBoxLength }); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); if (!entranceEl.IsGhost()) PaintRideEntranceExitScrollingText(session, entranceEl, *stationObj, direction, height); @@ -204,7 +205,7 @@ static void PaintRideEntranceExit(PaintSession& session, uint8_t direction, int3 height += isExit ? 40 : 56; PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height, 0x20); + PaintUtilSetGeneralSupportHeight(session, height); } static void PaintParkEntranceScrollingText( @@ -234,7 +235,7 @@ static void PaintParkEntranceScrollingText( } char text[256]; - if (gConfigGeneral.UpperCaseBanners) + if (Config::Get().general.UpperCaseBanners) { FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } @@ -332,7 +333,7 @@ static void PaintParkEntrance(PaintSession& session, uint8_t direction, int32_t session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, supportsImageTemplate); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); } static void PaintHeightMarkers(PaintSession& session, const EntranceElement& entranceEl, int32_t height) diff --git a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp index 67a4292d6b..05320a6d98 100644 --- a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp @@ -18,6 +18,7 @@ #include "../../localisation/Formatter.h" #include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../object/LargeSceneryObject.h" #include "../../profiling/Profiling.h" #include "../../ride/Ride.h" @@ -30,6 +31,7 @@ #include "../Boundbox.h" #include "../support/WoodenSupports.h" #include "Paint.TileElement.h" +#include "Segment.h" using namespace OpenRCT2; @@ -84,7 +86,7 @@ static void PaintLargeScenerySupports( { PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); } - PaintUtilSetGeneralSupportHeight(session, clearanceHeight, 0x20); + PaintUtilSetGeneralSupportHeight(session, clearanceHeight); } static std::string_view LargeSceneryCalculateDisplayText(const LargeSceneryText& text, std::string_view s, bool height) @@ -315,7 +317,7 @@ static void PaintLargeSceneryScrollingText( banner->FormatTextTo(ft); char text[256]; - if (gConfigGeneral.UpperCaseBanners) + if (Config::Get().general.UpperCaseBanners) { FormatStringToUpper(text, sizeof(text), STR_SCROLLING_SIGN_TEXT, ft.Data()); } diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index e8872a0866..cab866af85 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -19,6 +19,7 @@ #include "../../localisation/Formatter.h" #include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../object/FootpathObject.h" #include "../../object/FootpathRailingsObject.h" #include "../../object/FootpathSurfaceObject.h" @@ -33,6 +34,7 @@ #include "../../world/Scenery.h" #include "../../world/Surface.h" #include "../../world/TileInspector.h" +#include "../../world/tile_element/Slope.h" #include "../Boundbox.h" #include "../Paint.SessionFlags.h" #include "../support/MetalSupports.h" @@ -40,16 +42,17 @@ #include "Paint.PathAddition.h" #include "Paint.Surface.h" #include "Paint.TileElement.h" +#include "Segment.h" using namespace OpenRCT2; bool gPaintWidePathsAsGhost = false; const uint8_t PathSlopeToLandSlope[] = { - TILE_ELEMENT_SLOPE_SW_SIDE_UP, - TILE_ELEMENT_SLOPE_NW_SIDE_UP, - TILE_ELEMENT_SLOPE_NE_SIDE_UP, - TILE_ELEMENT_SLOPE_SE_SIDE_UP, + kTileSlopeSWSideUp, + kTileSlopeNWSideUp, + kTileSlopeNESideUp, + kTileSlopeSESideUp, }; static constexpr uint8_t Byte98D6E0[] = { @@ -159,7 +162,7 @@ static void PathPaintQueueBanner( { ft.Add(STR_RIDE_ENTRANCE_CLOSED); } - if (gConfigGeneral.UpperCaseBanners) + if (Config::Get().general.UpperCaseBanners) { FormatStringToUpper( gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data()); @@ -637,17 +640,17 @@ static void Sub6A3F61( if (sloped && direction == EDGE_NE) { // Path going down into the tunnel - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::PathAndMiniGolf); } else if (connectedEdges & EDGE_NE) { // Flat path with edge to the right (north-east) - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_11); + PaintUtilPushTunnelRight(session, height, TunnelType::Path11); } else { // Path going up, or flat and not connected to the right - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); } } @@ -660,17 +663,17 @@ static void Sub6A3F61( if (sloped && direction == EDGE_SE) { // Path going down into the tunnel - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::PathAndMiniGolf); } else if (connectedEdges & EDGE_NW) { // Flat path with edge to the left (north-west) - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_11); + PaintUtilPushTunnelLeft(session, height, TunnelType::Path11); } else { // Path going up, or flat and not connected to the left - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); } } @@ -722,7 +725,7 @@ static bool ShouldDrawSupports(PaintSession& session, const PathElement& pathEl, return true; } } - else if (surface->GetSlope() != TILE_ELEMENT_SLOPE_FLAT) + else if (surface->GetSlope() != kTileSlopeFlat) { return true; } @@ -909,7 +912,7 @@ static void PathPaintSegmentSupportHeight( height += 16; } - PaintUtilSetGeneralSupportHeight(session, height, 0x20); + PaintUtilSetGeneralSupportHeight(session, height); if (pathElement.IsQueue() || (pathElement.GetEdgesAndCorners() != 0xFF && hasSupports)) { diff --git a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp index 5934ae8700..b3098ef31d 100644 --- a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp @@ -11,7 +11,6 @@ #include "../../Game.h" #include "../../GameState.h" -#include "../../config/Config.h" #include "../../interface/Viewport.h" #include "../../localisation/Date.h" #include "../../object/SmallSceneryEntry.h" @@ -23,6 +22,7 @@ #include "../../world/TileInspector.h" #include "../support/WoodenSupports.h" #include "Paint.TileElement.h" +#include "Segment.h" using namespace OpenRCT2; @@ -73,7 +73,7 @@ static void SetSupportHeights( { height += sceneryEntry.height; - PaintUtilSetGeneralSupportHeight(session, Ceil2(height, 8), 0x20); + PaintUtilSetGeneralSupportHeight(session, Ceil2(height, 8)); if (sceneryEntry.HasFlag(SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP)) { if (sceneryEntry.HasFlag(SMALL_SCENERY_FLAG_FULL_TILE)) diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index 7ba00c73ea..7908dcdf75 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -28,9 +28,11 @@ #include "../../ride/TrackDesign.h" #include "../../sprites.h" #include "../../world/Surface.h" +#include "../../world/tile_element/Slope.h" #include "../Boundbox.h" #include "../Paint.SessionFlags.h" #include "Paint.TileElement.h" +#include "Segment.h" #include #include @@ -152,63 +154,42 @@ static constexpr uint8_t Byte97B55D[] = { 1, 5, 1, 3, 2, 3, 1, 5, 0, }; -static constexpr uint8_t _tunnelHeights[TUNNEL_TYPE_COUNT][2] = { - { 2, 2 }, - { 3, 3 }, - { 3, 5 }, - { 3, 3 }, - { 4, 4 }, - { 4, 6 }, - { 2, 2 }, - { 3, 3 }, - { 3, 5 }, - { 3, 3 }, - { 2, 3 }, - { 2, 3 }, - { 2, 3 }, - { 3, 4 }, - { 2, 3 }, - { 3, 4 }, - { 2, 2 }, - { 2, 2 }, - { 2, 2 }, - { 2, 2 }, - { 2, 2 }, - { 2, 2 }, - { 2, 2 }, +struct TunnelDescriptor +{ + uint8_t height; + uint8_t boundBoxLength; + int16_t boundBoxZOffset; + TunnelType lowClearanceAlternative; + uint8_t imageOffset; }; - -static constexpr int16_t _boundBoxZOffsets[TUNNEL_TYPE_COUNT] = { - 0, - 0, - -32, - 0, - 0, - -48, - 0, - 0, - -32, - 0, - -16, - -16, - -16, - -16, - -16, - -16, - 0, - 0, - 0, - 0, - 0, - 0, - 0, +static constexpr TunnelDescriptor kTunnels[] = { + { 2, 2, 0, TunnelType::StandardFlat, 36 }, // TunnelType::StandardFlat + { 3, 3, 0, TunnelType::StandardFlat, 40 }, // TunnelType::StandardSlopeStart + { 3, 5, -32, TunnelType::StandardFlat, 44 }, // TunnelType::StandardSlopeEnd + { 3, 3, 0, TunnelType::InvertedFlat, 48 }, // TunnelType::InvertedFlat + { 4, 4, 0, TunnelType::InvertedFlat, 52 }, // TunnelType::InvertedSlopeStart + { 4, 6, -48, TunnelType::InvertedFlat, 56 }, // TunnelType::InvertedSlopeEnd + { 2, 2, 0, TunnelType::SquareFlat, 60 }, // TunnelType::SquareFlat + { 3, 3, 0, TunnelType::SquareFlat, 64 }, // TunnelType::SquareSlopeStart + { 3, 5, -32, TunnelType::SquareFlat, 68 }, // TunnelType::SquareSlopeEnd + { 3, 3, 0, TunnelType::SquareFlat, 72 }, // TunnelType::InvertedSquare + { 2, 3, -16, TunnelType::PathAndMiniGolf, 76 }, // TunnelType::PathAndMiniGolf + { 2, 3, -16, TunnelType::Path11, 80 }, // TunnelType::Path11 + { 2, 3, -16, TunnelType::_12, 36 }, // TunnelType::_12 + { 3, 4, -16, TunnelType::_13, 48 }, // TunnelType::_13 + { 2, 3, -16, TunnelType::_14, 60 }, // TunnelType::_14 + { 3, 4, -16, TunnelType::_14, 72 }, // TunnelType::_15 + { 2, 2, 0, TunnelType::Doors0, 76 }, // TunnelType::Doors0 + { 2, 2, 0, TunnelType::Doors1, 80 }, // TunnelType::Doors1 + { 2, 2, 0, TunnelType::Doors2, 84 }, // TunnelType::Doors2 + { 2, 2, 0, TunnelType::Doors3, 88 }, // TunnelType::Doors3 + { 2, 2, 0, TunnelType::Doors4, 92 }, // TunnelType::Doors4 + { 2, 2, 0, TunnelType::Doors5, 96 }, // TunnelType::Doors5 + { 2, 2, 0, TunnelType::Doors6, 100 }, // TunnelType::Doors6 }; // clang-format on // tunnel offset -static constexpr uint8_t Byte97B5B0[TUNNEL_TYPE_COUNT] = { - 0, 0, 0, 3, 3, 3, 6, 6, 6, 6, 10, 11, 12, 13, 14, 14, 16, 17, 18, 19, 20, 21, 22, -}; static constexpr uint8_t Byte97B740[] = { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 1, 4, 0, @@ -358,33 +339,28 @@ static ImageId GetEdgeImage(const TerrainEdgeObject* edgeObject, uint8_t type) return result; } -static ImageId GetTunnelImage(const TerrainEdgeObject* edgeObject, uint8_t type, edge_t edge) +static ImageId GetTunnelImage(const TerrainEdgeObject* edgeObject, TunnelType type, edge_t edge) { - static constexpr uint32_t offsets[TUNNEL_TYPE_COUNT] = { 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, - 36, 48, 60, 72, 76, 80, 84, 88, 92, 96, 100 }; - bool hasDoors = false; if (edgeObject != nullptr) { hasDoors = edgeObject->HasDoors && !edgeObject->UsesFallbackImages(); } - if (!hasDoors && type >= REGULAR_TUNNEL_TYPE_COUNT && type < std::size(offsets)) - type = TUNNEL_0; + if (!hasDoors && EnumValue(type) >= kRegularTunnelTypeCount) + type = TunnelType::StandardFlat; + + ImageId result = GetEdgeImageWithOffset(edgeObject, kTunnels[EnumValue(type)].imageOffset) + .WithIndexOffset(edge == EDGE_BOTTOMRIGHT ? 2 : 0); - ImageId result; - if (type < std::size(offsets)) - { - result = GetEdgeImageWithOffset(edgeObject, offsets[type]).WithIndexOffset(edge == EDGE_BOTTOMRIGHT ? 2 : 0); - } return result; } static uint8_t ViewportSurfacePaintSetupGetRelativeSlope(const SurfaceElement& surfaceElement, int32_t rotation) { const uint8_t slope = surfaceElement.GetSlope(); - const uint8_t slopeHeight = slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT; - uint16_t slopeCorners = (slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) << rotation; + const uint8_t slopeHeight = slope & kTileSlopeDiagonalFlag; + uint16_t slopeCorners = (slope & kTileSlopeRaisedCornersMask) << rotation; slopeCorners = ((slopeCorners >> 4) | slopeCorners) & 0x0F; return slopeHeight | slopeCorners; } @@ -628,7 +604,7 @@ static void ViewportSurfaceDrawTileSideBottom( neighbourCornerHeight1 = cornerHeight2; - for (uint32_t tunnelIndex = 0; tunnelIndex < TUNNEL_MAX_COUNT;) + for (auto tunnelIndex = 0; tunnelIndex < kTunnelMaxCount;) { if (curHeight >= cornerHeight1 || curHeight >= cornerHeight2) { @@ -668,19 +644,22 @@ static void ViewportSurfaceDrawTileSideBottom( } // Tunnels - uint8_t tunnelType = tunnelArray[tunnelIndex].type; - uint8_t tunnelHeight = _tunnelHeights[tunnelType][0]; + auto tunnelType = tunnelArray[tunnelIndex].type; + auto td = kTunnels[EnumValue(tunnelType)]; + uint8_t tunnelHeight = td.height; int16_t zOffset = curHeight; + // When dealing with flat land but a sloped track, we fall back to the non-sloped variant. if ((zOffset + tunnelHeight) > neighbourCornerHeight1 || (zOffset + tunnelHeight) > cornerHeight1) { - tunnelType = Byte97B5B0[tunnelType]; + tunnelType = td.lowClearanceAlternative; + td = kTunnels[EnumValue(tunnelType)]; } zOffset *= 16; - int16_t boundBoxOffsetZ = zOffset + _boundBoxZOffsets[tunnelType]; - int8_t boundBoxLength = _tunnelHeights[tunnelType][1] * 16; + int16_t boundBoxOffsetZ = zOffset + td.boundBoxZOffset; + int8_t boundBoxLength = td.boundBoxLength * 16; if (boundBoxOffsetZ < 16) { boundBoxOffsetZ += 16; @@ -689,12 +668,11 @@ static void ViewportSurfaceDrawTileSideBottom( auto imageId = GetTunnelImage(edgeObject, tunnelType, edge); PaintAddImageAsParent( - session, imageId, { offset, zOffset }, - { { 0, 0, boundBoxOffsetZ }, { tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1 } }); + session, imageId, { offset, zOffset }, { { 0, 0, boundBoxOffsetZ }, { tunnelBounds, boundBoxLength - 1 } }); boundBoxOffsetZ = curHeight * COORDS_Z_PER_TINY_Z; - boundBoxLength = _tunnelHeights[tunnelType][1] * 16; - boundBoxOffsetZ += _boundBoxZOffsets[tunnelType]; + boundBoxLength = td.boundBoxLength * 16; + boundBoxOffsetZ += td.boundBoxZOffset; if (boundBoxOffsetZ == 0) { boundBoxOffsetZ += 16; @@ -704,10 +682,9 @@ static void ViewportSurfaceDrawTileSideBottom( imageId = GetTunnelImage(edgeObject, tunnelType, edge).WithIndexOffset(1); PaintAddImageAsParent( session, imageId, { offset, curHeight * COORDS_Z_PER_TINY_Z }, - { { tunnelTopBoundBoxOffset.x, tunnelTopBoundBoxOffset.y, boundBoxOffsetZ }, - { tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1 } }); + { { tunnelTopBoundBoxOffset, boundBoxOffsetZ }, { tunnelBounds, boundBoxLength - 1 } }); - curHeight += _tunnelHeights[tunnelType][0]; + curHeight += td.height; tunnelIndex++; } } @@ -864,14 +841,14 @@ static std::pair SurfaceGetHeightAboveWater( { localHeight += LAND_HEIGHT_STEP; - if (waterHeight != localHeight || !(localSurfaceShape & static_cast(kTileElementSurfaceDiagonalFlag))) + if (waterHeight != localHeight || !(localSurfaceShape & static_cast(kTileSlopeDiagonalFlag))) { localHeight = waterHeight; - localSurfaceShape = TILE_ELEMENT_SLOPE_FLAT; + localSurfaceShape = kTileSlopeFlat; } else { - localSurfaceShape = Numerics::ror4(surfaceShape ^ static_cast(kTileElementSurfaceRaisedCornersMask), 2); + localSurfaceShape = Numerics::ror4(surfaceShape ^ static_cast(kTileSlopeRaisedCornersMask), 2); } } } @@ -881,12 +858,16 @@ static std::pair SurfaceGetHeightAboveWater( std::optional GetPatrolAreaTileColour(const CoordsXY& pos) { + bool selected = gMapSelectFlags & MAP_SELECT_FLAG_ENABLE && gMapSelectType == MAP_SELECT_TYPE_FULL + && pos.x >= gMapSelectPositionA.x && pos.x <= gMapSelectPositionB.x && pos.y >= gMapSelectPositionA.y + && pos.y <= gMapSelectPositionB.y; + auto patrolAreaToRender = GetPatrolAreaToRender(); if (const auto* staffType = std::get_if(&patrolAreaToRender)) { if (IsPatrolAreaSetForStaffType(*staffType, pos)) { - return COLOUR_GREY; + return selected ? COLOUR_WHITE : COLOUR_GREY; } } else @@ -897,11 +878,11 @@ std::optional GetPatrolAreaTileColour(const CoordsXY& pos) { if (staff->IsPatrolAreaSet(pos)) { - return COLOUR_LIGHT_BLUE; + return selected ? COLOUR_ICY_BLUE : COLOUR_LIGHT_BLUE; } else if (IsPatrolAreaSetForStaffType(staff->AssignedStaffType, pos)) { - return COLOUR_GREY; + return selected ? COLOUR_WHITE : COLOUR_GREY; } } } @@ -1268,7 +1249,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con } if (zoomLevel <= ZoomLevel{ 0 } && has_surface && !(session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) - && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE) && gConfigGeneral.LandscapeSmoothing) + && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE) && Config::Get().general.LandscapeSmoothing) { ViewportSurfaceSmoothenEdge(session, EDGE_TOPLEFT, selfDescriptor, tileDescriptors[2]); ViewportSurfaceSmoothenEdge(session, EDGE_TOPRIGHT, selfDescriptor, tileDescriptors[3]); @@ -1317,7 +1298,8 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con const auto image_id = ImageId(SPR_WATER_MASK + image_offset, FilterPaletteID::PaletteWater).WithBlended(true); PaintAddImageAsParent(session, image_id, { 0, 0, waterHeight }, { 32, 32, -1 }); - const bool transparent = gConfigGeneral.TransparentWater || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); + const bool transparent = Config::Get().general.TransparentWater + || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); const uint32_t overlayStart = transparent ? SPR_WATER_OVERLAY : SPR_RCT1_WATER_OVERLAY; PaintAttachToPreviousPS(session, ImageId(overlayStart + image_offset), 0, 0); diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.cpp b/src/openrct2/paint/tile_element/Paint.TileElement.cpp index 6ddd206c32..fce2941530 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.cpp +++ b/src/openrct2/paint/tile_element/Paint.TileElement.cpp @@ -27,11 +27,14 @@ #include "../../world/Map.h" #include "../../world/Scenery.h" #include "../../world/Surface.h" +#include "../../world/tile_element/Slope.h" #include "../Paint.SessionFlags.h" #include "../Paint.h" #include "../VirtualFloor.h" -#include "../support/WoodenSupports.h" #include "Paint.Surface.h" +#include "Segment.h" + +using namespace OpenRCT2; static void BlankTilesPaint(PaintSession& session, int32_t x, int32_t y); static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoords); @@ -124,8 +127,8 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor session.LeftTunnelCount = 0; session.RightTunnelCount = 0; - session.LeftTunnels[0] = { 0xFF, 0xFF }; - session.RightTunnels[0] = { 0xFF, 0xFF }; + session.LeftTunnels[0] = { 0xFF, TunnelType::Null }; + session.RightTunnels[0] = { 0xFF, TunnelType::Null }; session.VerticalTunnelHeight = 0xFF; session.MapPosition.x = coords.x; session.MapPosition.y = coords.y; @@ -137,7 +140,7 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor bool partOfVirtualFloor = false; - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) { partOfVirtualFloor = VirtualFloorTileIsFloor(session.MapPosition); } @@ -283,7 +286,7 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor session.MapPosition = mapPosition; } while (!(tile_element++)->IsLastForTile()); - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off && partOfVirtualFloor) + if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off && partOfVirtualFloor) { VirtualFloorPaint(session); } @@ -331,39 +334,14 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor } } -void PaintUtilPushTunnelLeft(PaintSession& session, uint16_t height, uint8_t type) -{ - session.LeftTunnels[session.LeftTunnelCount] = { static_cast((height / 16)), type }; - if (session.LeftTunnelCount < TUNNEL_MAX_COUNT - 1) - { - session.LeftTunnels[session.LeftTunnelCount + 1] = { 0xFF, 0xFF }; - session.LeftTunnelCount++; - } -} - -void PaintUtilPushTunnelRight(PaintSession& session, uint16_t height, uint8_t type) -{ - session.RightTunnels[session.RightTunnelCount] = { static_cast((height / 16)), type }; - if (session.RightTunnelCount < TUNNEL_MAX_COUNT - 1) - { - session.RightTunnels[session.RightTunnelCount + 1] = { 0xFF, 0xFF }; - session.RightTunnelCount++; - } -} - -void PaintUtilSetVerticalTunnel(PaintSession& session, uint16_t height) -{ - session.VerticalTunnelHeight = height / 16; -} - -void PaintUtilSetGeneralSupportHeight(PaintSession& session, int16_t height, uint8_t slope) +void PaintUtilSetGeneralSupportHeight(PaintSession& session, int16_t height) { if (session.Support.height >= height) { return; } - PaintUtilForceSetGeneralSupportHeight(session, height, slope); + PaintUtilForceSetGeneralSupportHeight(session, height, kTileSlopeAboveTrackOrScenery); } void PaintUtilForceSetGeneralSupportHeight(PaintSession& session, int16_t height, uint8_t slope) diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.h b/src/openrct2/paint/tile_element/Paint.TileElement.h index cea6ed18a4..99a7d5e9e1 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.h +++ b/src/openrct2/paint/tile_element/Paint.TileElement.h @@ -26,57 +26,6 @@ enum edge_t EDGE_TOPRIGHT = EDGE_NE }; -// 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. -enum class PaintSegment : uint16_t -{ - topCorner = 0, - topRightSide = 1, - rightCorner = 2, - bottomRightSide = 3, - bottomCorner = 4, - bottomLeftSide = 5, - leftCorner = 6, - topLeftSide = 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); - -enum -{ - TUNNEL_0 = 0, - TUNNEL_1 = 1, - TUNNEL_2 = 2, - TUNNEL_INVERTED_3 = 3, - TUNNEL_INVERTED_4 = 4, - TUNNEL_INVERTED_5 = 5, - TUNNEL_SQUARE_FLAT = 6, - TUNNEL_SQUARE_7 = 7, - TUNNEL_SQUARE_8 = 8, - TUNNEL_SQUARE_INVERTED_9 = 9, - TUNNEL_PATH_AND_MINI_GOLF = 0x0A, - TUNNEL_PATH_11 = 0x0B, - TUNNEL_12 = 0x0C, - TUNNEL_13 = 0x0D, - TUNNEL_14 = 0x0E, - TUNNEL_15 = 0x0F, - REGULAR_TUNNEL_TYPE_COUNT, - - // Ghost train doors - TUNNEL_DOORS_0 = 16, - TUNNEL_DOORS_1 = 17, - TUNNEL_DOORS_2 = 18, - TUNNEL_DOORS_3 = 19, - TUNNEL_DOORS_4 = 20, - TUNNEL_DOORS_5 = 21, - TUNNEL_DOORS_6 = 22, - - TUNNEL_TYPE_COUNT -}; - extern const uint16_t segment_offsets[9]; extern bool gShowSupportSegmentHeights; @@ -85,11 +34,7 @@ extern const CoordsXY BannerBoundBoxes[][2]; extern const uint8_t PathSlopeToLandSlope[4]; -void PaintUtilPushTunnelLeft(PaintSession& session, uint16_t height, uint8_t type); -void PaintUtilPushTunnelRight(PaintSession& session, uint16_t height, uint8_t type); -void PaintUtilSetVerticalTunnel(PaintSession& session, uint16_t height); - -void PaintUtilSetGeneralSupportHeight(PaintSession& session, int16_t height, uint8_t slope); +void PaintUtilSetGeneralSupportHeight(PaintSession& session, int16_t height); void PaintUtilForceSetGeneralSupportHeight(PaintSession& session, int16_t height, uint8_t slope); void PaintUtilSetSegmentSupportHeight(PaintSession& session, int32_t segments, uint16_t height, uint8_t slope); uint16_t PaintUtilRotateSegments(uint16_t segments, uint8_t rotation); diff --git a/src/openrct2/paint/tile_element/Paint.Tunnel.cpp b/src/openrct2/paint/tile_element/Paint.Tunnel.cpp new file mode 100644 index 0000000000..d0c7f3c0cd --- /dev/null +++ b/src/openrct2/paint/tile_element/Paint.Tunnel.cpp @@ -0,0 +1,185 @@ + +#include "Paint.Tunnel.h" + +#include "../Paint.h" + +#include + +using namespace OpenRCT2; + +void PaintUtilPushTunnelLeft(PaintSession& session, uint16_t height, TunnelType type) +{ + session.LeftTunnels[session.LeftTunnelCount] = { static_cast((height / 16)), type }; + if (session.LeftTunnelCount < kTunnelMaxCount - 1) + { + session.LeftTunnels[session.LeftTunnelCount + 1] = { 0xFF, TunnelType::Null }; + session.LeftTunnelCount++; + } +} + +void PaintUtilPushTunnelRight(PaintSession& session, uint16_t height, TunnelType type) +{ + session.RightTunnels[session.RightTunnelCount] = { static_cast((height / 16)), type }; + if (session.RightTunnelCount < kTunnelMaxCount - 1) + { + session.RightTunnels[session.RightTunnelCount + 1] = { 0xFF, TunnelType::Null }; + session.RightTunnelCount++; + } +} + +void PaintUtilSetVerticalTunnel(PaintSession& session, uint16_t height) +{ + session.VerticalTunnelHeight = height / 16; +} + +void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, TunnelType type) +{ + if (direction & 1) + { + PaintUtilPushTunnelRight(session, height, type); + } + else + { + PaintUtilPushTunnelLeft(session, height, type); + } +} + +void TrackPaintUtilRightQuarterTurn5TilesTunnel( + PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, TunnelType tunnelType) +{ + if (direction == 0 && trackSequence == 0) + { + PaintUtilPushTunnelLeft(session, height, tunnelType); + } + if (direction == 0 && trackSequence == 6) + { + PaintUtilPushTunnelRight(session, height, tunnelType); + } + if (direction == 1 && trackSequence == 6) + { + PaintUtilPushTunnelLeft(session, height, tunnelType); + } + if (direction == 3 && trackSequence == 0) + { + PaintUtilPushTunnelRight(session, height, tunnelType); + } +} + +void TrackPaintUtilRightQuarterTurn3TilesTunnel( + PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, TunnelType tunnelType) +{ + if (direction == 0 && trackSequence == 0) + { + PaintUtilPushTunnelLeft(session, height, tunnelType); + } + + if (direction == 0 && trackSequence == 3) + { + PaintUtilPushTunnelRight(session, height, tunnelType); + } + + if (direction == 1 && trackSequence == 3) + { + PaintUtilPushTunnelLeft(session, height, tunnelType); + } + + if (direction == 3 && trackSequence == 0) + { + PaintUtilPushTunnelRight(session, height, tunnelType); + } +} + +void TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel( + PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, TunnelType tunnelType0, + TunnelType tunnelType3) +{ + if (direction == 0 && trackSequence == 0) + { + PaintUtilPushTunnelLeft(session, height - 8, tunnelType0); + } + if (direction == 0 && trackSequence == 3) + { + PaintUtilPushTunnelRight(session, height + 8, tunnelType3); + } + if (direction == 1 && trackSequence == 3) + { + PaintUtilPushTunnelLeft(session, height + 8, tunnelType3); + } + if (direction == 3 && trackSequence == 0) + { + PaintUtilPushTunnelRight(session, height - 8, tunnelType0); + } +} + +void TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel( + PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, TunnelType tunnelType0, + TunnelType tunnelType3) +{ + if (direction == 0 && trackSequence == 0) + { + PaintUtilPushTunnelLeft(session, height + 8, tunnelType0); + } + if (direction == 0 && trackSequence == 3) + { + PaintUtilPushTunnelRight(session, height - 8, tunnelType3); + } + if (direction == 1 && trackSequence == 3) + { + PaintUtilPushTunnelLeft(session, height - 8, tunnelType3); + } + if (direction == 3 && trackSequence == 0) + { + PaintUtilPushTunnelRight(session, height + 8, tunnelType0); + } +} + +void TrackPaintUtilLeftQuarterTurn3TilesTunnel( + PaintSession& session, int16_t height, TunnelType tunnelType, Direction direction, uint8_t trackSequence) +{ + if (direction == 0 && trackSequence == 0) + { + PaintUtilPushTunnelLeft(session, height, tunnelType); + } + + if (direction == 2 && trackSequence == 3) + { + PaintUtilPushTunnelRight(session, height, tunnelType); + } + + if (direction == 3 && trackSequence == 0) + { + PaintUtilPushTunnelRight(session, height, tunnelType); + } + + if (direction == 3 && trackSequence == 3) + { + PaintUtilPushTunnelLeft(session, height, tunnelType); + } +} + +void TrackPaintUtilRightQuarterTurn1TileTunnel( + PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, TunnelType startTunnel, + int8_t endOffset, TunnelType endTunnel) +{ + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, (direction + 3) % kNumOrthogonalDirections, baseHeight, endOffset, endTunnel, startOffset, startTunnel); +} + +void TrackPaintUtilLeftQuarterTurn1TileTunnel( + PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, TunnelType startTunnel, + int8_t endOffset, TunnelType endTunnel) +{ + switch (direction) + { + case 0: + PaintUtilPushTunnelLeft(session, baseHeight + startOffset, startTunnel); + break; + case 2: + PaintUtilPushTunnelRight(session, baseHeight + endOffset, endTunnel); + break; + case 3: + PaintUtilPushTunnelRight(session, baseHeight + startOffset, startTunnel); + PaintUtilPushTunnelLeft(session, baseHeight + endOffset, endTunnel); + break; + } +} diff --git a/src/openrct2/paint/tile_element/Paint.Tunnel.h b/src/openrct2/paint/tile_element/Paint.Tunnel.h new file mode 100644 index 0000000000..1cfea84b32 --- /dev/null +++ b/src/openrct2/paint/tile_element/Paint.Tunnel.h @@ -0,0 +1,85 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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/Location.hpp" + +#include + +struct PaintSession; + +constexpr uint8_t kTunnelMaxCount = 65; + +enum class TunnelType : uint8_t +{ + StandardFlat = 0, // Used on flat track (or the flat part of flat-to-sloped track) + StandardSlopeStart = 1, // Used on the lower end of sloped track + StandardSlopeEnd = 2, // Used on the upper end of sloped track + InvertedFlat = 3, // Used on flat track (or the flat part of flat-to-sloped track) + InvertedSlopeStart = 4, // Used on the lower end of sloped track + InvertedSlopeEnd = 5, // Used on the upper end of sloped track + SquareFlat = 6, // Used on flat track (or the flat part of flat-to-sloped track) + SquareSlopeStart = 7, // Used on the lower end of sloped track + SquareSlopeEnd = 8, // Used on the upper end of sloped track + InvertedSquare = 9, + PathAndMiniGolf = 10, + Path11 = 11, + _12 = 12, + _13 = 13, + _14 = 14, + _15 = 15, + + // Ghost train doors + Doors0 = 16, + Doors1 = 17, + Doors2 = 18, + Doors3 = 19, + Doors4 = 20, + Doors5 = 21, + Doors6 = 22, + + Count, + + Null = 255, +}; +constexpr uint8_t kRegularTunnelTypeCount = 16; + +struct TunnelEntry +{ + uint8_t height; + TunnelType type; +}; + +void PaintUtilPushTunnelLeft(PaintSession& session, uint16_t height, TunnelType type); +void PaintUtilPushTunnelRight(PaintSession& session, uint16_t height, TunnelType type); +void PaintUtilSetVerticalTunnel(PaintSession& session, uint16_t height); +void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, TunnelType type); + +void TrackPaintUtilRightQuarterTurn5TilesTunnel( + PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, TunnelType tunnelType); + +void TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel( + PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, TunnelType tunnelType0, + TunnelType tunnelType3); +void TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel( + PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, TunnelType tunnelType0, + TunnelType tunnelType3); + +void TrackPaintUtilRightQuarterTurn3TilesTunnel( + PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, TunnelType tunnelType); +void TrackPaintUtilLeftQuarterTurn3TilesTunnel( + PaintSession& session, int16_t height, TunnelType tunnelType, Direction direction, uint8_t trackSequence); + +void TrackPaintUtilLeftQuarterTurn1TileTunnel( + PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, TunnelType startTunnel, + int8_t endOffset, TunnelType endTunnel); +void TrackPaintUtilRightQuarterTurn1TileTunnel( + PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, TunnelType startTunnel, + int8_t endOffset, TunnelType endTunnel); diff --git a/src/openrct2/paint/tile_element/Paint.Wall.cpp b/src/openrct2/paint/tile_element/Paint.Wall.cpp index a6cd5ef823..71d4a66a75 100644 --- a/src/openrct2/paint/tile_element/Paint.Wall.cpp +++ b/src/openrct2/paint/tile_element/Paint.Wall.cpp @@ -18,6 +18,7 @@ #include "../../interface/Viewport.h" #include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../object/WallSceneryEntry.h" #include "../../profiling/Profiling.h" #include "../../ride/Track.h" @@ -164,7 +165,7 @@ static void PaintWallScrollingText( return; scrollingMode = wallEntry.scrolling_mode + ((direction + 1) & 3); - if (scrollingMode >= MAX_SCROLLING_TEXT_MODES) + if (scrollingMode >= kMaxScrollingTextModes) return; auto banner = wallElement.GetBanner(); @@ -177,7 +178,7 @@ static void PaintWallScrollingText( auto ft = Formatter(); banner->FormatTextTo(ft); char signString[256]; - if (gConfigGeneral.UpperCaseBanners) + if (Config::Get().general.UpperCaseBanners) { FormatStringToUpper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data()); } @@ -332,7 +333,7 @@ void PaintWall(PaintSession& session, uint8_t direction, int32_t height, const W imageTemplate = imageTemplate.WithTertiary(wallElement.GetTertiaryColour()); } - PaintUtilSetGeneralSupportHeight(session, 8 * wallElement.ClearanceHeight, 0x20); + PaintUtilSetGeneralSupportHeight(session, 8 * wallElement.ClearanceHeight); auto isGhost = false; if (gTrackDesignSaveMode) diff --git a/src/openrct2/paint/tile_element/Segment.h b/src/openrct2/paint/tile_element/Segment.h new file mode 100644 index 0000000000..ead905da6b --- /dev/null +++ b/src/openrct2/paint/tile_element/Segment.h @@ -0,0 +1,33 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 "../../util/Util.h" + +#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. +enum class PaintSegment : uint16_t +{ + topCorner = 0, + topRightSide = 1, + rightCorner = 2, + bottomRightSide = 3, + bottomCorner = 4, + bottomLeftSide = 5, + leftCorner = 6, + topLeftSide = 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); diff --git a/src/openrct2/paint/track/Segment.h b/src/openrct2/paint/track/Segment.h new file mode 100644 index 0000000000..6d093eb5ab --- /dev/null +++ b/src/openrct2/paint/track/Segment.h @@ -0,0 +1,28 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 "../tile_element/Segment.h" + +#include + +namespace BlockedSegments +{ + constexpr uint16_t kStraightFlat = EnumsToFlags( + PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide); + 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), + }; +} // namespace BlockedSegments diff --git a/src/openrct2/paint/track/Support.h b/src/openrct2/paint/track/Support.h new file mode 100644 index 0000000000..3e8a2cbe74 --- /dev/null +++ b/src/openrct2/paint/track/Support.h @@ -0,0 +1,20 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 "../support/MetalSupports.h" + +constexpr int8_t kDefaultGeneralSupportHeight = 32; + +namespace SupportedSequences +{ + constexpr MetalSupportPlace kDiagStraightFlat[] = { MetalSupportPlace::None, MetalSupportPlace::None, + MetalSupportPlace::None, MetalSupportPlace::LeftCorner }; +} diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 7de94e29f9..1100eeb93a 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -818,7 +818,7 @@ namespace OpenRCT2 // Finances if (cs.GetMode() == OrcaStream::Mode::READING) { - auto numMonths = std::min(EXPENDITURE_TABLE_MONTH_COUNT, cs.Read()); + auto numMonths = std::min(kExpenditureTableMonthCount, cs.Read()); auto numTypes = std::min(static_cast(ExpenditureType::Count), cs.Read()); for (uint32_t i = 0; i < numMonths; i++) { @@ -830,7 +830,7 @@ namespace OpenRCT2 } else { - auto numMonths = static_cast(EXPENDITURE_TABLE_MONTH_COUNT); + auto numMonths = static_cast(kExpenditureTableMonthCount); auto numTypes = static_cast(ExpenditureType::Count); cs.Write(numMonths); @@ -846,7 +846,7 @@ namespace OpenRCT2 cs.ReadWrite(gameState.HistoricalProfit); // Marketing - cs.ReadWriteVector(gMarketingCampaigns, [&cs](MarketingCampaign& campaign) { + cs.ReadWriteVector(gameState.MarketingCampaigns, [&cs](MarketingCampaign& campaign) { cs.ReadWrite(campaign.Type); cs.ReadWrite(campaign.WeeksLeft); cs.ReadWrite(campaign.Flags); @@ -857,7 +857,7 @@ namespace OpenRCT2 auto& currentAwards = gameState.CurrentAwards; if (version <= 6) { - Award awards[RCT2::Limits::MaxAwards]{}; + Award awards[RCT2::Limits::kMaxAwards]{}; cs.ReadWriteArray(awards, [&cs, ¤tAwards](Award& award) { if (award.Time != 0) { @@ -1322,7 +1322,7 @@ namespace OpenRCT2 // Colours cs.ReadWrite(ride.entrance_style); - cs.ReadWrite(ride.colour_scheme_type); + cs.ReadWrite(ride.vehicleColourSettings); cs.ReadWriteArray(ride.track_colour, [&cs](TrackColour& tc) { cs.ReadWrite(tc.main); cs.ReadWrite(tc.additional); @@ -1446,7 +1446,7 @@ namespace OpenRCT2 cs.ReadWrite(ride.turn_count_sloped); cs.ReadWrite(ride.inversions); - cs.ReadWrite(ride.drops); + cs.ReadWrite(ride.dropsPoweredLifts); cs.ReadWrite(ride.start_drop_height); cs.ReadWrite(ride.highest_drop_height); cs.ReadWrite(ride.sheltered_length); @@ -1459,11 +1459,11 @@ namespace OpenRCT2 } cs.ReadWrite(ride.current_test_station); cs.ReadWrite(ride.num_block_brakes); - cs.ReadWrite(ride.total_air_time); + cs.ReadWrite(ride.totalAirTime); - cs.ReadWrite(ride.excitement); - cs.ReadWrite(ride.intensity); - cs.ReadWrite(ride.nausea); + cs.ReadWrite(ride.ratings.excitement); + cs.ReadWrite(ride.ratings.intensity); + cs.ReadWrite(ride.ratings.nausea); if (version <= 18) { @@ -1617,7 +1617,7 @@ namespace OpenRCT2 static std::vector LegacyGetRidesBeenOn(const std::array& srcArray) { std::vector ridesBeenOn; - for (uint16_t i = 0; i < RCT2::Limits::MaxRidesInPark; i++) + for (uint16_t i = 0; i < RCT2::Limits::kMaxRidesInPark; i++) { if (srcArray[i / 8] & (1 << (i % 8))) { diff --git a/src/openrct2/park/ParkFile.h b/src/openrct2/park/ParkFile.h index 3aef7d103b..da6bf79e7c 100644 --- a/src/openrct2/park/ParkFile.h +++ b/src/openrct2/park/ParkFile.h @@ -11,7 +11,7 @@ namespace OpenRCT2 struct GameState_t; // Current version that is saved. - constexpr uint32_t PARK_FILE_CURRENT_VERSION = 33; + constexpr uint32_t PARK_FILE_CURRENT_VERSION = 34; // The minimum version that is forwards compatible with the current version. constexpr uint32_t PARK_FILE_MIN_VERSION = 33; diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index e9e8ce5ec3..7a177c0098 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -1836,12 +1836,12 @@ namespace OpenRCT2::PathFinding * appropriate. */ static StationIndex GuestPathfindingSelectRandomStation( - const Guest& guest, int32_t numEntranceStations, BitSet& entranceStations) + const Guest& guest, int32_t numEntranceStations, BitSet& entranceStations) { int32_t select = guest.GuestNumRides % numEntranceStations; while (select > 0) { - for (StationIndex::UnderlyingType i = 0; i < OpenRCT2::Limits::MaxStationsPerRide; i++) + for (StationIndex::UnderlyingType i = 0; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { if (entranceStations[i]) { @@ -1851,7 +1851,7 @@ namespace OpenRCT2::PathFinding } } } - for (StationIndex::UnderlyingType i = 0; i < OpenRCT2::Limits::MaxStationsPerRide; i++) + for (StationIndex::UnderlyingType i = 0; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { if (entranceStations[i]) { @@ -2042,7 +2042,7 @@ namespace OpenRCT2::PathFinding StationIndex closestStationNum = StationIndex::FromUnderlying(0); int32_t numEntranceStations = 0; - BitSet entranceStations = {}; + BitSet entranceStations = {}; for (const auto& station : ride->GetStations()) { diff --git a/src/openrct2/platform/Crash.cpp b/src/openrct2/platform/Crash.cpp index badd8b0c44..f738a4ae69 100644 --- a/src/openrct2/platform/Crash.cpp +++ b/src/openrct2/platform/Crash.cpp @@ -200,7 +200,7 @@ static bool OnCrash( } auto configFilePathUTF8 = String::ToUtf8(configFilePath); - if (ConfigSave(configFilePathUTF8)) + if (Config::SaveToPath(configFilePathUTF8)) { _uploadFiles[L"attachment_config.ini"] = configFilePath; } diff --git a/src/openrct2/platform/Platform.Common.cpp b/src/openrct2/platform/Platform.Common.cpp index ba8579c6af..72246ddd82 100644 --- a/src/openrct2/platform/Platform.Common.cpp +++ b/src/openrct2/platform/Platform.Common.cpp @@ -11,14 +11,17 @@ #include "../common.h" #ifdef _WIN32 +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # include #endif #include "../Context.h" #include "../Game.h" -#include "../config/Config.h" #include "../core/File.h" #include "../core/Path.hpp" +#include "../localisation/Currency.h" #include "../localisation/Localisation.h" #include "Platform.h" diff --git a/src/openrct2/platform/Platform.Posix.cpp b/src/openrct2/platform/Platform.Posix.cpp index f34dd70d00..5dd3418831 100644 --- a/src/openrct2/platform/Platform.Posix.cpp +++ b/src/openrct2/platform/Platform.Posix.cpp @@ -14,7 +14,6 @@ # include "../Date.h" # include "../core/Memory.hpp" # include "../core/Path.hpp" -# include "../core/String.hpp" # include "../util/Util.h" # include diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index 8ecbda62d7..b900549d4d 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -10,6 +10,9 @@ #ifdef _WIN32 // Windows.h needs to be included first +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # include // Then the rest diff --git a/src/openrct2/platform/Platform.h b/src/openrct2/platform/Platform.h index 81312e6f3c..d62a9578cc 100644 --- a/src/openrct2/platform/Platform.h +++ b/src/openrct2/platform/Platform.h @@ -10,7 +10,8 @@ #pragma once #include "../common.h" -#include "../config/Config.h" +#include "../config/ConfigTypes.h" +#include "../core/String.hpp" #include #include @@ -42,6 +43,7 @@ enum class SPECIAL_FOLDER struct RealWorldDate; struct RealWorldTime; +struct TTFFontDescriptor; namespace Platform { @@ -135,21 +137,3 @@ public: }; #endif // __ANDROID__ - -#ifdef _WIN32 -# ifndef NOMINMAX -# define NOMINMAX -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# undef CreateDirectory -# undef CreateWindow -# undef GetMessage - -// This function cannot be marked as 'static', even though it may seem to be, -// as it requires external linkage, which 'static' prevents -__declspec(dllexport) int32_t - StartOpenRCT2(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCommandLine, int32_t nCmdShow); -#endif // _WIN32 diff --git a/src/openrct2/rct1/Csg.cpp b/src/openrct2/rct1/Csg.cpp new file mode 100644 index 0000000000..a9845b5905 --- /dev/null +++ b/src/openrct2/rct1/Csg.cpp @@ -0,0 +1,92 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 "Csg.h" + +#include "../core/FileStream.h" +#include "../core/Path.hpp" +#include "../drawing/Drawing.h" +#include "../rct1/Limits.h" + +using namespace OpenRCT2; + +std::string FindCsg1datAtLocation(u8string_view path) +{ + auto checkPath1 = Path::Combine(path, u8"Data", u8"CSG1.DAT"); + auto checkPath2 = Path::Combine(path, u8"Data", u8"CSG1.1"); + + // Since Linux is case sensitive (and macOS sometimes too), make sure we handle case properly. + std::string path1result = Path::ResolveCasing(checkPath1); + if (!path1result.empty()) + { + return path1result; + } + + std::string path2result = Path::ResolveCasing(checkPath2); + return path2result; +} + +bool Csg1datPresentAtLocation(u8string_view path) +{ + auto location = FindCsg1datAtLocation(path); + return !location.empty(); +} + +u8string FindCsg1idatAtLocation(u8string_view path) +{ + auto result1 = Path::ResolveCasing(Path::Combine(path, u8"Data", u8"CSG1I.DAT")); + if (!result1.empty()) + { + return result1; + } + auto result2 = Path::ResolveCasing(Path::Combine(path, u8"RCTdeluxe_install", u8"Data", u8"CSG1I.DAT")); + return result2; +} + +bool Csg1idatPresentAtLocation(u8string_view path) +{ + std::string location = FindCsg1idatAtLocation(path); + return !location.empty(); +} + +bool RCT1DataPresentAtLocation(u8string_view path) +{ + return Csg1datPresentAtLocation(path) && Csg1idatPresentAtLocation(path) && CsgAtLocationIsUsable(path); +} + +bool CsgIsUsable(const Gx& csg) +{ + return csg.header.total_size == RCT1::Limits::kLLCsg1DatFileSize + && csg.header.num_entries == RCT1::Limits::kNumLLCsgEntries; +} + +bool CsgAtLocationIsUsable(u8string_view path) +{ + auto csg1HeaderPath = FindCsg1idatAtLocation(path); + if (csg1HeaderPath.empty()) + { + return false; + } + + auto csg1DataPath = FindCsg1datAtLocation(path); + if (csg1DataPath.empty()) + { + return false; + } + + auto fileHeader = FileStream(csg1HeaderPath, FILE_MODE_OPEN); + auto fileData = FileStream(csg1DataPath, FILE_MODE_OPEN); + size_t fileHeaderSize = fileHeader.GetLength(); + size_t fileDataSize = fileData.GetLength(); + + Gx csg = {}; + csg.header.num_entries = static_cast(fileHeaderSize / sizeof(RCTG1Element)); + csg.header.total_size = static_cast(fileDataSize); + return CsgIsUsable(csg); +} diff --git a/src/openrct2/rct1/Csg.h b/src/openrct2/rct1/Csg.h new file mode 100644 index 0000000000..5f43c47900 --- /dev/null +++ b/src/openrct2/rct1/Csg.h @@ -0,0 +1,24 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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/String.hpp" + +#include + +struct Gx; + +bool RCT1DataPresentAtLocation(u8string_view path); +std::string FindCsg1datAtLocation(u8string_view path); +bool Csg1datPresentAtLocation(u8string_view path); +std::string FindCsg1idatAtLocation(u8string_view path); +bool Csg1idatPresentAtLocation(u8string_view path); +bool CsgIsUsable(const Gx& csg); +bool CsgAtLocationIsUsable(u8string_view path); diff --git a/src/openrct2/rct1/Limits.h b/src/openrct2/rct1/Limits.h index 45d817019a..e431f43c8a 100644 --- a/src/openrct2/rct1/Limits.h +++ b/src/openrct2/rct1/Limits.h @@ -13,16 +13,16 @@ namespace RCT1::Limits { using namespace RCT12::Limits; - constexpr uint16_t MaxTileElements = 0xC000; - constexpr uint16_t MaxEntities = 5000; - constexpr uint8_t MaxTrainsPerRide = 12; - constexpr uint8_t MaxMapSize = 128; - constexpr uint8_t MaxStaff = 116; - constexpr uint16_t MaxAnimatedObjects = 1000; - constexpr uint8_t MaxBanners = 100; - constexpr int32_t CoordsZStep = 4; - constexpr uint32_t Num_LL_CSG_Entries = 69917; - constexpr uint32_t LL_CSG1_DAT_FileSize = 41402869; - constexpr uint32_t NumTerrainSurfaces = 16; - constexpr uint32_t NumTerrainEdges = 15; + constexpr uint16_t kMaxTileElements = 0xC000; + constexpr uint16_t kMaxEntities = 5000; + constexpr uint8_t kMaxTrainsPerRide = 12; + constexpr uint8_t kMaxMapSize = 128; + constexpr uint8_t kMaxStaff = 116; + constexpr uint16_t kMaxAnimatedObjects = 1000; + constexpr uint8_t kMaxBanners = 100; + constexpr int32_t kCoordsZStep = 4; + constexpr uint32_t kNumLLCsgEntries = 69917; + constexpr uint32_t kLLCsg1DatFileSize = 41402869; + constexpr uint32_t kNumTerrainSurfaces = 16; + constexpr uint32_t kNumTerrainEdges = 15; } // namespace RCT1::Limits diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index 7ba5978708..3f1270b3d5 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -9,11 +9,14 @@ #pragma once +#include "../core/FixedPoint.hpp" #include "../rct12/RCT12.h" #include "../ride/RideRatings.h" #include "../world/Park.h" #include "Limits.h" +enum class VehicleColourSettings : uint8_t; + namespace RCT1 { constexpr uint8_t RCT1ResearchFlagsSeparator = 0xFF; @@ -236,64 +239,64 @@ namespace RCT1 */ struct Ride { - RideType Type; // 0x000 - RCT1::VehicleType VehicleType; // 0x001 - uint16_t LifecycleFlags; // 0x002 - uint8_t OperatingMode; // 0x004 - uint8_t ColourScheme; // 0x005 + 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::MaxTrainsPerRide]; // 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::MaxStationsPerRide]; // 0x02A - uint8_t StationHeights[Limits::MaxStationsPerRide]; // 0x032 - uint8_t StationLengths[Limits::MaxStationsPerRide]; // 0x036 - uint8_t StationLights[Limits::MaxStationsPerRide]; // 0x03A - uint8_t StationDeparts[Limits::MaxStationsPerRide]; // 0x03E - RCT12xy8 Entrances[Limits::MaxStationsPerRide]; // 0x042 - RCT12xy8 Exits[Limits::MaxStationsPerRide]; // 0x04A - uint16_t LastPeepInQueue[Limits::MaxStationsPerRide]; // 0x052 - uint8_t NumPeepsInQueue[Limits::MaxStationsPerRide]; // 0x05A - uint16_t Vehicles[Limits::MaxTrainsPerRide]; // 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::MaxStationsPerRide]; // 0x094 - uint16_t Time[Limits::MaxStationsPerRide]; // 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 + } 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 @@ -317,35 +320,26 @@ namespace RCT1 int16_t UnkD0; // 0x0D0 int16_t UnkD2; // 0x0D2 // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t NumCustomers[Limits::CustomerHistorySize]; // 0xD4 - money16 Price; // 0x0E8 - RCT12xy8 ChairliftBullwheelLocation[2]; // 0x0EA - uint8_t ChairliftBullwheelZ[2]; // 0x0EE - union - { - RatingTuple Ratings; - struct - { - ride_rating Excitement; // 0x0F0 - ride_rating Intensity; // 0x0F2 - ride_rating Nausea; // 0x0F4 - }; - }; - 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 + 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 union { uint16_t SlidePeep; // 0x10E @@ -378,20 +372,20 @@ namespace RCT1 }; 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::MaxStationsPerRide]; // 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 }; assert_struct_size(Ride, 0x260); @@ -730,9 +724,9 @@ namespace RCT1 uint32_t Ticks; uint32_t RandomA; uint32_t RandomB; - RCT12TileElement TileElements[Limits::MaxTileElements]; + RCT12TileElement TileElements[Limits::kMaxTileElements]; uint32_t UnkCounter; - Entity Entities[Limits::MaxEntities]; + Entity Entities[Limits::kMaxEntities]; uint16_t NextEntityIndex; uint16_t FirstVehicleEntityIndex; uint16_t FirstPeepEntityIndex; @@ -753,7 +747,7 @@ namespace RCT1 money16 ParkEntranceFee; Entrance ParkEntrance; uint8_t Unk198849; - RCT12PeepSpawn PeepSpawn[Limits::MaxPeepSpawns]; + RCT12PeepSpawn PeepSpawn[Limits::kMaxPeepSpawns]; uint8_t Unk198856; uint8_t ResearchLevel; uint32_t Unk198858; @@ -818,7 +812,7 @@ namespace RCT1 money32 AdmissionTotalIncome; money32 CompanyValue; uint8_t ThoughtTimer[16]; - RCT12Award Awards[Limits::MaxAwards]; + RCT12Award Awards[Limits::kMaxAwards]; money16 LandPrice; money16 ConstructionRightsPrice; uint16_t Unk199BCC; @@ -851,16 +845,16 @@ namespace RCT1 uint16_t Unk199C9A; ResearchItem ResearchItemsLL[250]; uint8_t Unk19A0D9[5118]; - RCT12Banner Banners[Limits::MaxBanners]; + RCT12Banner Banners[Limits::kMaxBanners]; char StringTable[Limits::MaxUserStrings][Limits::MaxUserStringLength]; uint32_t GameTimeCounter; - Ride Rides[Limits::MaxRidesInPark]; + Ride Rides[Limits::kMaxRidesInPark]; uint16_t UnkGameTimeCounter; int16_t ViewX; int16_t ViewY; uint8_t ViewZoom; uint8_t ViewRotation; - RCT12MapAnimation MapAnimations[Limits::MaxAnimatedObjects]; + RCT12MapAnimation MapAnimations[Limits::kMaxAnimatedObjects]; uint32_t NumMapAnimations; uint8_t Unk1CADBC[12]; uint16_t ScrollingTextStep; @@ -870,8 +864,8 @@ namespace RCT1 RCT12RideMeasurement RideMeasurements[8]; uint32_t NextGuestIndex; uint16_t GameCounter5; - uint8_t PatrolAreas[(Limits::MaxStaff + Limits::StaffTypeCount) * Limits::PatrolAreaSize]; - uint8_t StaffModes[Limits::MaxStaff]; + uint8_t PatrolAreas[(Limits::kMaxStaff + Limits::StaffTypeCount) * Limits::PatrolAreaSize]; + uint8_t StaffModes[Limits::kMaxStaff]; uint8_t Unk1F431E[4]; uint8_t Unk1F4322[8]; uint8_t Climate; @@ -904,18 +898,18 @@ namespace RCT1 { RideType Type; // 0x00 RCT1::VehicleType VehicleType; - uint32_t Flags; // 0x02 - uint8_t Mode; // 0x06 - uint8_t VersionAndColourScheme; // 0x07 0b0000_VVCC - RCT12VehicleColour VehicleColours[Limits::MaxTrainsPerRide]; // 0x08 - uint8_t TrackSpineColourV0; // 0x20 - uint8_t TrackRailColourV0; // 0x21 - uint8_t TrackSupportColourV0; // 0x22 - uint8_t DepartFlags; // 0x23 - uint8_t NumberOfTrains; // 0x24 - uint8_t NumberOfCarsPerTrain; // 0x25 - uint8_t MinWaitingTime; // 0x26 - uint8_t MaxWaitingTime; // 0x27 + uint32_t Flags; // 0x02 + uint8_t Mode; // 0x06 + uint8_t VersionAndColourScheme; // 0x07 0b0000_VVCC + RCT12VehicleColour VehicleColours[Limits::kMaxTrainsPerRide]; // 0x08 + uint8_t TrackSpineColourV0; // 0x20 + uint8_t TrackRailColourV0; // 0x21 + uint8_t TrackSupportColourV0; // 0x22 + uint8_t DepartFlags; // 0x23 + uint8_t NumberOfTrains; // 0x24 + uint8_t NumberOfCarsPerTrain; // 0x25 + uint8_t MinWaitingTime; // 0x26 + uint8_t MaxWaitingTime; // 0x27 union { uint8_t OperationSetting; @@ -950,10 +944,10 @@ namespace RCT1 */ struct TD4AA : public TD4 { - uint8_t TrackSpineColour[Limits::NumColourSchemes]; // 0x38 - uint8_t TrackRailColour[Limits::NumColourSchemes]; // 0x3C - uint8_t TrackSupportColour[Limits::NumColourSchemes]; // 0x40 - uint8_t Flags2; // 0x44 + uint8_t TrackSpineColour[Limits::kNumColourSchemes]; // 0x38 + uint8_t TrackRailColour[Limits::kNumColourSchemes]; // 0x3C + uint8_t TrackSupportColour[Limits::kNumColourSchemes]; // 0x40 + uint8_t Flags2; // 0x44 uint8_t Pad45[0x7F]; // 0x45 }; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index e2e41e6fba..ddae728685 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -320,7 +320,7 @@ namespace RCT1 // Avoid reusing the value used for last import _parkValueConversionFactor = 0; - uint16_t mapSize = _s4.MapSize == 0 ? Limits::MaxMapSize : _s4.MapSize; + uint16_t mapSize = _s4.MapSize == 0 ? Limits::kMaxMapSize : _s4.MapSize; gScenarioFileName = GetRCT1ScenarioName(); @@ -465,7 +465,7 @@ namespace RCT1 void AddAvailableEntriesFromMap() { - size_t maxTiles = Limits::MaxMapSize * Limits::MaxMapSize; + size_t maxTiles = Limits::kMaxMapSize * Limits::kMaxMapSize; size_t tileIndex = 0; RCT12TileElement* tileElement = _s4.TileElements; @@ -798,7 +798,7 @@ namespace RCT1 void ImportRides() { - for (int32_t i = 0; i < Limits::MaxRidesInPark; i++) + for (int32_t i = 0; i < Limits::kMaxRidesInPark; i++) { if (_s4.Rides[i].Type != RideType::Null) { @@ -873,7 +873,7 @@ namespace RCT1 dst->overall_view = TileCoordsXY{ src->OverallView.x, src->OverallView.y }.ToCoordsXY(); } - for (StationIndex::UnderlyingType i = 0; i < Limits::MaxStationsPerRide; i++) + for (StationIndex::UnderlyingType i = 0; i < Limits::kMaxStationsPerRide; i++) { auto& dstStation = dst->GetStation(StationIndex::FromUnderlying(i)); if (src->StationStarts[i].IsNull()) @@ -885,7 +885,7 @@ namespace RCT1 auto tileStartLoc = TileCoordsXY{ src->StationStarts[i].x, src->StationStarts[i].y }; dstStation.Start = tileStartLoc.ToCoordsXY(); } - dstStation.SetBaseZ(src->StationHeights[i] * Limits::CoordsZStep); + dstStation.SetBaseZ(src->StationHeights[i] * Limits::kCoordsZStep); dstStation.Length = src->StationLengths[i]; dstStation.Depart = src->StationLights[i]; @@ -910,7 +910,7 @@ namespace RCT1 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::MaxStationsPerRide; i < OpenRCT2::Limits::MaxStationsPerRide; i++) + for (int32_t i = Limits::kMaxStationsPerRide; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { auto& dstStation = dst->GetStation(StationIndex::FromUnderlying(i)); dstStation.Start.SetNull(); @@ -923,11 +923,11 @@ namespace RCT1 dst->num_stations = src->NumStations; // Vehicle links (indexes converted later) - for (int32_t i = 0; i < Limits::MaxTrainsPerRide; i++) + for (int32_t i = 0; i < Limits::kMaxTrainsPerRide; i++) { dst->vehicles[i] = EntityId::FromUnderlying(src->Vehicles[i]); } - for (int32_t i = Limits::MaxTrainsPerRide; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) + for (int32_t i = Limits::kMaxTrainsPerRide; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { dst->vehicles[i] = EntityId::GetNull(); } @@ -1010,9 +1010,7 @@ namespace RCT1 dst->broken_vehicle = src->BrokenVehicle; // Measurement data - dst->excitement = src->Excitement; - dst->intensity = src->Intensity; - dst->nausea = src->Nausea; + dst->ratings = src->ratings; dst->max_speed = src->MaxSpeed; dst->average_speed = src->AverageSpeed; @@ -1025,13 +1023,13 @@ namespace RCT1 dst->turn_count_banked = src->TurnCountBanked; dst->turn_count_default = src->TurnCountDefault; dst->turn_count_sloped = src->TurnCountSloped; - dst->drops = src->NumDrops; + dst->dropsPoweredLifts = src->NumDrops; dst->start_drop_height = src->StartDropHeight / 2; dst->highest_drop_height = src->HighestDropHeight / 2; if (dst->type == RIDE_TYPE_MINI_GOLF) - dst->holes = src->NumInversions & 0x1F; + dst->holes = src->NumInversions & kRCT12InversionAndHoleMask; else - dst->inversions = src->NumInversions & 0x1F; + 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 }; @@ -1090,7 +1088,7 @@ namespace RCT1 void SetRideColourScheme(::Ride* dst, RCT1::Ride* src) { // Colours - dst->colour_scheme_type = src->ColourScheme; + dst->vehicleColourSettings = src->vehicleColourSettings; if (_gameVersion == FILE_VERSION_RCT1) { dst->track_colour[0].main = RCT1::GetColour(src->TrackPrimaryColour); @@ -1109,7 +1107,7 @@ namespace RCT1 } else { - for (int i = 0; i < Limits::NumColourSchemes; i++) + 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]); @@ -1139,7 +1137,7 @@ namespace RCT1 } else { - for (int i = 0; i < Limits::MaxTrainsPerRide; i++) + for (int i = 0; i < Limits::kMaxTrainsPerRide; i++) { // RCT1 had no third colour const auto colourSchemeCopyDescriptor = GetColourSchemeCopyDescriptor(src->VehicleType); @@ -1233,7 +1231,7 @@ namespace RCT1 void ImportEntities() { - for (int i = 0; i < Limits::MaxEntities; i++) + for (int i = 0; i < Limits::kMaxEntities; i++) { ImportEntity(_s4.Entities[i].Unknown); } @@ -1321,7 +1319,7 @@ namespace RCT1 dst->State = static_cast(src->State); dst->SubState = src->SubState; - dst->NextLoc = { src->NextX, src->NextY, src->NextZ * Limits::CoordsZStep }; + dst->NextLoc = { src->NextX, src->NextY, src->NextZ * Limits::kCoordsZStep }; dst->NextFlags = src->NextFlags; dst->Var37 = src->Var37; dst->StepProgress = src->StepProgress; @@ -1410,7 +1408,7 @@ namespace RCT1 { auto& gameState = GetGameState(); gameState.PeepSpawns.clear(); - for (size_t i = 0; i < Limits::MaxPeepSpawns; i++) + for (size_t i = 0; i < Limits::kMaxPeepSpawns; i++) { if (_s4.PeepSpawn[i].x != RCT12_PEEP_SPAWN_UNDEFINED) { @@ -1477,7 +1475,7 @@ namespace RCT1 { campaign.ShopItemType = ShopItem(_s4.MarketingAssoc[i]); } - gMarketingCampaigns.push_back(campaign); + gameState.MarketingCampaigns.push_back(campaign); } } } @@ -1522,10 +1520,10 @@ namespace RCT1 { // Build tile pointer cache (needed to get the first element at a certain location) auto tilePointerIndex = TilePointerIndex( - Limits::MaxMapSize, _s4.TileElements, std::size(_s4.TileElements)); + Limits::kMaxMapSize, _s4.TileElements, std::size(_s4.TileElements)); std::vector tileElements; - const auto maxSize = _s4.MapSize == 0 ? Limits::MaxMapSize : _s4.MapSize; + const auto maxSize = _s4.MapSize == 0 ? Limits::kMaxMapSize : _s4.MapSize; for (TileCoordsXY coords = { 0, 0 }; coords.y < kMaximumMapSizeTechnical; coords.y++) { for (coords.x = 0; coords.x < kMaximumMapSizeTechnical; coords.x++) @@ -1583,8 +1581,8 @@ namespace RCT1 // This flag will be set by the caller. dst->SetLastForTile(false); - dst->SetBaseZ(src->BaseHeight * Limits::CoordsZStep); - dst->SetClearanceZ(src->ClearanceHeight * Limits::CoordsZStep); + dst->SetBaseZ(src->BaseHeight * Limits::kCoordsZStep); + dst->SetClearanceZ(src->ClearanceHeight * Limits::kCoordsZStep); switch (tileElementType) { @@ -1668,6 +1666,7 @@ namespace RCT1 auto src2 = src->AsTrack(); const auto* ride = GetRide(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); auto rideType = (ride != nullptr) ? ride->type : RIDE_TYPE_NULL; + auto rct1RideType = _s4.Rides[src2->GetRideIndex()].Type; dst2->SetTrackType(RCT1TrackTypeToOpenRCT2(src2->GetTrackType(), rideType)); dst2->SetRideType(rideType); @@ -1680,7 +1679,7 @@ namespace RCT1 dst2->SetStationIndex(StationIndex::FromUnderlying(src2->GetStationIndex())); dst2->SetHasGreenLight(src2->HasGreenLight()); dst2->SetIsIndestructible(src2->IsIndestructible()); - if (rideType == RIDE_TYPE_GHOST_TRAIN) + if (rct1RideType == RideType::GhostTrain) { dst2->SetDoorAState(src2->GetDoorAState()); dst2->SetDoorBState(src2->GetDoorBState()); @@ -1704,8 +1703,7 @@ namespace RCT1 } // This has to be done last, since the maze entry shares fields with the colour and sequence fields. - const auto& rtd = GetRideTypeDescriptor(rideType); - if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) + if (rct1RideType == RideType::HedgeMaze) { dst2->SetMazeEntry(src2->GetMazeEntry()); } @@ -1793,8 +1791,8 @@ namespace RCT1 ConvertWall(type, &colourA, &colourB); type = _wallTypeToEntryMap[type]; - auto baseZ = src->BaseHeight * Limits::CoordsZStep; - auto clearanceZ = src->ClearanceHeight * Limits::CoordsZStep; + auto baseZ = src->BaseHeight * Limits::kCoordsZStep; + auto clearanceZ = src->ClearanceHeight * Limits::kCoordsZStep; auto edgeSlope = GetWallSlopeFromEdgeSlope(slope, edge & 3); if (edgeSlope & (EDGE_SLOPE_UPWARDS | EDGE_SLOPE_DOWNWARDS)) { @@ -2447,7 +2445,7 @@ namespace RCT1 gameState.Park.Entrances.clear(); TileElementIterator it; TileElementIteratorBegin(&it); - while (TileElementIteratorNext(&it) && gameState.Park.Entrances.size() < Limits::MaxParkEntrances) + while (TileElementIteratorNext(&it) && gameState.Park.Entrances.size() < Limits::kMaxParkEntrances) { TileElement* element = it.element; @@ -2509,7 +2507,7 @@ namespace RCT1 { const auto originalString = _s4.StringTable[stringId % 1024]; auto originalStringView = std::string_view( - originalString, RCT12::GetRCTStringBufferLen(originalString, USER_STRING_MAX_LENGTH)); + originalString, RCT12::GetRCTStringBufferLen(originalString, kUserStringMaxLength)); auto asUtf8 = RCT2StringToUTF8(originalStringView, RCT2LanguageId::EnglishUK); auto justText = RCT12RemoveFormattingUTF8(asUtf8); return justText.data(); @@ -2674,9 +2672,9 @@ namespace RCT1 */ void CountBlockSections() { - for (int32_t x = 0; x < Limits::MaxMapSize; x++) + for (int32_t x = 0; x < Limits::kMaxMapSize; x++) { - for (int32_t y = 0; y < Limits::MaxMapSize; y++) + for (int32_t y = 0; y < Limits::kMaxMapSize; y++) { TileElement* tileElement = MapGetFirstElementAt(TileCoordsXY{ x, y }); if (tileElement == nullptr) diff --git a/src/openrct2/rct1/T4Importer.cpp b/src/openrct2/rct1/T4Importer.cpp index f3c73e5bdd..ed18e02e54 100644 --- a/src/openrct2/rct1/T4Importer.cpp +++ b/src/openrct2/rct1/T4Importer.cpp @@ -87,15 +87,13 @@ namespace RCT1 TD4AA td4aa{}; _stream.Read(&td4aa, sizeof(TD4AA)); - for (int32_t i = 0; i < Limits::NumColourSchemes; i++) + for (int32_t i = 0; i < Limits::kNumColourSchemes; i++) { - td->track_spine_colour[i] = RCT1::GetColour(td4aa.TrackSpineColour[i]); - td->track_rail_colour[i] = RCT1::GetColour(td4aa.TrackRailColour[i]); - td->track_support_colour[i] = RCT1::GetColour(td4aa.TrackSupportColour[i]); + td->appearance.trackColours[i].main = RCT1::GetColour(td4aa.TrackSpineColour[i]); + td->appearance.trackColours[i].additional = RCT1::GetColour(td4aa.TrackRailColour[i]); + td->appearance.trackColours[i].supports = RCT1::GetColour(td4aa.TrackSupportColour[i]); } - td->flags2 = td4aa.Flags2; - return ImportTD4Base(std::move(td), td4aa); } @@ -104,36 +102,36 @@ namespace RCT1 std::unique_ptr td = std::make_unique(); TD4 td4{}; _stream.Read(&td4, sizeof(TD4)); - for (int32_t i = 0; i < OpenRCT2::Limits::NumColourSchemes; i++) + for (size_t i = 0; i < std::size(td->appearance.trackColours); i++) { - td->track_spine_colour[i] = RCT1::GetColour(td4.TrackSpineColourV0); - td->track_rail_colour[i] = RCT1::GetColour(td4.TrackRailColourV0); - td->track_support_colour[i] = RCT1::GetColour(td4.TrackSupportColourV0); + td->appearance.trackColours[i].main = RCT1::GetColour(td4.TrackSpineColourV0); + td->appearance.trackColours[i].additional = RCT1::GetColour(td4.TrackRailColourV0); + td->appearance.trackColours[i].supports = RCT1::GetColour(td4.TrackSupportColourV0); // Mazes were only hedges if (td4.Type == RideType::HedgeMaze) { - td->track_support_colour[i] = MAZE_WALL_TYPE_HEDGE; + td->appearance.trackColours[i].supports = MAZE_WALL_TYPE_HEDGE; } else if (td4.Type == RideType::RiverRapids) { - td->track_spine_colour[i] = COLOUR_WHITE; - td->track_rail_colour[i] = COLOUR_WHITE; + td->appearance.trackColours[i].main = COLOUR_WHITE; + td->appearance.trackColours[i].additional = COLOUR_WHITE; } } - td->flags2 = 0; + return ImportTD4Base(std::move(td), td4); } std::unique_ptr ImportTD4Base(std::unique_ptr td, TD4& td4Base) { - td->type = RCT1::GetRideType(td4Base.Type, td4Base.VehicleType); + td->trackAndVehicle.rtdIndex = RCT1::GetRideType(td4Base.Type, td4Base.VehicleType); // All TD4s that use powered launch use the type that doesn't pass the station. - td->ride_mode = static_cast(td4Base.Mode); + td->operation.rideMode = static_cast(td4Base.Mode); if (td4Base.Mode == RCT1_RIDE_MODE_POWERED_LAUNCH) { - td->ride_mode = RideMode::PoweredLaunch; + td->operation.rideMode = RideMode::PoweredLaunch; } std::string_view vehicleObject; @@ -146,100 +144,93 @@ namespace RCT1 vehicleObject = RCT1::GetVehicleObject(td4Base.VehicleType); } assert(!vehicleObject.empty()); - td->vehicle_object = ObjectEntryDescriptor(vehicleObject); - td->vehicle_type = EnumValue(td4Base.VehicleType); - - td->flags = td4Base.Flags; - td->colour_scheme = td4Base.VersionAndColourScheme & 0x3; + td->trackAndVehicle.vehicleObject = ObjectEntryDescriptor(vehicleObject); + td->appearance.vehicleColourSettings = static_cast(td4Base.VersionAndColourScheme & 0x3); // Vehicle colours - for (int32_t i = 0; i < Limits::MaxTrainsPerRide; i++) + for (int32_t i = 0; i < Limits::kMaxTrainsPerRide; i++) { // RCT1 had no third colour RCT1::VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor( td4Base.VehicleType); if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) { - td->vehicle_colours[i].Body = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); + td->appearance.vehicleColours[i].Body = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); } else if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_2) { - td->vehicle_colours[i].Body = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); + td->appearance.vehicleColours[i].Body = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); } else { - td->vehicle_colours[i].Body = colourSchemeCopyDescriptor.colour1; + td->appearance.vehicleColours[i].Body = colourSchemeCopyDescriptor.colour1; } if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_1) { - td->vehicle_colours[i].Trim = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); + td->appearance.vehicleColours[i].Trim = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); } else if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_2) { - td->vehicle_colours[i].Trim = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); + td->appearance.vehicleColours[i].Trim = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); } else { - td->vehicle_colours[i].Trim = colourSchemeCopyDescriptor.colour2; + td->appearance.vehicleColours[i].Trim = colourSchemeCopyDescriptor.colour2; } if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_1) { - td->vehicle_colours[i].Tertiary = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); + td->appearance.vehicleColours[i].Tertiary = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); } else if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_2) { - td->vehicle_colours[i].Tertiary = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); + td->appearance.vehicleColours[i].Tertiary = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); } else { - td->vehicle_colours[i].Tertiary = colourSchemeCopyDescriptor.colour3; + td->appearance.vehicleColours[i].Tertiary = colourSchemeCopyDescriptor.colour3; } } // Set remaining vehicles to same colour as first vehicle - for (size_t i = Limits::MaxTrainsPerRide; i < std::size(td->vehicle_colours); i++) + for (size_t i = Limits::kMaxTrainsPerRide; i < std::size(td->appearance.vehicleColours); i++) { - td->vehicle_colours[i] = td->vehicle_colours[0]; + td->appearance.vehicleColours[i] = td->appearance.vehicleColours[0]; } - td->StationObjectIdentifier = GetStationIdentifierFromStyle(RCT12_STATION_STYLE_PLAIN); - td->depart_flags = td4Base.DepartFlags; - td->number_of_trains = td4Base.NumberOfTrains; - td->number_of_cars_per_train = td4Base.NumberOfCarsPerTrain; - td->min_waiting_time = td4Base.MinWaitingTime; - td->max_waiting_time = td4Base.MaxWaitingTime; - td->operation_setting = std::min( - td4Base.OperationSetting, GetRideTypeDescriptor(td->type).OperatingSettings.MaxValue); - td->max_speed = td4Base.MaxSpeed; - td->average_speed = td4Base.AverageSpeed; - td->ride_length = td4Base.RideLength; - td->max_positive_vertical_g = td4Base.MaxPositiveVerticalG; - td->max_negative_vertical_g = td4Base.MaxNegativeVerticalG; - td->max_lateral_g = td4Base.MaxLateralG; + td->appearance.stationObjectIdentifier = GetStationIdentifierFromStyle(RCT12_STATION_STYLE_PLAIN); + td->operation.departFlags = td4Base.DepartFlags; + td->trackAndVehicle.numberOfTrains = td4Base.NumberOfTrains; + td->trackAndVehicle.numberOfCarsPerTrain = td4Base.NumberOfCarsPerTrain; + td->operation.minWaitingTime = td4Base.MinWaitingTime; + td->operation.maxWaitingTime = td4Base.MaxWaitingTime; + td->operation.operationSetting = std::min( + td4Base.OperationSetting, GetRideTypeDescriptor(td->trackAndVehicle.rtdIndex).OperatingSettings.MaxValue); + td->statistics.maxSpeed = td4Base.MaxSpeed; + td->statistics.averageSpeed = td4Base.AverageSpeed; + td->statistics.rideLength = td4Base.RideLength; + td->statistics.maxPositiveVerticalG = td4Base.MaxPositiveVerticalG * kTD46GForcesMultiplier; + td->statistics.maxNegativeVerticalG = td4Base.MaxNegativeVerticalG * kTD46GForcesMultiplier; + td->statistics.maxLateralG = td4Base.MaxLateralG * kTD46GForcesMultiplier; - if (td->type == RIDE_TYPE_MINI_GOLF) - { - td->holes = td4Base.NumHoles; - } + if (td4Base.Type == RideType::MiniatureGolf) + td->statistics.holes = td4Base.NumHoles & kRCT12InversionAndHoleMask; else - { - td->inversions = td4Base.NumInversions; - } + td->statistics.inversions = td4Base.NumInversions & kRCT12InversionAndHoleMask; - td->drops = td4Base.NumDrops; - td->highest_drop_height = td4Base.HighestDropHeight / 2; - td->excitement = td4Base.Excitement; - td->intensity = td4Base.Intensity; - td->nausea = td4Base.Nausea; - td->upkeep_cost = ToMoney64(td4Base.UpkeepCost); - td->space_required_x = 255; - td->space_required_y = 255; - td->lift_hill_speed = 5; - td->num_circuits = 0; - td->operation_setting = std::min(td->operation_setting, GetRideTypeDescriptor(td->type).OperatingSettings.MaxValue); + td->statistics.drops = td4Base.NumDrops & kRCT12RideNumDropsMask; + td->statistics.highestDropHeight = td4Base.HighestDropHeight / 2; + td->statistics.ratings.excitement = td4Base.Excitement * kTD46RatingsMultiplier; + td->statistics.ratings.intensity = td4Base.Intensity * kTD46RatingsMultiplier; + td->statistics.ratings.nausea = td4Base.Nausea * kTD46RatingsMultiplier; + td->statistics.upkeepCost = ToMoney64(td4Base.UpkeepCost); + td->statistics.spaceRequired.SetNull(); + td->operation.liftHillSpeed = 5; + td->operation.numCircuits = 1; + td->operation.operationSetting = std::min( + td->operation.operationSetting, GetRideTypeDescriptor(td->trackAndVehicle.rtdIndex).OperatingSettings.MaxValue); - const auto& rtd = GetRideTypeDescriptor(td->type); + const auto& rtd = GetRideTypeDescriptor(td->trackAndVehicle.rtdIndex); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { TD46MazeElement t4MazeElement{}; @@ -261,13 +252,13 @@ namespace RCT1 _stream.SetPosition(_stream.GetPosition() - 1); _stream.Read(&t4TrackElement, sizeof(TD46TrackElement)); TrackDesignTrackElement trackElement{}; - trackElement.Type = RCT1TrackTypeToOpenRCT2(t4TrackElement.Type, td->type); + trackElement.type = RCT1TrackTypeToOpenRCT2(t4TrackElement.Type, td->trackAndVehicle.rtdIndex); ConvertFromTD46Flags(trackElement, t4TrackElement.Flags); - td->track_elements.push_back(trackElement); + td->trackElements.push_back(trackElement); } } - td->name = _name; + td->gameStateData.name = _name; return td; } }; diff --git a/src/openrct2/rct1/Tables.cpp b/src/openrct2/rct1/Tables.cpp index 5b878a7495..b54349bafe 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -118,7 +118,7 @@ namespace RCT1 std::string_view GetTerrainSurfaceObject(uint8_t terrainSurface) { - static constexpr std::string_view map[Limits::NumTerrainSurfaces] = + static constexpr std::string_view map[Limits::kNumTerrainSurfaces] = { "rct2.terrain_surface.grass", "rct2.terrain_surface.sand", @@ -142,7 +142,7 @@ namespace RCT1 std::string_view GetTerrainEdgeObject(uint8_t terrainEdge) { - static constexpr std::string_view map[Limits::NumTerrainEdges] = + static constexpr std::string_view map[Limits::kNumTerrainEdges] = { "rct2.terrain_edge.rock", "rct1.terrain_edge.brick", @@ -278,7 +278,7 @@ namespace RCT1 { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_STANDUP_ROLLER_COASTER_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SPINNING_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SINGLE_PERSON_SWINGING_CHAIRS, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SWANS_PEDAL_BOATS, + { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_YELLOW }, // RCT1_VEHICLE_TYPE_SWANS_PEDAL_BOATS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_DARK_BLUE }, // RCT1_VEHICLE_TYPE_LARGE_MONORAIL_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_CANOES, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_ROWING_BOATS, @@ -339,7 +339,7 @@ namespace RCT1 { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_REVERSER_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_GOLFERS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_RIVER_RIDE_BOATS, - { COPY_COLOUR_1, COLOUR_BLACK, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_FLYING_ROLLER_COASTER_TRAIN, + { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_FLYING_ROLLER_COASTER_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_1 }, // RCT1_VEHICLE_TYPE_NON_LOOPING_STEEL_TWISTER_ROLLER_COASTER_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_HEARTLINE_TWISTER_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_HEARTLINE_TWISTER_CARS_REVERSED, @@ -686,13 +686,13 @@ namespace RCT1 if (rct1VehicleType == VehicleType::HeartlineTwisterCars) { - return vehicleSubEntry == HEARTLINE_TWISTER_FORWARDS ? 0 : 1; + return vehicleSubEntry == HEARTLINE_TWISTER_FORWARDS ? 0 : 1; } if (rct1VehicleType == VehicleType::HeartlineTwisterCarsReversed) { - return vehicleSubEntry == HEARTLINE_TWISTER_BACKWARDS ? 0 : 1; + return vehicleSubEntry == HEARTLINE_TWISTER_BACKWARDS ? 0 : 1; } - + return map[vehicleSubEntry]; } @@ -766,7 +766,7 @@ namespace RCT1 "rct1aa.ride.virginia_reel_tubs", // RCT1_RIDE_TYPE_VIRGINIA_REEL "rct1aa.ride.splash_boats", // RCT1_RIDE_TYPE_RIVER_RIDE "rct1aa.ride.mini_helicopters", // RCT1_RIDE_TYPE_CYCLE_MONORAIL - "rct2.ride.vekst", // RCT1_RIDE_TYPE_FLYING_ROLLER_COASTER + "rct1aa.ride.lay_down_trains", // RCT1_RIDE_TYPE_FLYING_ROLLER_COASTER "rct1aa.ride.suspended_monorail_trains", // RCT1_RIDE_TYPE_SUSPENDED_MONORAIL "", // RCT1_RIDE_TYPE_40 "rct1aa.ride.reverser_cars", // RCT1_RIDE_TYPE_WOODEN_REVERSER_ROLLER_COASTER @@ -871,7 +871,7 @@ namespace RCT1 "rct1aa.ride.reverser_cars", // VehicleType::ReverserCars "rct2.ride.golf1", // VehicleType::Golfers "rct1aa.ride.splash_boats", // VehicleType::RiverRideBoats - "rct2.ride.vekst", // VehicleType::FlyingRollerCoasterTrain + "rct1aa.ride.lay_down_trains", // VehicleType::FlyingRollerCoasterTrain "rct1aa.ride.hyper_twister_trains", // VehicleType::NonLoopingSteelTwisterRollerCoasterTrain "rct1aa.ride.heartline_twister_cars", // VehicleType::HeartlineTwisterCars "rct1aa.ride.heartline_twister_cars", // VehicleType::HeartlineTwisterCarsReversed @@ -1255,7 +1255,7 @@ namespace RCT1 if (wallType < std::size(map)) return map[wallType]; - + return -1; } @@ -1455,9 +1455,9 @@ namespace RCT1 { "rct2.scenery_small.tic", "rct2.scenery_small.tlc", "rct2.scenery_small.tmc", "rct2.scenery_small.tmp", "rct2.scenery_small.titc", "rct2.scenery_small.tghc", "rct2.scenery_small.tac", "rct2.scenery_small.tghc2", "rct2.scenery_small.tcj", "rct2.scenery_small.tmbj", "rct2.scenery_small.tcf", "rct2.scenery_small.tcl", "rct2.scenery_small.trf", "rct2.scenery_small.trf2", "rct2.scenery_small.tel", "rct2.scenery_small.tap", "rct2.scenery_small.tsp", "rct2.scenery_small.tmzp", "rct2.scenery_small.tcrp", "rct2.scenery_small.tbp", "rct2.scenery_small.tlp", "rct2.scenery_small.twp", "rct2.scenery_small.tas", "rct2.scenery_small.tmg", "rct2.scenery_small.tww", "rct2.scenery_small.tsb", "rct2.scenery_small.tvl", "rct2.scenery_small.tcy", "rct2.scenery_small.tns", "rct2.scenery_small.twn", "rct2.scenery_small.tce", "rct2.scenery_small.tco", "rct2.scenery_small.thl", "rct2.scenery_small.tcc", "rct2.scenery_small.tf1", "rct2.scenery_small.tf2", "rct2.scenery_small.tct", "rct2.scenery_small.th1", "rct2.scenery_small.th2", "rct2.scenery_small.tpm", "rct2.scenery_small.tropt1", "rct2.scenery_small.ts0", "rct2.scenery_small.ts1", "rct2.scenery_small.ts2", "rct2.scenery_small.ts3", "rct2.scenery_small.ts4", "rct2.scenery_small.ts5", "rct2.scenery_small.ts6", "rct2.scenery_small.tef", "rct2.scenery_small.tal", "rct2.scenery_small.tsq", "rct2.scenery_small.tht", "rct2.scenery_small.tcb", "rct2.scenery_small.tdm", "rct2.scenery_small.tsd", "rct2.scenery_small.torn1", "rct2.scenery_small.torn2", "rct2.scenery_small.tgs", "rct2.scenery_small.tus", "rct2.scenery_small.tbc", "rct2.scenery_small.tsc", "rct2.scenery_small.twf", "rct2.scenery_small.tsh0", "rct2.scenery_small.tsh1", "rct2.scenery_small.tsh2", "rct2.scenery_small.tsh3", "rct2.scenery_small.tsh4", "rct2.scenery_small.tsh5", "rct2.scenery_small.tdf", "rct2.scenery_small.tsh", "rct2.scenery_small.thrs", "rct2.scenery_small.tstd", "rct2.scenery_small.tbr", "rct2.scenery_small.ttf", "rct2.scenery_wall.whg", "rct2.scenery_wall.whgg", "rct2.scenery_wall.wch", "rct2.scenery_wall.wchg", "rct2.scenery_small.tg1", "rct2.scenery_small.tg2", "rct2.scenery_small.tg3", "rct2.scenery_small.tg4", "rct2.scenery_small.tg5", "rct2.scenery_small.tg6", "rct2.scenery_small.tg7", "rct2.scenery_small.tg8", "rct2.scenery_small.tg9", "rct2.scenery_small.tg10", "rct2.scenery_small.tg11", "rct2.scenery_small.tg12", "rct2.scenery_small.tg13", "rct2.scenery_small.tg14", "rct2.scenery_small.tg15", "rct2.scenery_small.tg16", "rct2.scenery_small.tg17", "rct2.scenery_small.tg18", "rct2.scenery_small.tg19", "rct2.scenery_small.tg20", "rct2.scenery_small.tg21", - "rct2.scenery_wall.wbr1a", "rct2.scenery_wall.wbr2a", "rct2.scenery_wall.wallbb34", "rct2.scenery_wall.walltn32", "rct2.scenery_small.tntroof1", "rct2.scenery_wall.wallbb33", "toontowner.scenery_small.xxbbbr01_fix", "rct2.scenery_wall.wallbb32", "rct2.scenery_wall.wallbb16", "rct2.scenery_wall.wallbb8", "rct2.scenery_small.roof5", "rct2.scenery_small.roof7", "rct2.scenery_wall.wallrs32", "rct2.scenery_wall.wallrs16", "rct2.scenery_wall.wallrs8", "rct2.scenery_wall.wallbr32", "rct2.scenery_wall.wallbr16", "rct2.scenery_wall.wallbr8", "rct2.scenery_wall.wallbrdr", "rct2.scenery_wall.wallbrwn", "rct2.scenery_small.brbase", "rct2.scenery_small.roof1", "toontowner.scenery_small.ttrftl02", "toontowner.scenery_small.ttrftl03", "toontowner.scenery_small.ttrftl04", "rct2.scenery_small.roof2", "rct2.scenery_small.roof3", "toontowner.scenery_small.ttrftl07", "toontowner.scenery_small.ttrftl08", "rct2.scenery_small.roof4", "rct2.scenery_wall.wallcb32", "rct2.scenery_wall.wallcb16", "rct2.scenery_wall.wallcb8", "rct2.scenery_wall.wallcbdr", "rct2.scenery_wall.wallcbwn", "rct2.scenery_small.brbase2", "rct2.scenery_small.cwbcrv33", "rct2.scenery_small.cwbcrv32", "rct2.scenery_small.brcrrf1", "rct2.scenery_small.roof6", "rct2.scenery_small.roof8", "rct2.scenery_wall.wallcf32", "rct2.scenery_wall.wallcf16", "rct2.scenery_wall.wallcf8", "rct2.scenery_wall.wallcfdr", "rct2.scenery_wall.wallcfwn", "rct2.scenery_wall.wallcfar", "rct2.scenery_small.brbase3", "rct2.scenery_small.cwfcrv33", "rct2.scenery_small.cwfcrv32", "rct2.scenery_small.brcrrf2", "rct2.scenery_small.roof9", "rct2.scenery_small.roof11", "rct2.scenery_small.roof10", "rct2.scenery_small.roof12", "rct2.scenery_small.corroof2", "rct2.scenery_wall.wallco16", "rct2.scenery_small.corroof", "rct2.scenery_wall.walllt32", "rct2.scenery_wall.wallsk16", "rct2.scenery_wall.wallsk32", "rct2.scenery_small.sktdw2", "rct2.scenery_small.sktdw", "rct2.scenery_small.sktbase", "rct2.scenery_small.sktbaset", "rct2.scenery_small.suppw2", "rct2.scenery_small.suppw1", "rct2.scenery_small.suppw3", "rct2.scenery_small.suppleg1", "rct2.scenery_small.suppleg2", "rct2.scenery_small.sumrf", "rct2.scenery_wall.wallrh32", + "rct2.scenery_wall.wbr1a", "rct2.scenery_wall.wbr2a", "rct2.scenery_wall.wallbb34", "rct2.scenery_wall.walltn32", "rct2.scenery_small.tntroof1", "rct2.scenery_wall.wallbb33", "toontowner.scenery_small.xxbbbr01_fix", "rct2.scenery_wall.wallbb32", "rct2.scenery_wall.wallbb16", "rct2.scenery_wall.wallbb8", "rct2.scenery_small.roof5", "rct2.scenery_small.roof7", "rct2.scenery_wall.wallrs32", "rct2.scenery_wall.wallrs16", "rct2.scenery_wall.wallrs8", "rct2.scenery_wall.wallbr32", "rct2.scenery_wall.wallbr16", "rct2.scenery_wall.wallbr8", "rct2.scenery_wall.wallbrdr", "rct2.scenery_wall.wallbrwn", "rct2.scenery_small.brbase", "rct2.scenery_small.roof1", "toontowner.scenery_small.ttrftl02", "toontowner.scenery_small.ttrftl03", "toontowner.scenery_small.ttrftl04", "rct2.scenery_small.roof2", "rct2.scenery_small.roof3", "toontowner.scenery_small.ttrftl07", "toontowner.scenery_small.ttrftl08", "rct2.scenery_small.roof4", "rct2.scenery_wall.wallcb32", "rct2.scenery_wall.wallcb16", "rct2.scenery_wall.wallcb8", "rct2.scenery_wall.wallcbdr", "rct2.scenery_wall.wallcbwn", "rct2.scenery_small.brbase2", "rct2.scenery_small.cwbcrv33", "rct2.scenery_small.cwbcrv32", "rct2.scenery_small.brcrrf1", "rct2.scenery_small.roof6", "rct2.scenery_small.roof8", "rct2.scenery_wall.wallcf32", "rct2.scenery_wall.wallcf16", "rct2.scenery_wall.wallcf8", "rct2.scenery_wall.wallcfdr", "rct2.scenery_wall.wallcfwn", "rct2.scenery_wall.wallcfar", "rct2.scenery_small.brbase3", "rct2.scenery_small.cwfcrv33", "rct2.scenery_small.cwfcrv32", "rct2.scenery_small.brcrrf2", "rct2.scenery_small.roof9", "rct2.scenery_small.roof11", "rct2.scenery_small.roof10", "rct2.scenery_small.roof12", "rct2.scenery_small.corroof2", "rct2.scenery_wall.wallco16", "rct2.scenery_small.corroof", "rct2.scenery_wall.walllt32", "rct2.scenery_wall.wallsk16", "rct2.scenery_wall.wallsk32", "rct2.scenery_small.sktdw2", "rct2.scenery_small.sktdw", "rct2.scenery_small.sktbase", "rct2.scenery_small.sktbaset", "official.scenery_wall.support_structure_full", "official.scenery_wall.support_structure_half", "rct2.scenery_small.suppw2", "official.scenery_small.support_structure_half", "rct2.scenery_small.suppw1", "rct2.scenery_small.suppw3", "rct2.scenery_small.suppleg1", "rct2.scenery_small.suppleg2", "rct2.scenery_small.sumrf", "rct2.scenery_wall.wallrh32", "rct2.scenery_wall.wmf", "rct2.scenery_wall.wmfg", "rct2.scenery_wall.wsw", "rct2.scenery_wall.wswg", "rct2.scenery_wall.wfw1", "rct2.scenery_wall.wfwg", "rct1.scenery_wall.wooden_fence_brown", "rct1.scenery_wall.wooden_fence_brown_gate", "rct1.scenery_wall.wooden_fence_red", "rct1.scenery_wall.wooden_fence_white", "rct2.scenery_wall.wpf", "rct2.scenery_wall.wpfg", "rct2.scenery_wall.wsw1", "rct2.scenery_wall.wsw2", "rct2.scenery_wall.wbr1", "rct2.scenery_wall.wbrg", "rct2.scenery_wall.wbr2", "rct2.scenery_wall.wbr3", "rct2.scenery_wall.wallmm16", "rct2.scenery_wall.wallmm17", - "rct2.footpath_item.lamp1", "rct2.footpath_item.lamp2", "rct2.footpath_item.litter1", "rct2.footpath_item.bench1", "rct2.footpath_item.qtv1", "rct2.footpath_banner.bn1", "rct2.scenery_wall.wallpost", "rct2.scenery_wall.wallsign", "rct2.scenery_large.ssig1", "rct2.scenery_large.ssig2", "rct2.scenery_large.ssig3", "rct2.scenery_large.ssig4" }, + "rct2.footpath_item.lamp1", "rct2.footpath_item.lamp2", "rct2.footpath_item.litter1", "rct2.footpath_item.bench1", "rct2.footpath_item.qtv1", "rct2.footpath_banner.bn1", "rct2.scenery_wall.wallpost", "official.scenery_wall.post_flipped", "rct2.scenery_wall.wallsign", "rct2.scenery_large.ssig1", "rct2.scenery_large.ssig2", "rct2.scenery_large.ssig3", "rct2.scenery_large.ssig4" }, // RCT1_SCENERY_THEME_MINE { "rct2.scenery_large.smh1", "rct2.scenery_large.smh2", "rct2.scenery_large.smn1", "rct2.scenery_small.tbw", "rct2.scenery_small.tbr1", "rct2.scenery_small.tbr2", "rct2.scenery_small.tml", "rct2.scenery_small.tmw", "rct2.scenery_small.tbr3", "rct2.scenery_small.tbr4", "rct2.scenery_small.tmj", "rct2.footpath_banner.bn5", "rct2.scenery_wall.wallwd8", "rct2.scenery_wall.wallwd16", "rct2.scenery_wall.wallwd32", "rct2.scenery_wall.wallwd33", "rct2.scenery_wall.wallmn32", "rct2.scenery_small.wdbase", "rct2.scenery_small.minroof1", "rct2.scenery_small.roof13", "toontowner.scenery_small.ttrfwd01", "toontowner.scenery_small.ttrfwd02", "toontowner.scenery_small.ttrfwd03", "toontowner.scenery_small.ttrfwd04", "toontowner.scenery_small.ttrfwd06", "toontowner.scenery_small.ttrfwd07", "toontowner.scenery_small.ttrfwd08", "rct2.footpath_item.littermn" }, // RCT1_SCENERY_THEME_CLASSICAL_ROMAN diff --git a/src/openrct2/rct12/Limits.h b/src/openrct2/rct12/Limits.h index 8f6a4935be..218b1635fa 100644 --- a/src/openrct2/rct12/Limits.h +++ b/src/openrct2/rct12/Limits.h @@ -14,19 +14,19 @@ namespace RCT12::Limits { constexpr uint8_t MaxRideObjects = 128; - constexpr uint8_t MaxRidesInPark = 255; - constexpr uint8_t MaxAwards = 4; + constexpr uint8_t kMaxRidesInPark = 255; + constexpr uint8_t kMaxAwards = 4; constexpr uint8_t MaxNewsItems = 61; - constexpr uint8_t MaxStationsPerRide = 4; - constexpr uint8_t MaxPeepSpawns = 2; - constexpr uint8_t MaxParkEntrances = 4; + constexpr uint8_t kMaxStationsPerRide = 4; + constexpr uint8_t kMaxPeepSpawns = 2; + constexpr uint8_t kMaxParkEntrances = 4; // The number of elements in the patrol_areas array per staff member. Every bit in the array represents a 4x4 square. // In RCT1, that's an 8-bit array. 8 * 128 = 1024 bits, which is also the number of 4x4 squares on a 128x128 map. // For RCT2, it's a 32-bit array. 32 * 128 = 4096 bits, which is also the number of 4x4 squares on a 256x256 map. constexpr uint8_t PatrolAreaSize = 128; constexpr uint8_t StaffTypeCount = 4; - constexpr uint8_t NumColourSchemes = 4; - constexpr uint8_t MaxVehicleColours = 32; + constexpr uint8_t kNumColourSchemes = 4; + constexpr uint8_t kMaxVehicleColours = 32; constexpr uint8_t ExpenditureTableMonthCount = 16; constexpr uint8_t ExpenditureTypeCount = 14; @@ -39,11 +39,11 @@ namespace RCT12::Limits constexpr uint16_t RideMeasurementMaxItems = 4800; - constexpr uint16_t const MaxInversions = 31; - constexpr uint16_t const MaxGolfHoles = 31; - constexpr uint16_t const MaxHelices = 31; + constexpr uint16_t const kMaxInversions = 31; + constexpr uint16_t const kMaxGolfHoles = 31; + constexpr uint16_t const kMaxHelices = 31; constexpr uint8_t MaxElementHeight = 255; - constexpr uint8_t CustomerHistorySize = 10; + constexpr uint8_t kCustomerHistorySize = 10; - constexpr uint8_t MaxWaitingTime = 250; + constexpr uint8_t kMaxWaitingTime = 250; } // namespace RCT12::Limits diff --git a/src/openrct2/rct12/RCT12.cpp b/src/openrct2/rct12/RCT12.cpp index 1be2bb0782..3af6d4b165 100644 --- a/src/openrct2/rct12/RCT12.cpp +++ b/src/openrct2/rct12/RCT12.cpp @@ -25,6 +25,7 @@ #include "../world/Surface.h" #include "../world/TileElement.h" #include "../world/Wall.h" +#include "../world/tile_element/Slope.h" #include "EntryList.h" using namespace OpenRCT2; @@ -74,7 +75,7 @@ bool RCT12TileElementBase::IsGhost() const uint8_t RCT12SurfaceElement::GetSlope() const { - return (Slope & kTileElementSurfaceSlopeMask); + return (Slope & kTileSlopeMask); } uint32_t RCT12SurfaceElement::GetSurfaceStyle() const @@ -215,9 +216,9 @@ uint8_t RCT12TrackElement::GetRideIndex() const return RideIndex; } -uint8_t RCT12TrackElement::GetColourScheme() const +RideColourScheme RCT12TrackElement::GetColourScheme() const { - return Colour & 0x3; + return static_cast(Colour & 0x3); } uint8_t RCT12TrackElement::GetStationIndex() const @@ -759,16 +760,6 @@ static constexpr std::string_view _musicStyles[] = { "rct2.music.pirate", "rct2.music.rock3", "rct2.music.candy", - "openrct2.music.galaxy", - "openrct2.music.acid", - "openrct2.music.dodgems", - "openrct2.music.blizzard", - "openrct2.music.extraterrestrial", - "openrct2.music.fairground2", - "openrct2.music.ragtime2", - "openrct2.music.prehistoric", - "openrct2.music.mystic", - "openrct2.music.rock4", }; std::string_view GetStationIdentifierFromStyle(uint8_t style) @@ -881,53 +872,53 @@ ResearchItem RCT12ResearchItem::ToResearchItem() const void ConvertFromTD46Flags(TrackDesignTrackElement& target, uint8_t flags) { - target.BrakeBoosterSpeed = kRCT2DefaultBlockBrakeSpeed; - if (TrackTypeIsStation(target.Type)) + target.brakeBoosterSpeed = kRCT2DefaultBlockBrakeSpeed; + if (TrackTypeIsStation(target.type)) { auto stationIndex = flags & EnumValue(TD46Flags::StationId); - target.StationIndex = StationIndex::FromUnderlying(stationIndex); + target.stationIndex = StationIndex::FromUnderlying(stationIndex); } else { auto speedOrSeatRotation = flags & EnumValue(TD46Flags::SpeedOrSeatRotation); - if (TrackTypeHasSpeedSetting(target.Type) && target.Type != TrackElemType::BlockBrakes) + if (TrackTypeHasSpeedSetting(target.type) && target.type != TrackElemType::BlockBrakes) { - target.BrakeBoosterSpeed = speedOrSeatRotation << 1; + target.brakeBoosterSpeed = speedOrSeatRotation << 1; } else { - target.SeatRotation = speedOrSeatRotation; + target.seatRotation = speedOrSeatRotation; } } - target.ColourScheme = (flags & EnumValue(TD46Flags::ColourScheme)) >> 4; + target.colourScheme = (flags & EnumValue(TD46Flags::ColourScheme)) >> 4; if (flags & EnumValue(TD46Flags::IsInverted)) - target.SetFlag(TrackDesignTrackElementFlag::IsInverted); + target.SetFlag(TrackDesignTrackElementFlag::isInverted); if (flags & EnumValue(TD46Flags::HasChain)) - target.SetFlag(TrackDesignTrackElementFlag::HasChain); + target.SetFlag(TrackDesignTrackElementFlag::hasChain); } uint8_t ConvertToTD46Flags(const TrackDesignTrackElement& source) { uint8_t trackFlags = 0; - if (TrackTypeIsStation(source.Type)) + if (TrackTypeIsStation(source.type)) { - trackFlags = (source.StationIndex.ToUnderlying() & EnumValue(TD46Flags::StationId)); + trackFlags = (source.stationIndex.ToUnderlying() & EnumValue(TD46Flags::StationId)); } - else if (TrackTypeHasSpeedSetting(source.Type) && source.Type != TrackElemType::BlockBrakes) + else if (TrackTypeHasSpeedSetting(source.type) && source.type != TrackElemType::BlockBrakes) { - trackFlags = (source.BrakeBoosterSpeed >> 1); + trackFlags = (source.brakeBoosterSpeed >> 1); } else { - trackFlags = source.SeatRotation; + trackFlags = source.seatRotation; } - trackFlags |= source.ColourScheme << 4; + trackFlags |= source.colourScheme << 4; - if (source.HasFlag(TrackDesignTrackElementFlag::HasChain)) + if (source.HasFlag(TrackDesignTrackElementFlag::hasChain)) trackFlags |= EnumValue(TD46Flags::HasChain); - if (source.HasFlag(TrackDesignTrackElementFlag::IsInverted)) + if (source.HasFlag(TrackDesignTrackElementFlag::isInverted)) trackFlags |= EnumValue(TD46Flags::IsInverted); return trackFlags; @@ -938,18 +929,17 @@ void ImportMazeElement(TrackDesign& td, const TD46MazeElement& td46MazeElement) if (td46MazeElement.IsEntrance() || td46MazeElement.IsExit()) { TrackDesignEntranceElement element{}; - element.Location = TileCoordsXYZD(td46MazeElement.x, td46MazeElement.y, 0, td46MazeElement.Direction); - element.IsExit = td46MazeElement.IsExit(); - td.entrance_elements.push_back(element); + element.location = TileCoordsXYZD(td46MazeElement.x, td46MazeElement.y, 0, td46MazeElement.Direction); + element.isExit = td46MazeElement.IsExit(); + td.entranceElements.push_back(element); } else { TrackDesignMazeElement mazeElement{}; - mazeElement.x = td46MazeElement.x; - mazeElement.y = td46MazeElement.y; - mazeElement.direction = td46MazeElement.Direction; - mazeElement.type = td46MazeElement.Type; - td.maze_elements.push_back(mazeElement); + mazeElement.location.x = td46MazeElement.x; + mazeElement.location.y = td46MazeElement.y; + mazeElement.mazeEntry = td46MazeElement.MazeEntry; + td.mazeElements.push_back(mazeElement); } } diff --git a/src/openrct2/rct12/RCT12.h b/src/openrct2/rct12/RCT12.h index c01bf76ced..e6915d9497 100644 --- a/src/openrct2/rct12/RCT12.h +++ b/src/openrct2/rct12/RCT12.h @@ -74,8 +74,15 @@ constexpr uint8_t RCT12PeepThoughtItemNone = std::numeric_limits::max() constexpr uint8_t RCT12GuestsInParkHistoryFactor = 20; constexpr uint8_t RCT12ParkHistoryUndefined = std::numeric_limits::max(); +constexpr uint8_t kTD46RatingsMultiplier = 10; +constexpr uint8_t kTD46GForcesMultiplier = 32; + +constexpr uint8_t kRCT12InversionAndHoleMask = 0b00011111; +constexpr uint8_t kRCT12RideNumDropsMask = 0b00111111; + struct TrackDesign; struct TrackDesignTrackElement; +enum class RideColourScheme : uint8_t; enum class RCT12TrackDesignVersion : uint8_t { @@ -527,7 +534,7 @@ public: uint8_t GetTrackType() const; uint8_t GetSequenceIndex() const; uint8_t GetRideIndex() const; - uint8_t GetColourScheme() const; + RideColourScheme GetColourScheme() const; uint8_t GetStationIndex() const; bool HasChain() const; bool HasCableLift() const; @@ -929,7 +936,7 @@ template std::vector RCT12GetRideTypesBeenOn(T* srcPeep) template std::vector RCT12GetRidesBeenOn(T* srcPeep) { std::vector ridesBeenOn; - for (uint16_t i = 0; i < RCT12::Limits::MaxRidesInPark; i++) + for (uint16_t i = 0; i < RCT12::Limits::kMaxRidesInPark; i++) { if (srcPeep->RidesBeenOn[i / 8] & (1 << (i % 8))) { diff --git a/src/openrct2/rct2/Limits.h b/src/openrct2/rct2/Limits.h index 9e139e1d99..6f425051a5 100644 --- a/src/openrct2/rct2/Limits.h +++ b/src/openrct2/rct2/Limits.h @@ -13,37 +13,36 @@ namespace RCT2::Limits { using namespace RCT12::Limits; - constexpr uint8_t MaxStaff = 200; - constexpr uint8_t MaxBanners = 250; - constexpr uint8_t MaxTrainsPerRide = 32; - constexpr uint8_t MaxVehicleColours = 32; - constexpr uint8_t DowntimeHistorySize = 8; - constexpr uint16_t MaxEntities = 10000; - constexpr uint16_t MaxEntitiesRCTCExtended = 15000; // Used in files marked with “classic flag” 0xF - constexpr uint32_t MaxTileElements = 0x30000; - constexpr uint16_t MaxAnimatedObjects = 2000; - constexpr uint8_t MaxResearchedRideTypeQuads = 8; // With 32 bits per uint32_t, this means there is room for - // 256 types. - constexpr uint8_t MaxResearchedRideEntryQuads = 8; // With 32 bits per uint32_t, this means there is room for - // 256 entries. - constexpr uint8_t MaxResearchedSceneryItemQuads = 56; - constexpr const uint16_t MaxResearchedSceneryItems = (MaxResearchedSceneryItemQuads * 32); // There are 32 - // bits per - // quad. - constexpr uint16_t MaxResearchItems = 500; + constexpr uint8_t kMaxStaff = 200; + constexpr uint8_t kMaxBanners = 250; + constexpr uint8_t kMaxTrainsPerRide = 32; + constexpr uint8_t kMaxVehicleColours = 32; + constexpr uint8_t kDowntimeHistorySize = 8; + constexpr uint16_t kMaxEntities = 10000; + constexpr uint16_t kMaxEntitiesRCTCExtended = 15000; // Used in files marked with “classic flag” 0xF + constexpr uint32_t kMaxTileElements = 0x30000; + constexpr uint16_t kMaxAnimatedObjects = 2000; + constexpr uint8_t kMaxResearchedRideTypeQuads = 8; // With 32 bits per uint32_t, this means there is room for + // 256 types. + constexpr uint8_t kMaxResearchedRideEntryQuads = 8; // With 32 bits per uint32_t, this means there is room for + // 256 entries. + constexpr uint8_t kMaxResearchedSceneryItemQuads = 56; + constexpr const uint16_t kMaxResearchedSceneryItems = (kMaxResearchedSceneryItemQuads * 32); // There are 32 + // bits per + // quad. + constexpr uint16_t kMaxResearchItems = 500; - constexpr uint16_t TD6MaxTrackElements = 8192; + constexpr uint16_t kTD6MaxTrackElements = 8192; - constexpr uint8_t MaxSmallSceneryObjects = 252; - constexpr uint8_t MaxLargeSceneryObjects = 128; - constexpr uint8_t MaxWallSceneryObjects = 128; - constexpr uint8_t MaxBannerObjects = 32; - constexpr uint8_t MaxPathObjects = 16; - constexpr uint8_t MaxPathAdditionObjects = 15; - constexpr uint8_t MaxSceneryGroupObjects = 19; - constexpr uint8_t MaxParkEntranceObjects = 1; - constexpr uint8_t MaxWaterObjects = 1; - constexpr uint8_t MaxScenarioTextObjects = 1; - constexpr uint8_t RideTypeCount = 91; - constexpr uint16_t MaxMapSize = 256; + constexpr uint8_t kMaxSmallSceneryObjects = 252; + constexpr uint8_t kMaxLargeSceneryObjects = 128; + constexpr uint8_t kMaxWallSceneryObjects = 128; + constexpr uint8_t kMaxBannerObjects = 32; + constexpr uint8_t kMaxPathObjects = 16; + constexpr uint8_t kMaxPathAdditionObjects = 15; + constexpr uint8_t kMaxSceneryGroupObjects = 19; + constexpr uint8_t kMaxParkEntranceObjects = 1; + constexpr uint8_t kMaxWaterObjects = 1; + constexpr uint8_t kMaxScenarioTextObjects = 1; + constexpr uint16_t kMaxMapSize = 256; } // namespace RCT2::Limits diff --git a/src/openrct2/rct2/RCT2.cpp b/src/openrct2/rct2/RCT2.cpp index b111c81749..2d80c32106 100644 --- a/src/openrct2/rct2/RCT2.cpp +++ b/src/openrct2/rct2/RCT2.cpp @@ -263,4 +263,9 @@ namespace RCT2 return result; return {}; } + + colour_t TD6SceneryElement::getTertiaryWallColour() const + { + return (Flags & 0xFC) >> 2; + } } // namespace RCT2 diff --git a/src/openrct2/rct2/RCT2.h b/src/openrct2/rct2/RCT2.h index 16ddbbe13d..14e7eb1323 100644 --- a/src/openrct2/rct2/RCT2.h +++ b/src/openrct2/rct2/RCT2.h @@ -11,6 +11,7 @@ #include "../common.h" #include "../core/FileSystem.hpp" +#include "../core/FixedPoint.hpp" #include "../rct12/RCT12.h" #include "../ride/RideRatings.h" #include "../world/Park.h" @@ -22,6 +23,7 @@ struct RideObjectEntry; class ObjectList; enum class EditorStep : uint8_t; +enum class VehicleColourSettings : uint8_t; namespace RCT2 { @@ -30,32 +32,32 @@ namespace RCT2 // clang-format off constexpr uint16_t RCT2_OBJECT_ENTRY_COUNT = Limits::MaxRideObjects + - Limits::MaxSmallSceneryObjects + - Limits::MaxLargeSceneryObjects + - Limits::MaxWallSceneryObjects + - Limits::MaxBannerObjects + - Limits::MaxPathObjects + - Limits::MaxPathAdditionObjects + - Limits::MaxSceneryGroupObjects + - Limits::MaxParkEntranceObjects + - Limits::MaxWaterObjects + - Limits::MaxScenarioTextObjects; + Limits::kMaxSmallSceneryObjects + + Limits::kMaxLargeSceneryObjects + + Limits::kMaxWallSceneryObjects + + Limits::kMaxBannerObjects + + Limits::kMaxPathObjects + + Limits::kMaxPathAdditionObjects + + Limits::kMaxSceneryGroupObjects + + Limits::kMaxParkEntranceObjects + + Limits::kMaxWaterObjects + + Limits::kMaxScenarioTextObjects; // clang-format on static_assert(RCT2_OBJECT_ENTRY_COUNT == 721); // clang-format off constexpr int32_t RCT2ObjectEntryGroupCounts[] = { Limits::MaxRideObjects, - Limits::MaxSmallSceneryObjects, - Limits::MaxLargeSceneryObjects, - Limits::MaxWallSceneryObjects, - Limits::MaxBannerObjects, - Limits::MaxPathObjects, - Limits::MaxPathAdditionObjects, - Limits::MaxSceneryGroupObjects, - Limits::MaxParkEntranceObjects, - Limits::MaxWaterObjects, - Limits::MaxScenarioTextObjects, + Limits::kMaxSmallSceneryObjects, + Limits::kMaxLargeSceneryObjects, + Limits::kMaxWallSceneryObjects, + Limits::kMaxBannerObjects, + Limits::kMaxPathObjects, + Limits::kMaxPathAdditionObjects, + Limits::kMaxSceneryGroupObjects, + Limits::kMaxParkEntranceObjects, + Limits::kMaxWaterObjects, + Limits::kMaxScenarioTextObjects, }; // clang-format on @@ -73,11 +75,11 @@ namespace RCT2 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 - uint8_t ColourSchemeType; // 0x005 - RCT12VehicleColour VehicleColours[Limits::MaxVehicleColours]; // 0x006 + 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 // 0 = closed, 1 = open, 2 = test uint8_t Status; // 0x049 @@ -91,21 +93,21 @@ namespace RCT2 uint16_t NameArgumentsNumber; // 0x04E }; }; - RCT12xy8 OverallView; // 0x050 - RCT12xy8 StationStarts[Limits::MaxStationsPerRide]; // 0x052 - uint8_t StationHeights[Limits::MaxStationsPerRide]; // 0x05A - uint8_t StationLength[Limits::MaxStationsPerRide]; // 0x05E - uint8_t StationDepart[Limits::MaxStationsPerRide]; // 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::MaxStationsPerRide]; // 0x066 - RCT12xy8 Entrances[Limits::MaxStationsPerRide]; // 0x06A - RCT12xy8 Exits[Limits::MaxStationsPerRide]; // 0x072 - uint16_t LastPeepInQueue[Limits::MaxStationsPerRide]; // 0x07A - uint8_t Pad082[Limits::MaxStationsPerRide]; // 0x082, Used to be number of peeps in queue in RCT1, but this - // has moved. - uint16_t Vehicles[Limits::MaxTrainsPerRide]; // 0x086, Points to the first car in the train - uint8_t DepartFlags; // 0x0C6 + 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 // Not sure if these should be uint or sint. uint8_t NumStations; // 0x0C7 @@ -138,20 +140,20 @@ namespace RCT2 uint8_t Pad0D6[2]; // 0x0D6 // Divide this value by 29127 to get the human-readable max speed // (in RCT2, display_speed = (max_speed * 9) >> 18) - 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::MaxStationsPerRide]; // 0x0E4 - uint16_t Time[Limits::MaxStationsPerRide]; // 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 @@ -182,25 +184,16 @@ namespace RCT2 // Counts ticks to update customer intervals, resets each 960 game ticks. uint16_t NumCustomersTimeout; // 0x122 // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t NumCustomers[Limits::CustomerHistorySize]; // 0x124 - money16 Price; // 0x138 - RCT12xy8 ChairliftBullwheelLocation[2]; // 0x13A - uint8_t ChairliftBullwheelZ[2]; // 0x13E - union - { - RatingTuple Ratings; // 0x140 - struct - { - ride_rating Excitement; // 0x140 - ride_rating Intensity; // 0x142 - ride_rating Nausea; // 0x144 - }; - }; - money16 Value; // 0x146 - uint16_t ChairliftBullwheelRotation; // 0x148 - uint8_t Satisfaction; // 0x14A - uint8_t SatisfactionTimeOut; // 0x14B - uint8_t SatisfactionNext; // 0x14C + 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 // Various flags stating whether a window needs to be refreshed uint8_t WindowInvalidateFlags; // 0x14D uint8_t Pad14E[0x02]; // 0x14E @@ -248,42 +241,42 @@ namespace RCT2 // making breakdowns more and more likely. uint8_t UnreliabilityFactor; // 0x198 // Range from [0, 100] - uint8_t Downtime; // 0x199 - uint8_t InspectionInterval; // 0x19A - uint8_t LastInspection; // 0x19B - uint8_t DowntimeHistory[Limits::DowntimeHistorySize]; // 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 NoPrimaryItemsSold; // 0x1A4 + uint32_t NoSecondaryItemsSold; // 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::MaxStationsPerRide]; // 0x1B8 - uint8_t TrackColourMain[Limits::NumColourSchemes]; // 0x1BC - uint8_t TrackColourAdditional[Limits::NumColourSchemes]; // 0x1C0 - uint8_t TrackColourSupports[Limits::NumColourSchemes]; // 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::MaxVehicleColours]; // 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::MaxStationsPerRide]; // 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; @@ -322,6 +315,9 @@ namespace RCT2 uint8_t Flags; // 0x13 direction quadrant tertiary colour uint8_t PrimaryColour; // 0x14 uint8_t SecondaryColour; // 0x15 + + colour_t getTertiaryWallColour() const; + void setTertiaryWallColour(colour_t colour); }; assert_struct_size(TD6SceneryElement, 0x16); @@ -333,69 +329,45 @@ namespace RCT2 { uint8_t Type; // 0x00 RCT12ObjectEntryIndex VehicleType; - union - { - // After loading the track this is converted to - // a cost but before its a flags register - money32 Cost; // 0x02 - uint32_t Flags; // 0x02 - }; - union - { - // After loading the track this is converted to - // a flags register - uint8_t RideMode; // 0x06 - uint8_t TrackFlags; // 0x06 - }; - uint8_t VersionAndColourScheme; // 0x07 0b0000_VVCC - RCT12VehicleColour VehicleColours[Limits::MaxTrainsPerRide]; // 0x08 - union - { - uint8_t Pad48; - uint8_t TrackSpineColourRCT1; // 0x48 - }; - union - { - uint8_t EntranceStyle; // 0x49 - uint8_t TrackRailColourRCT1; // 0x49 - }; - union - { - uint8_t TotalAirTime; // 0x4A - uint8_t TrackSupportColourRCT1; // 0x4A - }; - uint8_t DepartFlags; // 0x4B - uint8_t NumberOfTrains; // 0x4C - uint8_t NumberOfCarsPerTrain; // 0x4D - uint8_t MinWaitingTime; // 0x4E - uint8_t MaxWaitingTime; // 0x4F - uint8_t OperationSetting; - int8_t MaxSpeed; // 0x51 - int8_t AverageSpeed; // 0x52 - uint16_t RideLength; // 0x53 - uint8_t MaxPositiveVerticalG; // 0x55 - int8_t MaxNegativeVerticalG; // 0x56 - uint8_t MaxLateralG; // 0x57 + uint32_t Flags; // 0x02 + uint8_t RideMode; // 0x06 + uint8_t VersionAndColourScheme; // 0x07 0b0000_VVCC + RCT12VehicleColour VehicleColours[Limits::kMaxTrainsPerRide]; // 0x08 + uint8_t Pad48; // 0x48 + uint8_t EntranceStyle; // 0x49 + uint8_t TotalAirTime; // 0x4A + uint8_t DepartFlags; // 0x4B + uint8_t NumberOfTrains; // 0x4C + uint8_t NumberOfCarsPerTrain; // 0x4D + uint8_t MinWaitingTime; // 0x4E + uint8_t MaxWaitingTime; // 0x4F + uint8_t OperationSetting; // 0x50 + int8_t MaxSpeed; // 0x51 + int8_t AverageSpeed; // 0x52 + uint16_t RideLength; // 0x53 + uint8_t MaxPositiveVerticalG; // 0x55 + int8_t MaxNegativeVerticalG; // 0x56 + uint8_t MaxLateralG; // 0x57 union { uint8_t Inversions; // 0x58 uint8_t Holes; // 0x58 }; - uint8_t Drops; // 0x59 - uint8_t HighestDropHeight; // 0x5A - uint8_t Excitement; // 0x5B - uint8_t Intensity; // 0x5C - uint8_t Nausea; // 0x5D - money16 UpkeepCost; // 0x5E - uint8_t TrackSpineColour[Limits::NumColourSchemes]; // 0x60 - uint8_t TrackRailColour[Limits::NumColourSchemes]; // 0x64 - uint8_t TrackSupportColour[Limits::NumColourSchemes]; // 0x68 - uint32_t Flags2; // 0x6C - RCTObjectEntry VehicleObject; // 0x70 - uint8_t SpaceRequiredX; // 0x80 - uint8_t SpaceRequiredY; // 0x81 - uint8_t VehicleAdditionalColour[Limits::MaxTrainsPerRide]; // 0x82 - uint8_t LiftHillSpeedNumCircuits; // 0xA2 0bCCCL_LLLL + uint8_t Drops; // 0x59 + uint8_t HighestDropHeight; // 0x5A + uint8_t Excitement; // 0x5B + uint8_t Intensity; // 0x5C + uint8_t Nausea; // 0x5D + money16 UpkeepCost; // 0x5E + uint8_t TrackSpineColour[Limits::kNumColourSchemes]; // 0x60 + uint8_t TrackRailColour[Limits::kNumColourSchemes]; // 0x64 + uint8_t TrackSupportColour[Limits::kNumColourSchemes]; // 0x68 + uint32_t Flags2; // 0x6C + RCTObjectEntry VehicleObject; // 0x70 + uint8_t SpaceRequiredX; // 0x80 + uint8_t SpaceRequiredY; // 0x81 + uint8_t VehicleAdditionalColour[Limits::kMaxTrainsPerRide]; // 0x82 + uint8_t LiftHillSpeedNumCircuits; // 0xA2 0bCCCL_LLLL // 0xA3 (data starts here in file) }; assert_struct_size(TD6Track, 0xA3); @@ -820,16 +792,16 @@ namespace RCT2 struct { RCTObjectEntry RideObjects[Limits::MaxRideObjects]; - RCTObjectEntry SceneryObjects[Limits::MaxSmallSceneryObjects]; - RCTObjectEntry LargeSceneryObjects[Limits::MaxLargeSceneryObjects]; - RCTObjectEntry WallSceneryObjects[Limits::MaxWallSceneryObjects]; - RCTObjectEntry BannerObjects[Limits::MaxBannerObjects]; - RCTObjectEntry PathObjects[Limits::MaxPathObjects]; - RCTObjectEntry PathAdditionObjects[Limits::MaxPathAdditionObjects]; - RCTObjectEntry SceneryGroupObjects[Limits::MaxSceneryGroupObjects]; - RCTObjectEntry ParkEntranceObjects[Limits::MaxParkEntranceObjects]; - RCTObjectEntry WaterObjects[Limits::MaxWaterObjects]; - RCTObjectEntry ScenarioTextObjects[Limits::MaxScenarioTextObjects]; + RCTObjectEntry SceneryObjects[Limits::kMaxSmallSceneryObjects]; + RCTObjectEntry LargeSceneryObjects[Limits::kMaxLargeSceneryObjects]; + RCTObjectEntry WallSceneryObjects[Limits::kMaxWallSceneryObjects]; + RCTObjectEntry BannerObjects[Limits::kMaxBannerObjects]; + RCTObjectEntry PathObjects[Limits::kMaxPathObjects]; + RCTObjectEntry PathAdditionObjects[Limits::kMaxPathAdditionObjects]; + RCTObjectEntry SceneryGroupObjects[Limits::kMaxSceneryGroupObjects]; + RCTObjectEntry ParkEntranceObjects[Limits::kMaxParkEntranceObjects]; + RCTObjectEntry WaterObjects[Limits::kMaxWaterObjects]; + RCTObjectEntry ScenarioTextObjects[Limits::kMaxScenarioTextObjects]; }; }; @@ -841,11 +813,11 @@ namespace RCT2 uint32_t ScenarioSrand1; // SC6[5] - RCT12TileElement TileElements[Limits::MaxTileElements]; + RCT12TileElement TileElements[Limits::kMaxTileElements]; // SC6[6] uint32_t NextFreeTileElementPointerIndex; - Entity Entities[Limits::MaxEntitiesRCTCExtended]; + Entity Entities[Limits::kMaxEntitiesRCTCExtended]; uint16_t EntityListsHead[EnumValue(EntityListId::Count)]; uint16_t EntityListsCount[EnumValue(EntityListId::Count)]; StringId ParkName; @@ -860,12 +832,12 @@ namespace RCT2 uint8_t Pad013573EE[2]; uint8_t RCT1ParkEntranceZ; uint8_t Pad013573F1; - RCT12PeepSpawn PeepSpawns[Limits::MaxPeepSpawns]; + RCT12PeepSpawn PeepSpawns[Limits::kMaxPeepSpawns]; uint8_t GuestCountChangeModifier; uint8_t CurrentResearchLevel; uint8_t Pad01357400[4]; - uint32_t ResearchedRideTypes[Limits::MaxResearchedRideTypeQuads]; - uint32_t ResearchedRideEntries[Limits::MaxResearchedRideEntryQuads]; + uint32_t ResearchedRideTypes[Limits::kMaxResearchedRideTypeQuads]; + uint32_t ResearchedRideEntries[Limits::kMaxResearchedRideEntryQuads]; uint32_t ResearchedTrackTypesA[128]; uint32_t ResearchedTrackTypesB[128]; @@ -884,7 +856,7 @@ namespace RCT2 uint8_t SecurityColour; // Ignored in scenario - uint32_t ResearchedSceneryItems[Limits::MaxResearchedSceneryItemQuads]; + uint32_t ResearchedSceneryItems[Limits::kMaxResearchedSceneryItemQuads]; // SC6[9] uint16_t ParkRating; @@ -944,7 +916,7 @@ namespace RCT2 money32 IncomeFromAdmissions; money32 CompanyValue; uint8_t PeepWarningThrottle[16]; - RCT12Award Awards[Limits::MaxAwards]; + RCT12Award Awards[Limits::kMaxAwards]; money16 LandPrice; money16 ConstructionRightsPrice; uint16_t Word01358774; @@ -972,29 +944,29 @@ namespace RCT2 uint8_t LastEntranceStyle; uint8_t RCT1WaterColour; uint8_t Pad01358842[2]; - RCT12ResearchItem ResearchItems[Limits::MaxResearchItems]; + RCT12ResearchItem ResearchItems[Limits::kMaxResearchItems]; uint16_t MapBaseZ; char ScenarioName[64]; char ScenarioDescription[256]; uint8_t CurrentInterestRate; uint8_t Pad0135934B; uint32_t SamePriceThroughoutExtended; - int16_t ParkEntranceX[Limits::MaxParkEntrances]; - int16_t ParkEntranceY[Limits::MaxParkEntrances]; - int16_t ParkEntranceZ[Limits::MaxParkEntrances]; - uint8_t ParkEntranceDirection[Limits::MaxParkEntrances]; + int16_t ParkEntranceX[Limits::kMaxParkEntrances]; + int16_t ParkEntranceY[Limits::kMaxParkEntrances]; + int16_t ParkEntranceZ[Limits::kMaxParkEntrances]; + uint8_t ParkEntranceDirection[Limits::kMaxParkEntrances]; char ScenarioFilename[256]; uint8_t SavedExpansionPackNames[3256]; - RCT12Banner Banners[Limits::MaxBanners]; + RCT12Banner Banners[Limits::kMaxBanners]; char CustomStrings[Limits::MaxUserStrings][Limits::MaxUserStringLength]; uint32_t GameTicks1; - Ride Rides[Limits::MaxRidesInPark]; + Ride Rides[Limits::kMaxRidesInPark]; uint16_t SavedAge; // unused int16_t SavedViewX; int16_t SavedViewY; uint8_t SavedViewZoom; uint8_t SavedViewRotation; - RCT12MapAnimation MapAnimations[Limits::MaxAnimatedObjects]; + RCT12MapAnimation MapAnimations[Limits::kMaxAnimatedObjects]; uint16_t NumMapAnimations; uint8_t Pad0138B582[2]; RideRatingCalculationData RideRatingsCalcData; @@ -1002,8 +974,8 @@ namespace RCT2 RCT12RideMeasurement RideMeasurements[8]; uint32_t NextGuestIndex; uint16_t GrassAndSceneryTilepos; - uint32_t PatrolAreas[(Limits::MaxStaff + Limits::StaffTypeCount) * Limits::PatrolAreaSize]; - StaffMode StaffModes[Limits::MaxStaff + Limits::StaffTypeCount]; + uint32_t PatrolAreas[(Limits::kMaxStaff + Limits::StaffTypeCount) * Limits::PatrolAreaSize]; + StaffMode StaffModes[Limits::kMaxStaff + Limits::StaffTypeCount]; uint8_t Pad13CA73E; uint8_t Pad13CA73F; uint8_t Byte13CA740; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index eb9592f5ba..5115d05874 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -14,7 +14,6 @@ #include "../GameState.h" #include "../OpenRCT2.h" #include "../ParkImporter.h" -#include "../config/Config.h" #include "../core/Console.hpp" #include "../core/FileStream.h" #include "../core/IStream.hpp" @@ -94,7 +93,7 @@ namespace RCT2 uint8_t _gameVersion = 0; bool _isSV7 = false; bool _isScenario = false; - OpenRCT2::BitSet _isFlatRide{}; + OpenRCT2::BitSet _isFlatRide{}; ObjectEntryIndex _pathToSurfaceMap[16]; ObjectEntryIndex _pathToQueueSurfaceMap[16]; ObjectEntryIndex _pathToRailingMap[16]; @@ -412,7 +411,7 @@ namespace RCT2 // Pad0135934B // Preserve compatibility with vanilla RCT2's save format. gameState.Park.Entrances.clear(); - for (uint8_t i = 0; i < Limits::MaxParkEntrances; i++) + for (uint8_t i = 0; i < Limits::kMaxParkEntrances; i++) { if (_s6.ParkEntranceX[i] != LOCATION_NULL) { @@ -1232,7 +1231,7 @@ namespace RCT2 void ImportRides() { - for (uint8_t index = 0; index < Limits::MaxRidesInPark; index++) + for (uint8_t index = 0; index < Limits::kMaxRidesInPark; index++) { auto src = &_s6.Rides[index]; if (src->Type != RIDE_TYPE_NULL) @@ -1258,7 +1257,7 @@ namespace RCT2 */ void DetermineFlatRideStatus() { - for (uint8_t index = 0; index < Limits::MaxRidesInPark; index++) + for (uint8_t index = 0; index < Limits::kMaxRidesInPark; index++) { auto src = &_s6.Rides[index]; if (src->Type == RIDE_TYPE_NULL) @@ -1317,9 +1316,9 @@ namespace RCT2 dst->subtype = subtype; // Pad002; dst->mode = static_cast(src->Mode); - dst->colour_scheme_type = src->ColourSchemeType; + dst->vehicleColourSettings = src->vehicleColourSettings; - for (uint8_t i = 0; i < Limits::MaxVehicleColours; i++) + 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; @@ -1348,7 +1347,7 @@ namespace RCT2 dst->overall_view = tileLoc.ToCoordsXY(); } - for (StationIndex::UnderlyingType i = 0; i < Limits::MaxStationsPerRide; i++) + for (StationIndex::UnderlyingType i = 0; i < Limits::kMaxStationsPerRide; i++) { StationIndex stationIndex = StationIndex::FromUnderlying(i); auto& destStation = dst->GetStation(stationIndex); @@ -1388,7 +1387,7 @@ namespace RCT2 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::MaxStationsPerRide; i < OpenRCT2::Limits::MaxStationsPerRide; i++) + for (int32_t i = Limits::kMaxStationsPerRide; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { StationIndex stationIndex = StationIndex::FromUnderlying(i); auto& destStation = dst->GetStation(stationIndex); @@ -1400,11 +1399,11 @@ namespace RCT2 destStation.LastPeepInQueue = EntityId::GetNull(); } - for (int32_t i = 0; i < Limits::MaxTrainsPerRide; i++) + for (int32_t i = 0; i < Limits::kMaxTrainsPerRide; i++) { dst->vehicles[i] = EntityId::FromUnderlying(src->Vehicles[i]); } - for (int32_t i = Limits::MaxTrainsPerRide - 1; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) + for (int32_t i = Limits::kMaxTrainsPerRide - 1; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { dst->vehicles[i] = EntityId::GetNull(); } @@ -1457,12 +1456,12 @@ namespace RCT2 dst->turn_count_default = src->TurnCountDefault; dst->turn_count_banked = src->TurnCountBanked; dst->turn_count_sloped = src->TurnCountSloped; - if (dst->type == RIDE_TYPE_MINI_GOLF) - dst->holes = src->Inversions & 0x1F; + if (src->Type == RIDE_TYPE_MINI_GOLF) + dst->holes = src->Inversions & kRCT12InversionAndHoleMask; else - dst->inversions = src->Inversions & 0x1F; + dst->inversions = src->Inversions & kRCT12InversionAndHoleMask; dst->sheltered_eighths = src->Inversions >> 5; - dst->drops = src->Drops; + dst->dropsPoweredLifts = src->Drops; dst->start_drop_height = src->StartDropHeight; dst->highest_drop_height = src->HighestDropHeight; dst->sheltered_length = src->ShelteredLength; @@ -1472,7 +1471,7 @@ namespace RCT2 dst->cur_num_customers = src->CurNumCustomers; dst->num_customers_timeout = src->NumCustomersTimeout; - for (uint8_t i = 0; i < Limits::CustomerHistorySize; i++) + for (uint8_t i = 0; i < Limits::kCustomerHistorySize; i++) { dst->num_customers[i] = src->NumCustomers[i]; } @@ -1485,7 +1484,7 @@ namespace RCT2 src->ChairliftBullwheelLocation[i].y, src->ChairliftBullwheelZ[i] }; } - dst->ratings = src->Ratings; + dst->ratings = src->ratings; dst->value = ToMoney64(src->Value); dst->chairlift_bullwheel_rotation = src->ChairliftBullwheelRotation; @@ -1536,7 +1535,7 @@ namespace RCT2 dst->inspection_interval = src->InspectionInterval; dst->last_inspection = src->LastInspection; - for (uint8_t i = 0; i < Limits::DowntimeHistorySize; i++) + for (uint8_t i = 0; i < Limits::kDowntimeHistorySize; i++) { dst->downtime_history[i] = src->DowntimeHistory[i]; } @@ -1552,7 +1551,7 @@ namespace RCT2 dst->income_per_hour = ToMoney64(src->IncomePerHour); dst->profit = ToMoney64(src->Profit); - for (uint8_t i = 0; i < Limits::NumColourSchemes; i++) + 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]; @@ -1589,12 +1588,12 @@ namespace RCT2 dst->guests_favourite = src->GuestsFavourite; dst->lifecycle_flags = src->LifecycleFlags; - for (uint8_t i = 0; i < Limits::MaxTrainsPerRide; i++) + for (uint8_t i = 0; i < Limits::kMaxTrainsPerRide; i++) { dst->vehicle_colours[i].Tertiary = src->VehicleColoursExtended[i]; } - dst->total_air_time = src->TotalAirTime; + 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 * COORDS_Z_STEP }; @@ -1616,7 +1615,7 @@ namespace RCT2 dst.ProximityStart = { src.ProximityStartX, src.ProximityStartY, src.ProximityStartZ }; dst.CurrentRide = RCT12RideIdToOpenRCT2RideId(src.CurrentRide); dst.State = src.State; - if (src.CurrentRide < Limits::MaxRidesInPark && _s6.Rides[src.CurrentRide].Type < std::size(RideTypeDescriptors)) + if (src.CurrentRide < Limits::kMaxRidesInPark && _s6.Rides[src.CurrentRide].Type < std::size(RideTypeDescriptors)) dst.ProximityTrackType = RCT2TrackTypeToOpenRCT2( src.ProximityTrackType, _s6.Rides[src.CurrentRide].Type, IsFlatRide(src.CurrentRide)); else @@ -1758,7 +1757,7 @@ namespace RCT2 auto& gameState = GetGameState(); gameState.PeepSpawns.clear(); - for (size_t i = 0; i < Limits::MaxPeepSpawns; i++) + for (size_t i = 0; i < Limits::kMaxPeepSpawns; i++) { if (_s6.PeepSpawns[i].x != RCT12_PEEP_SPAWN_UNDEFINED) { @@ -1793,12 +1792,12 @@ namespace RCT2 { // Build tile pointer cache (needed to get the first element at a certain location) auto tilePointerIndex = TilePointerIndex( - Limits::MaxMapSize, _s6.TileElements, std::size(_s6.TileElements)); + Limits::kMaxMapSize, _s6.TileElements, std::size(_s6.TileElements)); std::vector tileElements; bool nextElementInvisible = false; bool restOfTileInvisible = false; - const auto maxSize = std::min(Limits::MaxMapSize, _s6.MapSize); + const auto maxSize = std::min(Limits::kMaxMapSize, _s6.MapSize); for (TileCoordsXY coords = { 0, 0 }; coords.y < kMaximumMapSizeTechnical; coords.y++) { for (coords.x = 0; coords.x < kMaximumMapSizeTechnical; coords.x++) @@ -2165,7 +2164,7 @@ namespace RCT2 { campaign.ShopItemType = ShopItem(_s6.CampaignRideIndex[i]); } - gMarketingCampaigns.push_back(campaign); + GetGameState().MarketingCampaigns.push_back(campaign); } } } @@ -2218,7 +2217,7 @@ namespace RCT2 uint16_t GetMaxEntities() { - return (_s6.Header.ClassicFlag == 0xf) ? Limits::MaxEntitiesRCTCExtended : Limits::MaxEntities; + return (_s6.Header.ClassicFlag == 0xf) ? Limits::kMaxEntitiesRCTCExtended : Limits::kMaxEntities; } template void ImportEntity(const RCT12EntityBase& src); @@ -2377,7 +2376,7 @@ namespace RCT2 { const auto originalString = _s6.CustomStrings[stringId % 1024]; auto originalStringView = std::string_view( - originalString, RCT12::GetRCTStringBufferLen(originalString, USER_STRING_MAX_LENGTH)); + originalString, RCT12::GetRCTStringBufferLen(originalString, kUserStringMaxLength)); auto asUtf8 = RCT2StringToUTF8(originalStringView, RCT2LanguageId::EnglishUK); auto justText = RCT12RemoveFormattingUTF8(asUtf8); return justText.data(); diff --git a/src/openrct2/rct2/T6Exporter.cpp b/src/openrct2/rct2/T6Exporter.cpp index 22aad186ff..cd805d373a 100644 --- a/src/openrct2/rct2/T6Exporter.cpp +++ b/src/openrct2/rct2/T6Exporter.cpp @@ -30,7 +30,7 @@ namespace RCT2 { - T6Exporter::T6Exporter(TrackDesign* trackDesign) + T6Exporter::T6Exporter(const TrackDesign& trackDesign) : _trackDesign(trackDesign) { } @@ -51,78 +51,95 @@ namespace RCT2 bool T6Exporter::SaveTrack(OpenRCT2::IStream* stream) { + auto td6rideType = OpenRCT2RideTypeToRCT2RideType(_trackDesign.trackAndVehicle.rtdIndex); OpenRCT2::MemoryStream tempStream; - tempStream.WriteValue(OpenRCT2RideTypeToRCT2RideType(_trackDesign->type)); - tempStream.WriteValue(_trackDesign->vehicle_type); - tempStream.WriteValue(_trackDesign->flags); - tempStream.WriteValue(static_cast(_trackDesign->ride_mode)); - tempStream.WriteValue((_trackDesign->colour_scheme & 0x3) | (2 << 2)); - for (auto i = 0; i < RCT2::Limits::MaxVehicleColours; i++) + tempStream.WriteValue(td6rideType); + tempStream.WriteValue(0); + tempStream.WriteValue(0); + tempStream.WriteValue(static_cast(_trackDesign.operation.rideMode)); + tempStream.WriteValue(EnumValue(_trackDesign.appearance.vehicleColourSettings) | (2 << 2)); + for (auto i = 0; i < RCT2::Limits::kMaxVehicleColours; i++) { - tempStream.WriteValue(_trackDesign->vehicle_colours[i].Body); - tempStream.WriteValue(_trackDesign->vehicle_colours[i].Trim); + tempStream.WriteValue(_trackDesign.appearance.vehicleColours[i].Body); + tempStream.WriteValue(_trackDesign.appearance.vehicleColours[i].Trim); } tempStream.WriteValue(0); - auto entranceStyle = GetStationStyleFromIdentifier(_trackDesign->StationObjectIdentifier); + auto entranceStyle = GetStationStyleFromIdentifier(_trackDesign.appearance.stationObjectIdentifier); tempStream.WriteValue(entranceStyle); - tempStream.WriteValue(_trackDesign->total_air_time); - tempStream.WriteValue(_trackDesign->depart_flags); - tempStream.WriteValue(_trackDesign->number_of_trains); - tempStream.WriteValue(_trackDesign->number_of_cars_per_train); - tempStream.WriteValue(_trackDesign->min_waiting_time); - tempStream.WriteValue(_trackDesign->max_waiting_time); - tempStream.WriteValue(_trackDesign->operation_setting); - tempStream.WriteValue(_trackDesign->max_speed); - tempStream.WriteValue(_trackDesign->average_speed); - tempStream.WriteValue(_trackDesign->ride_length); - tempStream.WriteValue(_trackDesign->max_positive_vertical_g); - tempStream.WriteValue(_trackDesign->max_negative_vertical_g); - tempStream.WriteValue(_trackDesign->max_lateral_g); - tempStream.WriteValue( - _trackDesign->type == RIDE_TYPE_MINI_GOLF ? _trackDesign->holes : _trackDesign->inversions); - tempStream.WriteValue(_trackDesign->drops); - tempStream.WriteValue(_trackDesign->highest_drop_height); - tempStream.WriteValue(_trackDesign->excitement); - tempStream.WriteValue(_trackDesign->intensity); - tempStream.WriteValue(_trackDesign->nausea); - tempStream.WriteValue(ToMoney16(_trackDesign->upkeep_cost)); - tempStream.WriteArray(_trackDesign->track_spine_colour, Limits::NumColourSchemes); - tempStream.WriteArray(_trackDesign->track_rail_colour, Limits::NumColourSchemes); - tempStream.WriteArray(_trackDesign->track_support_colour, Limits::NumColourSchemes); - tempStream.WriteValue(_trackDesign->flags2); - tempStream.Write(&_trackDesign->vehicle_object.Entry, sizeof(RCTObjectEntry)); - tempStream.WriteValue(_trackDesign->space_required_x); - tempStream.WriteValue(_trackDesign->space_required_y); - for (auto i = 0; i < RCT2::Limits::MaxVehicleColours; i++) - { - tempStream.WriteValue(_trackDesign->vehicle_colours[i].Tertiary); - } - tempStream.WriteValue(_trackDesign->lift_hill_speed | (_trackDesign->num_circuits << 5)); + uint16_t _totalAirTime = std::max(255, (_trackDesign.statistics.totalAirTime * 123) / 1024); + tempStream.WriteValue(_totalAirTime); + tempStream.WriteValue(_trackDesign.operation.departFlags); + tempStream.WriteValue(_trackDesign.trackAndVehicle.numberOfTrains); + tempStream.WriteValue(_trackDesign.trackAndVehicle.numberOfCarsPerTrain); + tempStream.WriteValue(_trackDesign.operation.minWaitingTime); + tempStream.WriteValue(_trackDesign.operation.maxWaitingTime); + tempStream.WriteValue(_trackDesign.operation.operationSetting); + tempStream.WriteValue(_trackDesign.statistics.maxSpeed); + tempStream.WriteValue(_trackDesign.statistics.averageSpeed); + tempStream.WriteValue(_trackDesign.statistics.rideLength); + tempStream.WriteValue(_trackDesign.statistics.maxPositiveVerticalG / kTD46GForcesMultiplier); + tempStream.WriteValue(_trackDesign.statistics.maxNegativeVerticalG / kTD46GForcesMultiplier); + tempStream.WriteValue(_trackDesign.statistics.maxLateralG / kTD46GForcesMultiplier); - const auto& rtd = GetRideTypeDescriptor(_trackDesign->type); + if (td6rideType == RIDE_TYPE_MINI_GOLF) + tempStream.WriteValue(_trackDesign.statistics.holes & kRCT12InversionAndHoleMask); + else + tempStream.WriteValue(_trackDesign.statistics.inversions & kRCT12InversionAndHoleMask); + + tempStream.WriteValue(_trackDesign.statistics.drops & kRCT12RideNumDropsMask); + tempStream.WriteValue(_trackDesign.statistics.highestDropHeight); + tempStream.WriteValue(_trackDesign.statistics.ratings.excitement / kTD46RatingsMultiplier); + tempStream.WriteValue(_trackDesign.statistics.ratings.intensity / kTD46RatingsMultiplier); + tempStream.WriteValue(_trackDesign.statistics.ratings.nausea / kTD46RatingsMultiplier); + tempStream.WriteValue(ToMoney16(_trackDesign.statistics.upkeepCost)); + for (auto i = 0; i < Limits::kNumColourSchemes; i++) + { + tempStream.WriteValue(_trackDesign.appearance.trackColours[i].main); + } + for (auto i = 0; i < Limits::kNumColourSchemes; i++) + { + tempStream.WriteValue(_trackDesign.appearance.trackColours[i].additional); + } + for (auto i = 0; i < Limits::kNumColourSchemes; i++) + { + tempStream.WriteValue(_trackDesign.appearance.trackColours[i].supports); + } + tempStream.WriteValue(0); + tempStream.Write(&_trackDesign.trackAndVehicle.vehicleObject.Entry, sizeof(RCTObjectEntry)); + tempStream.WriteValue(_trackDesign.statistics.spaceRequired.x); + tempStream.WriteValue(_trackDesign.statistics.spaceRequired.y); + for (auto i = 0; i < RCT2::Limits::kMaxVehicleColours; i++) + { + tempStream.WriteValue(_trackDesign.appearance.vehicleColours[i].Tertiary); + } + tempStream.WriteValue(_trackDesign.operation.liftHillSpeed | (_trackDesign.operation.numCircuits << 5)); + + const auto& rtd = GetRideTypeDescriptor(_trackDesign.trackAndVehicle.rtdIndex); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - for (const auto& mazeElement : _trackDesign->maze_elements) + for (const auto& mazeElement : _trackDesign.mazeElements) { - tempStream.WriteValue(mazeElement.all); + tempStream.WriteValue(mazeElement.location.x); + tempStream.WriteValue(mazeElement.location.y); + tempStream.WriteValue(mazeElement.mazeEntry); } - for (const auto& entranceElement : _trackDesign->entrance_elements) + for (const auto& entranceElement : _trackDesign.entranceElements) { - tempStream.WriteValue(entranceElement.Location.x); - tempStream.WriteValue(entranceElement.Location.y); - tempStream.WriteValue(entranceElement.Location.direction); + tempStream.WriteValue(entranceElement.location.x); + tempStream.WriteValue(entranceElement.location.y); + tempStream.WriteValue(entranceElement.location.direction); tempStream.WriteValue( - EnumValue(entranceElement.IsExit ? TD46MazeElementType::Exit : TD46MazeElementType::Entrance)); + EnumValue(entranceElement.isExit ? TD46MazeElementType::Exit : TD46MazeElementType::Entrance)); } tempStream.WriteValue(0); } else { - for (const auto& trackElement : _trackDesign->track_elements) + for (const auto& trackElement : _trackDesign.trackElements) { - auto trackType = OpenRCT2TrackTypeToRCT2(trackElement.Type); + auto trackType = OpenRCT2TrackTypeToRCT2(trackElement.type); if (trackType == TrackElemType::MultiDimInvertedUp90ToFlatQuarterLoop) { trackType = TrackElemType::InvertedUp90ToFlatQuarterLoopAlias; @@ -134,12 +151,12 @@ namespace RCT2 tempStream.WriteValue(0xFF); - for (const auto& entranceElement : _trackDesign->entrance_elements) + for (const auto& entranceElement : _trackDesign.entranceElements) { tempStream.WriteValue( - entranceElement.Location.z == -1 ? static_cast(0x80) : entranceElement.Location.z); - tempStream.WriteValue(entranceElement.Location.direction | (entranceElement.IsExit << 7)); - auto xy = entranceElement.Location.ToCoordsXY(); + entranceElement.location.z == -1 ? static_cast(0x80) : entranceElement.location.z); + tempStream.WriteValue(entranceElement.location.direction | (entranceElement.isExit << 7)); + auto xy = entranceElement.location.ToCoordsXY(); tempStream.WriteValue(xy.x); tempStream.WriteValue(xy.y); } @@ -147,15 +164,23 @@ namespace RCT2 tempStream.WriteValue(0xFF); } - for (const auto& sceneryElement : _trackDesign->scenery_elements) + for (const auto& sceneryElement : _trackDesign.sceneryElements) { - tempStream.Write(&sceneryElement.scenery_object.Entry, sizeof(RCTObjectEntry)); - tempStream.WriteValue(sceneryElement.loc.x / COORDS_XY_STEP); - tempStream.WriteValue(sceneryElement.loc.y / COORDS_XY_STEP); - tempStream.WriteValue(sceneryElement.loc.z / COORDS_Z_STEP); - tempStream.WriteValue(sceneryElement.flags); - tempStream.WriteValue(sceneryElement.primary_colour); - tempStream.WriteValue(sceneryElement.secondary_colour); + auto flags = sceneryElement.flags; + if (sceneryElement.sceneryObject.Entry.GetType() == ObjectType::Walls) + { + flags &= ~0xFC; + flags |= (sceneryElement.tertiaryColour << 2); + } + + tempStream.Write(&sceneryElement.sceneryObject.Entry, sizeof(RCTObjectEntry)); + auto tileCoords = TileCoordsXYZ(sceneryElement.loc); + tempStream.WriteValue(tileCoords.x); + tempStream.WriteValue(tileCoords.y); + tempStream.WriteValue(tileCoords.z); + tempStream.WriteValue(flags); + tempStream.WriteValue(sceneryElement.primaryColour); + tempStream.WriteValue(sceneryElement.secondaryColour); } tempStream.WriteValue(0xFF); diff --git a/src/openrct2/rct2/T6Exporter.h b/src/openrct2/rct2/T6Exporter.h index d337fb729a..200f4a43d9 100644 --- a/src/openrct2/rct2/T6Exporter.h +++ b/src/openrct2/rct2/T6Exporter.h @@ -27,12 +27,12 @@ namespace RCT2 class T6Exporter final { public: - T6Exporter(TrackDesign* trackDesign); + T6Exporter(const TrackDesign& trackDesign); bool SaveTrack(const utf8* path); bool SaveTrack(OpenRCT2::IStream* stream); private: - TrackDesign* _trackDesign; + const TrackDesign& _trackDesign; }; } // namespace RCT2 diff --git a/src/openrct2/rct2/T6Importer.cpp b/src/openrct2/rct2/T6Importer.cpp index 9483eaea04..35acea9233 100644 --- a/src/openrct2/rct2/T6Importer.cpp +++ b/src/openrct2/rct2/T6Importer.cpp @@ -8,7 +8,6 @@ *****************************************************************************/ #include "../TrackImporter.h" -#include "../config/Config.h" #include "../core/FileStream.h" #include "../core/MemoryStream.h" #include "../core/Path.hpp" @@ -72,62 +71,52 @@ namespace RCT2 // Rework td6 so that it is just the fields _stream.Read(&td6, 0xA3); - td->type = td6.Type; // 0x00 - td->vehicle_type = td6.VehicleType; + td->trackAndVehicle.rtdIndex = td6.Type; // 0x00 - td->cost = 0.00_GBP; - td->flags = td6.Flags; - td->ride_mode = static_cast(td6.RideMode); - td->track_flags = 0; - td->colour_scheme = td6.VersionAndColourScheme & 0x3; - for (auto i = 0; i < Limits::MaxVehicleColours; ++i) + td->operation.rideMode = static_cast(td6.RideMode); + td->appearance.vehicleColourSettings = static_cast(td6.VersionAndColourScheme & 0x3); + for (auto i = 0; i < Limits::kMaxVehicleColours; ++i) { - td->vehicle_colours[i].Body = td6.VehicleColours[i].BodyColour; - td->vehicle_colours[i].Trim = td6.VehicleColours[i].TrimColour; - td->vehicle_colours[i].Tertiary = td6.VehicleAdditionalColour[i]; + td->appearance.vehicleColours[i].Body = td6.VehicleColours[i].BodyColour; + td->appearance.vehicleColours[i].Trim = td6.VehicleColours[i].TrimColour; + td->appearance.vehicleColours[i].Tertiary = td6.VehicleAdditionalColour[i]; } - td->StationObjectIdentifier = GetStationIdentifierFromStyle(td6.EntranceStyle); - td->total_air_time = td6.TotalAirTime; - td->depart_flags = td6.DepartFlags; - td->number_of_trains = td6.NumberOfTrains; - td->number_of_cars_per_train = td6.NumberOfCarsPerTrain; - td->min_waiting_time = td6.MinWaitingTime; - td->max_waiting_time = td6.MaxWaitingTime; - td->operation_setting = td6.OperationSetting; - td->max_speed = td6.MaxSpeed; - td->average_speed = td6.AverageSpeed; - td->ride_length = td6.RideLength; - td->max_positive_vertical_g = td6.MaxPositiveVerticalG; - td->max_negative_vertical_g = td6.MaxNegativeVerticalG; - td->max_lateral_g = td6.MaxLateralG; + td->appearance.stationObjectIdentifier = GetStationIdentifierFromStyle(td6.EntranceStyle); + td->statistics.totalAirTime = (td6.TotalAirTime * 1024) / 123; + td->operation.departFlags = td6.DepartFlags; + td->trackAndVehicle.numberOfTrains = td6.NumberOfTrains; + td->trackAndVehicle.numberOfCarsPerTrain = td6.NumberOfCarsPerTrain; + td->operation.minWaitingTime = td6.MinWaitingTime; + td->operation.maxWaitingTime = td6.MaxWaitingTime; + td->operation.operationSetting = td6.OperationSetting; + td->statistics.maxSpeed = td6.MaxSpeed; + td->statistics.averageSpeed = td6.AverageSpeed; + td->statistics.rideLength = td6.RideLength; + td->statistics.maxPositiveVerticalG = td6.MaxPositiveVerticalG * kTD46GForcesMultiplier; + td->statistics.maxNegativeVerticalG = td6.MaxNegativeVerticalG * kTD46GForcesMultiplier; + td->statistics.maxLateralG = td6.MaxLateralG * kTD46GForcesMultiplier; - if (td->type == RIDE_TYPE_MINI_GOLF) - { - td->holes = td6.Holes; - } + if (td6.Type == RIDE_TYPE_MINI_GOLF) + td->statistics.holes = td6.Holes & kRCT12InversionAndHoleMask; else - { - td->inversions = td6.Inversions; - } + td->statistics.inversions = td6.Inversions & kRCT12InversionAndHoleMask; - td->drops = td6.Drops; - td->highest_drop_height = td6.HighestDropHeight; - td->excitement = td6.Excitement; - td->intensity = td6.Intensity; - td->nausea = td6.Nausea; - td->upkeep_cost = ToMoney64(td6.UpkeepCost); - for (auto i = 0; i < Limits::NumColourSchemes; ++i) + td->statistics.drops = td6.Drops & kRCT12RideNumDropsMask; + td->statistics.highestDropHeight = td6.HighestDropHeight; + td->statistics.ratings.excitement = td6.Excitement * kTD46RatingsMultiplier; + td->statistics.ratings.intensity = td6.Intensity * kTD46RatingsMultiplier; + td->statistics.ratings.nausea = td6.Nausea * kTD46RatingsMultiplier; + td->statistics.upkeepCost = ToMoney64(td6.UpkeepCost); + for (auto i = 0; i < Limits::kNumColourSchemes; ++i) { - td->track_spine_colour[i] = td6.TrackSpineColour[i]; - td->track_rail_colour[i] = td6.TrackRailColour[i]; - td->track_support_colour[i] = td6.TrackSupportColour[i]; + td->appearance.trackColours[i].main = td6.TrackSpineColour[i]; + td->appearance.trackColours[i].additional = td6.TrackRailColour[i]; + td->appearance.trackColours[i].supports = td6.TrackSupportColour[i]; } - td->flags2 = td6.Flags2; - td->vehicle_object = ObjectEntryDescriptor(td6.VehicleObject); - td->space_required_x = td6.SpaceRequiredX; - td->space_required_y = td6.SpaceRequiredY; - td->lift_hill_speed = td6.LiftHillSpeedNumCircuits & 0b00011111; - td->num_circuits = td6.LiftHillSpeedNumCircuits >> 5; + td->trackAndVehicle.vehicleObject = ObjectEntryDescriptor(td6.VehicleObject); + td->statistics.spaceRequired = { td6.SpaceRequiredX, td6.SpaceRequiredY }; + td->operation.liftHillSpeed = td6.LiftHillSpeedNumCircuits & 0b00011111; + td->operation.numCircuits = td6.LiftHillSpeedNumCircuits >> 5; auto version = static_cast((td6.VersionAndColourScheme >> 2) & 3); if (version != RCT12TrackDesignVersion::TD6) @@ -136,9 +125,10 @@ namespace RCT2 return nullptr; } - td->operation_setting = std::min(td->operation_setting, GetRideTypeDescriptor(td->type).OperatingSettings.MaxValue); + td->operation.operationSetting = std::min( + td->operation.operationSetting, GetRideTypeDescriptor(td->trackAndVehicle.rtdIndex).OperatingSettings.MaxValue); - const auto& rtd = GetRideTypeDescriptor(td->type); + const auto& rtd = GetRideTypeDescriptor(td->trackAndVehicle.rtdIndex); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { TD46MazeElement t6MazeElement{}; @@ -161,15 +151,15 @@ namespace RCT2 _stream.Read(&t6TrackElement, sizeof(TD46TrackElement)); TrackDesignTrackElement trackElement{}; - track_type_t trackType = RCT2TrackTypeToOpenRCT2(t6TrackElement.Type, td->type, true); + track_type_t trackType = RCT2TrackTypeToOpenRCT2(t6TrackElement.Type, td->trackAndVehicle.rtdIndex, true); if (trackType == TrackElemType::InvertedUp90ToFlatQuarterLoopAlias) { trackType = TrackElemType::MultiDimInvertedUp90ToFlatQuarterLoop; } - trackElement.Type = trackType; + trackElement.type = trackType; ConvertFromTD46Flags(trackElement, t6TrackElement.Flags); - td->track_elements.push_back(trackElement); + td->trackElements.push_back(trackElement); } TD6EntranceElement t6EntranceElement{}; @@ -180,9 +170,9 @@ namespace RCT2 TrackDesignEntranceElement entranceElement{}; auto xy = CoordsXY(t6EntranceElement.x, t6EntranceElement.y); auto z = (t6EntranceElement.z == -128) ? -1 : t6EntranceElement.z; - entranceElement.Location = TileCoordsXYZD(TileCoordsXY(xy), z, t6EntranceElement.GetDirection()); - entranceElement.IsExit = t6EntranceElement.IsExit(); - td->entrance_elements.push_back(entranceElement); + entranceElement.location = TileCoordsXYZD(TileCoordsXY(xy), z, t6EntranceElement.GetDirection()); + entranceElement.isExit = t6EntranceElement.IsExit(); + td->entranceElements.push_back(entranceElement); } } @@ -192,17 +182,19 @@ namespace RCT2 TD6SceneryElement t6SceneryElement{}; _stream.Read(&t6SceneryElement, sizeof(TD6SceneryElement)); TrackDesignSceneryElement sceneryElement{}; - sceneryElement.scenery_object = ObjectEntryDescriptor(t6SceneryElement.SceneryObject); - sceneryElement.loc.x = t6SceneryElement.x * COORDS_XY_STEP; - sceneryElement.loc.y = t6SceneryElement.y * COORDS_XY_STEP; - sceneryElement.loc.z = t6SceneryElement.z * COORDS_Z_STEP; + sceneryElement.sceneryObject = ObjectEntryDescriptor(t6SceneryElement.SceneryObject); + TileCoordsXYZ tileCoords = { t6SceneryElement.x, t6SceneryElement.y, t6SceneryElement.z }; + sceneryElement.loc = tileCoords.ToCoordsXYZ(); sceneryElement.flags = t6SceneryElement.Flags; - sceneryElement.primary_colour = t6SceneryElement.PrimaryColour; - sceneryElement.secondary_colour = t6SceneryElement.SecondaryColour; - td->scenery_elements.push_back(std::move(sceneryElement)); + sceneryElement.primaryColour = t6SceneryElement.PrimaryColour; + sceneryElement.secondaryColour = t6SceneryElement.SecondaryColour; + if (t6SceneryElement.SceneryObject.GetType() == ObjectType::Walls) + sceneryElement.tertiaryColour = t6SceneryElement.getTertiaryWallColour(); + + td->sceneryElements.push_back(std::move(sceneryElement)); } - td->name = _name; + td->gameStateData.name = _name; UpdateRideType(td); @@ -211,17 +203,17 @@ namespace RCT2 void UpdateRideType(std::unique_ptr& td) { - if (RCT2RideTypeNeedsConversion(td->type)) + if (RCT2RideTypeNeedsConversion(td->trackAndVehicle.rtdIndex)) { std::scoped_lock lock(_objectLookupMutex); - auto rawObject = ObjectRepositoryLoadObject(&td->vehicle_object.Entry); + auto rawObject = ObjectRepositoryLoadObject(&td->trackAndVehicle.vehicleObject.Entry); if (rawObject != nullptr) { const auto* rideEntry = static_cast( static_cast(rawObject.get())->GetLegacyData()); if (rideEntry != nullptr) { - td->type = RCT2RideTypeToOpenRCT2RideType(td->type, *rideEntry); + td->trackAndVehicle.rtdIndex = RCT2RideTypeToOpenRCT2RideType(td->trackAndVehicle.rtdIndex, *rideEntry); } rawObject->Unload(); } diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index 50868a82ea..6063a03225 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -448,7 +448,7 @@ int32_t Vehicle::CableLiftUpdateTrackMotion() vehicleCount++; massTotal += vehicle->mass; - accelerationTotal = AddClamp_int32_t(accelerationTotal, vehicle->acceleration); + accelerationTotal = AddClamp(accelerationTotal, vehicle->acceleration); } int32_t newAcceleration = (accelerationTotal / vehicleCount) >> 9; diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 72bb089536..0596b8894d 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -364,7 +364,7 @@ void Ride::UpdateQueueLength(StationIndex stationIndex) void Ride::QueueInsertGuestAtFront(StationIndex stationIndex, Guest* peep) { - assert(stationIndex.ToUnderlying() < OpenRCT2::Limits::MaxStationsPerRide); + assert(stationIndex.ToUnderlying() < OpenRCT2::Limits::kMaxStationsPerRide); assert(peep != nullptr); peep->GuestNextInQueue = EntityId::GetNull(); @@ -1065,12 +1065,12 @@ const RideStation& Ride::GetStation(StationIndex stationIndex) const return stations[stationIndex.ToUnderlying()]; } -std::array& Ride::GetStations() +std::array& Ride::GetStations() { return stations; } -const std::array& Ride::GetStations() const +const std::array& Ride::GetStations() const { return stations; } @@ -1096,7 +1096,7 @@ void Ride::Update() // Update stations const auto& rtd = GetRideTypeDescriptor(); if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) - for (StationIndex::UnderlyingType i = 0; i < OpenRCT2::Limits::MaxStationsPerRide; i++) + for (StationIndex::UnderlyingType i = 0; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) RideUpdateStation(*this, StationIndex::FromUnderlying(i)); // Update financial statistics @@ -1108,7 +1108,7 @@ void Ride::Update() num_customers_timeout = 0; // Shift number of customers history, start of the array is the most recent one - for (int32_t i = OpenRCT2::Limits::CustomerHistorySize - 1; i > 0; i--) + for (int32_t i = OpenRCT2::Limits::kCustomerHistorySize - 1; i > 0; i--) { num_customers[i] = num_customers[i - 1]; } @@ -1281,7 +1281,7 @@ void UpdateSpiralSlide(Ride& ride) const uint8_t current_rotation = GetCurrentRotation(); // Invalidate something related to station start - for (int32_t i = 0; i < OpenRCT2::Limits::MaxStationsPerRide; i++) + for (int32_t i = 0; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { if (ride.stations[i].Start.IsNull()) continue; @@ -1399,14 +1399,14 @@ static void RideBreakdownUpdate(Ride& ride) { int32_t totalDowntime = 0; - for (int32_t i = 0; i < OpenRCT2::Limits::DowntimeHistorySize; i++) + for (int32_t i = 0; i < OpenRCT2::Limits::kDowntimeHistorySize; i++) { totalDowntime += ride.downtime_history[i]; } ride.downtime = std::min(totalDowntime / 2, 100); - for (int32_t i = OpenRCT2::Limits::DowntimeHistorySize - 1; i > 0; i--) + for (int32_t i = OpenRCT2::Limits::kDowntimeHistorySize - 1; i > 0; i--) { ride.downtime_history[i] = ride.downtime_history[i - 1]; } @@ -1618,7 +1618,7 @@ void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason) */ void RideBreakdownAddNewsItem(const Ride& ride) { - if (gConfigNotifications.RideBrokenDown) + if (Config::Get().notifications.RideBrokenDown) { Formatter ft; ride.FormatNameTo(ft); @@ -1645,7 +1645,7 @@ static void RideBreakdownStatusUpdate(Ride& ride) if (!(ride.not_fixed_timeout & 15) && ride.mechanic_status != RIDE_MECHANIC_STATUS_FIXING && ride.mechanic_status != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { - if (gConfigNotifications.RideWarnings) + if (Config::Get().notifications.RideWarnings) { Formatter ft; ride.FormatNameTo(ft); @@ -2255,12 +2255,12 @@ void RideSetVehicleColoursToRandomPreset(Ride& ride, uint8_t preset_index) { assert(preset_index < presetList->count); - ride.colour_scheme_type = RIDE_COLOUR_SCHEME_MODE_ALL_SAME; + ride.vehicleColourSettings = VehicleColourSettings::same; ride.vehicle_colours[0] = presetList->list[preset_index]; } else { - ride.colour_scheme_type = RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN; + ride.vehicleColourSettings = VehicleColourSettings::perTrain; for (uint32_t i = 0; i < presetList->count; i++) { const auto index = i % 32U; @@ -2326,7 +2326,7 @@ static void RideEntranceExitConnected(Ride& ride) // name of ride is parameter of the format string Formatter ft; ride.FormatNameTo(ft); - if (gConfigNotifications.RideWarnings) + if (Config::Get().notifications.RideWarnings) { News::AddItemToQueue(News::ItemType::Ride, STR_ENTRANCE_NOT_CONNECTED, ride.id.ToUnderlying(), ft); } @@ -2338,7 +2338,7 @@ static void RideEntranceExitConnected(Ride& ride) // name of ride is parameter of the format string Formatter ft; ride.FormatNameTo(ft); - if (gConfigNotifications.RideWarnings) + if (Config::Get().notifications.RideWarnings) { News::AddItemToQueue(News::ItemType::Ride, STR_EXIT_NOT_CONNECTED, ride.id.ToUnderlying(), ft); } @@ -2403,7 +2403,7 @@ static void RideShopConnected(const Ride& ride) } // Name of ride is parameter of the format string - if (gConfigNotifications.RideWarnings) + if (Config::Get().notifications.RideWarnings) { Formatter ft; ride2->FormatNameTo(ft); @@ -3017,7 +3017,7 @@ static void RideSetBoatHireReturnPoint(Ride& ride, const CoordsXYE& startElement static void RideSetMazeEntranceExitPoints(Ride& ride) { // Needs room for an entrance and an exit per station, plus one position for the list terminator. - TileCoordsXYZD positions[(OpenRCT2::Limits::MaxStationsPerRide * 2) + 1]; + TileCoordsXYZD positions[(OpenRCT2::Limits::kMaxStationsPerRide * 2) + 1]; // Create a list of all the entrance and exit positions TileCoordsXYZD* position = positions; @@ -3494,7 +3494,7 @@ static bool VehicleCreateTrains(Ride& ride, const CoordsXYZ& trainsPos, TrackEle } lastTrain = train; - for (int32_t i = 0; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) + for (int32_t i = 0; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { if (ride.vehicles[i].IsNull()) { @@ -3634,7 +3634,7 @@ ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying // Initialise station departs // 006DDDD0: lifecycle_flags |= RIDE_LIFECYCLE_ON_TRACK; - for (int32_t i = 0; i < OpenRCT2::Limits::MaxStationsPerRide; i++) + for (int32_t i = 0; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { stations[i].Depart = (stations[i].Depart & kStationDepartFlag) | 1; } @@ -4318,13 +4318,13 @@ void Ride::SetColourPreset(uint8_t index) { colours = colourPresets->list[index]; } - for (int32_t i = 0; i < OpenRCT2::Limits::NumColourSchemes; i++) + for (size_t i = 0; i < std::size(track_colour); i++) { track_colour[i].main = colours.main; track_colour[i].additional = colours.additional; track_colour[i].supports = colours.supports; } - colour_scheme_type = 0; + vehicleColourSettings = VehicleColourSettings::same; } money64 RideGetCommonPrice(const Ride& forRide) @@ -4638,7 +4638,7 @@ bool RideHasAnyTrackElements(const Ride& ride) void InvalidateTestResults(Ride& ride) { ride.measurement = {}; - ride.excitement = kRideRatingUndefined; + 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) @@ -4698,7 +4698,7 @@ void RideUpdateVehicleColours(const Ride& ride) GfxInvalidateScreen(); } - for (int32_t i = 0; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) + for (int32_t i = 0; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { int32_t carIndex = 0; VehicleColour colours = {}; @@ -4706,23 +4706,23 @@ void RideUpdateVehicleColours(const Ride& ride) for (Vehicle* vehicle = GetEntity(ride.vehicles[i]); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { - switch (ride.colour_scheme_type & 3) + switch (ride.vehicleColourSettings) { - case RIDE_COLOUR_SCHEME_MODE_ALL_SAME: + case VehicleColourSettings::same: colours = ride.vehicle_colours[0]; break; - case RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN: + case VehicleColourSettings::perTrain: colours = ride.vehicle_colours[i]; break; - case RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_CAR: + case VehicleColourSettings::perCar: if (vehicle->HasFlag(VehicleFlags::CarIsReversed)) { colours = ride.vehicle_colours[std::min( - (ride.num_cars_per_train - 1) - carIndex, OpenRCT2::Limits::MaxCarsPerTrain - 1)]; + (ride.num_cars_per_train - 1) - carIndex, OpenRCT2::Limits::kMaxCarsPerTrain - 1)]; } else { - colours = ride.vehicle_colours[std::min(carIndex, OpenRCT2::Limits::MaxCarsPerTrain - 1)]; + colours = ride.vehicle_colours[std::min(carIndex, OpenRCT2::Limits::kMaxCarsPerTrain - 1)]; } break; } @@ -5093,7 +5093,7 @@ void Ride::UpdateMaxVehicles() { case RideMode::ContinuousCircuitBlockSectioned: case RideMode::PoweredLaunchBlockSectioned: - maxNumTrains = std::clamp(num_stations + num_block_brakes - 1, 1, OpenRCT2::Limits::MaxTrainsPerRide); + maxNumTrains = std::clamp(num_stations + num_block_brakes - 1, 1, OpenRCT2::Limits::kMaxTrainsPerRide); break; case RideMode::ReverseInclineLaunchedShuttle: case RideMode::PoweredLaunchPasstrough: @@ -5125,7 +5125,7 @@ void Ride::UpdateMaxVehicles() if ((mode != RideMode::StationToStation && mode != RideMode::ContinuousCircuit) || !(rtd.HasFlag(RIDE_TYPE_FLAG_ALLOW_MORE_VEHICLES_THAN_STATION_FITS))) { - maxNumTrains = std::min(maxNumTrains, int32_t(OpenRCT2::Limits::MaxTrainsPerRide)); + maxNumTrains = std::min(maxNumTrains, int32_t(OpenRCT2::Limits::kMaxTrainsPerRide)); } else { @@ -5154,7 +5154,7 @@ void Ride::UpdateMaxVehicles() { maxNumTrains++; length += totalSpacing; - } while (maxNumTrains < OpenRCT2::Limits::MaxTrainsPerRide && length < trackLength); + } while (maxNumTrains < OpenRCT2::Limits::kMaxTrainsPerRide && length < trackLength); } break; } @@ -5173,7 +5173,7 @@ void Ride::UpdateMaxVehicles() if (GetGameState().Cheats.DisableTrainLengthLimit) { - maxNumTrains = OpenRCT2::Limits::MaxTrainsPerRide; + maxNumTrains = OpenRCT2::Limits::kMaxTrainsPerRide; } numTrains = std::min(ProposedNumTrains, static_cast(maxNumTrains)); @@ -5221,7 +5221,7 @@ void Ride::SetReversedTrains(bool reverseTrains) void Ride::SetToDefaultInspectionInterval() { - uint8_t defaultInspectionInterval = gConfigGeneral.DefaultInspectionInterval; + uint8_t defaultInspectionInterval = Config::Get().general.DefaultInspectionInterval; if (inspection_interval != defaultInspectionInterval) { if (defaultInspectionInterval <= RIDE_INSPECTION_NEVER) @@ -5253,7 +5253,7 @@ void Ride::Crash(uint8_t vehicleIndex) } } - if (gConfigNotifications.RideCrashed) + if (Config::Get().notifications.RideCrashed) { Formatter ft; FormatNameTo(ft); @@ -5272,7 +5272,7 @@ uint32_t RideCustomersInLast5Minutes(const Ride& ride) { uint32_t sum = 0; - for (int32_t i = 0; i < OpenRCT2::Limits::CustomerHistorySize; i++) + for (int32_t i = 0; i < OpenRCT2::Limits::kCustomerHistorySize; i++) { sum += ride.num_customers[i]; } @@ -5439,24 +5439,13 @@ bool RideHasStationShelter(const Ride& ride) bool RideHasRatings(const Ride& ride) { - return ride.excitement != kRideRatingUndefined; + return !ride.ratings.isNull(); } int32_t GetBoosterSpeed(ride_type_t rideType, int32_t rawSpeed) { - int8_t shiftFactor = GetRideTypeDescriptor(rideType).OperatingSettings.BoosterSpeedFactor; - if (shiftFactor == 0) - { - return rawSpeed; - } - if (shiftFactor > 0) - { - return (rawSpeed << shiftFactor); - } - - // Workaround for an issue with older compilers (GCC 6, Clang 4) which would fail the build - int8_t shiftFactorAbs = std::abs(shiftFactor); - return (rawSpeed >> shiftFactorAbs); + // BoosterSpeedFactor has valid values of 1, 2, 4 representing a 1/2, 1, and 2 multiplier. + return rawSpeed * GetRideTypeDescriptor(rideType).LegacyBoosterSettings.BoosterSpeedFactor / 2; } void FixInvalidVehicleSpriteSizes() @@ -5997,3 +5986,25 @@ ResultWithMessage Ride::ChangeStatusCreateVehicles(bool isApplying, const Coords return { true }; } + +uint8_t Ride::getNumDrops() const +{ + return dropsPoweredLifts & kRideNumDropsMask; +} + +void Ride::setNumDrops(uint8_t newValue) +{ + dropsPoweredLifts &= ~kRideNumDropsMask; + dropsPoweredLifts |= (newValue & kRideNumDropsMask); +} + +uint8_t Ride::getNumPoweredLifts() const +{ + return dropsPoweredLifts >> 6; +} + +void Ride::setPoweredLifts(uint8_t newValue) +{ + dropsPoweredLifts &= ~kRideNumPoweredLiftsMask; + dropsPoweredLifts |= (newValue << 6); +} diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index 9ae087ed4b..63b9fcea51 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -13,6 +13,7 @@ #include "../actions/ResultWithMessage.h" #include "../common.h" #include "../core/BitSet.hpp" +#include "../core/FixedPoint.hpp" #include "../object/MusicObject.h" #include "../rct2/DATLimits.h" #include "../rct2/Limits.h" @@ -44,10 +45,18 @@ constexpr uint8_t kRideAdjacencyCheckDistance = 5; constexpr uint8_t TUNE_ID_NULL = 0xFF; -constexpr uint16_t const MAX_STATION_LOCATIONS = OpenRCT2::Limits::MaxStationsPerRide * 2; // Entrance and exit per station +constexpr uint16_t const MAX_STATION_LOCATIONS = OpenRCT2::Limits::kMaxStationsPerRide * 2; // Entrance and exit per station constexpr uint16_t const MAZE_CLEARANCE_HEIGHT = 4 * COORDS_Z_STEP; +constexpr uint8_t kRideMaxDropsCount = 63; +constexpr uint8_t kRideNumDropsMask = 0b00111111; +constexpr uint8_t kRideMaxNumPoweredLiftsCount = 3; +constexpr uint8_t kRideNumPoweredLiftsMask = 0b11000000; + +constexpr money64 kRideMinPrice = 0.00_GBP; +constexpr money64 kRideMaxPrice = 20.00_GBP; + struct RideStation { static constexpr uint8_t kNoTrain = std::numeric_limits::max(); @@ -119,14 +128,14 @@ struct Ride // 0x4c. ObjectEntryIndex subtype{ OBJECT_ENTRY_INDEX_NULL }; RideMode mode{}; - uint8_t colour_scheme_type{}; - VehicleColour vehicle_colours[OpenRCT2::Limits::MaxVehicleColours]{}; + VehicleColourSettings vehicleColourSettings{}; + VehicleColour vehicle_colours[OpenRCT2::Limits::kMaxVehicleColours]{}; // 0 = closed, 1 = open, 2 = test RideStatus status{}; std::string custom_name; uint16_t default_name_number{}; CoordsXY overall_view; - EntityId vehicles[OpenRCT2::Limits::MaxTrainsPerRide + 1]{}; // Points to the first car in the train + 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{}; @@ -175,7 +184,7 @@ struct Ride uint16_t turn_count_banked{}; uint16_t turn_count_sloped{}; // X = number turns > 3 elements // Y is number of powered lifts, X is drops - uint8_t drops{}; // (YYXX XXXX) + uint8_t dropsPoweredLifts{}; // (YYXX XXXX) uint8_t start_drop_height{}; uint8_t highest_drop_height{}; int32_t sheltered_length{}; @@ -187,19 +196,10 @@ struct Ride // Counts ticks to update customer intervals, resets each 960 game ticks. uint16_t num_customers_timeout{}; // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t num_customers[OpenRCT2::Limits::CustomerHistorySize]{}; + uint16_t num_customers[OpenRCT2::Limits::kCustomerHistorySize]{}; money64 price[RCT2::ObjectLimits::MaxShopItemsPerRideEntry]{}; TileCoordsXYZ ChairliftBullwheelLocation[2]; - union - { - RatingTuple ratings{}; - struct - { - ride_rating excitement; - ride_rating intensity; - ride_rating nausea; - }; - }; + RatingTuple ratings{}; money64 value{}; uint16_t chairlift_bullwheel_rotation{}; uint8_t satisfaction{}; @@ -249,7 +249,7 @@ struct Ride uint8_t downtime{}; uint8_t inspection_interval{}; uint8_t last_inspection{}; - uint8_t downtime_history[OpenRCT2::Limits::DowntimeHistorySize]{}; + uint8_t downtime_history[OpenRCT2::Limits::kDowntimeHistorySize]{}; uint32_t no_primary_items_sold{}; uint32_t no_secondary_items_sold{}; uint8_t breakdown_sound_modifier{}; @@ -260,7 +260,7 @@ struct Ride uint8_t connected_message_throttle{}; money64 income_per_hour{}; money64 profit{}; - TrackColour track_colour[OpenRCT2::Limits::NumColourSchemes]{}; + TrackColour track_colour[kNumRideColourSchemes]{}; ObjectEntryIndex music{ OBJECT_ENTRY_INDEX_NULL }; ObjectEntryIndex entrance_style{ OBJECT_ENTRY_INDEX_NULL }; uint16_t vehicle_change_timeout{}; @@ -268,7 +268,7 @@ struct Ride uint8_t lift_hill_speed{}; uint32_t guests_favourite{}; uint32_t lifecycle_flags{}; - uint16_t total_air_time{}; + uint16_t totalAirTime{}; StationIndex current_test_station{ StationIndex::GetNull() }; uint8_t num_circuits{}; CoordsXYZ CableLiftLoc{}; @@ -285,13 +285,13 @@ struct Ride friend void UpdateChairlift(Ride& ride); private: - std::array stations{}; + std::array stations{}; public: RideStation& GetStation(StationIndex stationIndex = StationIndex::FromUnderlying(0)); const RideStation& GetStation(StationIndex stationIndex = StationIndex::FromUnderlying(0)) const; - std::array& GetStations(); - const std::array& GetStations() const; + std::array& GetStations(); + const std::array& 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 @@ -413,7 +413,11 @@ public: bool FindTrackGap(const CoordsXYE& input, CoordsXYE* output) const; - uint8_t GetEntranceStyle() const; + uint8_t getNumDrops() const; + void setNumDrops(uint8_t newValue); + + uint8_t getNumPoweredLifts() const; + void setPoweredLifts(uint8_t newValue); }; void UpdateSpiralSlide(Ride& ride); void UpdateChairlift(Ride& ride); @@ -671,15 +675,6 @@ enum class RideMode : uint8_t RideMode& operator++(RideMode& d, int); -enum -{ - RIDE_COLOUR_SCHEME_MODE_ALL_SAME, - RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN, - RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_CAR, - - RIDE_COLOUR_SCHEME_MODE_COUNT, -}; - enum { RIDE_CATEGORY_TRANSPORT, @@ -775,23 +770,6 @@ enum WAIT_FOR_LOAD_COUNT, }; -enum -{ - RIDE_COLOUR_SCHEME_MAIN, - RIDE_COLOUR_SCHEME_ADDITIONAL_1, - RIDE_COLOUR_SCHEME_ADDITIONAL_2, - RIDE_COLOUR_SCHEME_ADDITIONAL_3, - - RIDE_COLOUR_SCHEME_COUNT, -}; - -enum -{ - VEHICLE_COLOUR_SCHEME_SAME, - VEHICLE_COLOUR_SCHEME_PER_TRAIN, - VEHICLE_COLOUR_SCHEME_PER_VEHICLE -}; - enum { RIDE_INSPECTION_EVERY_10_MINUTES, diff --git a/src/openrct2/ride/RideAudio.cpp b/src/openrct2/ride/RideAudio.cpp index 1ee1711c0b..5964872087 100644 --- a/src/openrct2/ride/RideAudio.cpp +++ b/src/openrct2/ride/RideAudio.cpp @@ -23,6 +23,7 @@ #include "Ride.h" #include "RideData.h" +#include #include using namespace OpenRCT2; @@ -257,7 +258,7 @@ namespace OpenRCT2::RideAudio return; // TODO Allow circus music (CSS24) to play if ride music is disabled (that should be sound) - if (gGameSoundsOff || !gConfigSound.RideMusicEnabled) + if (gGameSoundsOff || !Config::Get().sound.RideMusicEnabled) return; StopInactiveRideMusicChannels(); diff --git a/src/openrct2/ride/RideColour.h b/src/openrct2/ride/RideColour.h index 7881beb7bb..4dc6836b39 100644 --- a/src/openrct2/ride/RideColour.h +++ b/src/openrct2/ride/RideColour.h @@ -9,11 +9,30 @@ #pragma once +#include "../common.h" + #include struct TrackColour { - uint8_t main; - uint8_t additional; - uint8_t supports; + colour_t main; + colour_t additional; + colour_t supports; }; + +enum class RideColourScheme : uint8_t +{ + main, + additional1, + additional2, + additional3, +}; +constexpr uint8_t kNumRideColourSchemes = 4; + +enum class VehicleColourSettings : uint8_t +{ + same, + perTrain, + perCar, +}; +constexpr uint8_t kNumVehicleColourSettings = 3; diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index 3103bd5992..bebcb1b3ec 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -19,6 +19,7 @@ #include "../actions/RideSetVehicleAction.h" #include "../actions/TrackRemoveAction.h" #include "../common.h" +#include "../core/FixedVector.h" #include "../entity/EntityList.h" #include "../entity/EntityRegistry.h" #include "../entity/Staff.h" @@ -179,7 +180,7 @@ void Ride::RemoveVehicles() lifecycle_flags &= ~RIDE_LIFECYCLE_ON_TRACK; lifecycle_flags &= ~(RIDE_LIFECYCLE_TEST_IN_PROGRESS | RIDE_LIFECYCLE_HAS_STALLED_VEHICLE); - for (size_t i = 0; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) + for (size_t i = 0; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { auto spriteIndex = vehicles[i]; while (!spriteIndex.IsNull()) @@ -197,7 +198,7 @@ void Ride::RemoveVehicles() vehicles[i] = EntityId::GetNull(); } - for (size_t i = 0; i < OpenRCT2::Limits::MaxStationsPerRide; i++) + for (size_t i = 0; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) stations[i].TrainAtStation = RideStation::kNoTrain; // Also clean up orphaned vehicles for good measure. @@ -436,7 +437,7 @@ std::optional GetTrackElementOriginAndApplyChanges( } if (flags & TRACK_ELEMENT_SET_COLOUR_SCHEME) { - trackElement->SetColourScheme(static_cast(extra_params & 0xFF)); + trackElement->SetColourScheme(static_cast(extra_params & 0xFF)); } if (flags & TRACK_ELEMENT_SET_SEAT_ROTATION) { @@ -498,7 +499,7 @@ void RideRemoveProvisionalTrackPiece() if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { const int32_t flags = GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; - const CoordsXYZD quadrants[NumOrthogonalDirections] = { + const CoordsXYZD quadrants[kNumOrthogonalDirections] = { { x, y, z, 0 }, { x, y + 16, z, 1 }, { x + 16, y + 16, z, 2 }, diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index 1be1f3eb01..400f8c3f01 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -31,6 +31,7 @@ #include "RideConstruction.h" #include "RideEntry.h" #include "RideRatings.h" +#include "RideStringIds.h" #include "ShopItem.h" #include "Track.h" #include "TrackPaint.h" @@ -199,21 +200,39 @@ struct RideOperatingSettings { uint8_t MinValue; uint8_t MaxValue; - uint8_t MaxBrakesSpeed; - uint8_t PoweredLiftAcceleration; - uint8_t BoosterAcceleration; - int8_t BoosterSpeedFactor; // The factor to shift the raw booster speed with - uint16_t AccelerationFactor = 12; uint8_t OperatingSettingMultiplier = 1; // Used for the Ride window, cosmetic only. }; +struct RideTrackSpeedSettings +{ + int8_t BrakesMaxSpeed = 30; + int8_t BoosterMaxSpeed = 30; +}; + +struct RideBoosterSettings +{ + uint8_t PoweredLiftAcceleration = 0; + uint8_t BoosterAcceleration = 0; + uint8_t AccelerationFactor = 12; // the amount to right-shift the launch speed for powered launch from a station +}; + +struct RideLegacyBoosterSettings +// These values that must be kept for backwards compatibility. New ride types should set the acceleration values equal to +// BoosterSettings' and leave BoosterSpeedFactor at default. +{ + uint8_t PoweredLiftAcceleration = 0; // PoweredLiftAcceleration value before unified-speed update + uint8_t BoosterAcceleration = 0; // BoosterAcceleration value before unified-speed update + int8_t BoosterSpeedFactor = 2; // Multiplier representing how much to multiply booster speed by, scaled to 2x the final + // multiplier. +}; + struct RatingsModifier { - RatingsModifierType Type; - int32_t Threshold; - int32_t Excitement; - int32_t Intensity; - int32_t Nausea; + RatingsModifierType type; + int32_t threshold; + int32_t excitement; + int32_t intensity; + int32_t nausea; }; struct RideRatingsDescriptor @@ -317,6 +336,9 @@ struct RideTypeDescriptor RideMode DefaultMode{}; /** rct2: 0x0097CF40 */ RideOperatingSettings OperatingSettings{}; + RideTrackSpeedSettings TrackSpeedSettings{}; + RideBoosterSettings BoosterSettings{}; + RideLegacyBoosterSettings LegacyBoosterSettings{}; RideNaming Naming{}; RideNameConvention NameConvention{}; const char* EnumName{}; @@ -407,6 +429,7 @@ enum ride_type_flags : uint64_t // coaster RIDE_TYPE_FLAG_NO_VEHICLES = (1uLL << 13), // used only by maze, spiral slide and shops RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS = (1uLL << 14), + RIDE_TYPE_FLAG_LSM_BEHAVIOUR_ON_FLAT = (1uLL << 15), RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL = (1uLL << 16), // Set by flat rides where the vehicle is integral to the structure, like // Merry-go-round and swinging ships. (Contrast with rides like dodgems.) RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY = (1uLL << 17), @@ -425,6 +448,7 @@ enum ride_type_flags : uint64_t RIDE_TYPE_FLAG_CHECK_FOR_STALLING = (1uLL << 27), RIDE_TYPE_FLAG_HAS_TRACK = (1uLL << 28), RIDE_TYPE_FLAG_ALLOW_EXTRA_TOWER_BASES = (1uLL << 29), // Only set by lift + RIDE_TYPE_FLAG_LAYERED_VEHICLE_PREVIEW = (1uLL << 30), // Only set by reverser coaster RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR = (1uLL << 31), RIDE_TYPE_FLAG_ALLOW_DOORS_ON_TRACK = (1uLL << 32), @@ -538,7 +562,10 @@ constexpr RideTypeDescriptor DummyRTD = .Flags = 0, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, + .OperatingSettings = {}, + .TrackSpeedSettings = {}, + .BoosterSettings = {}, + .LegacyBoosterSettings = {}, .Naming = { STR_UNKNOWN_RIDE, STR_RIDE_DESCRIPTION_UNKNOWN }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = "(INVALID)", diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index 501e51bd30..fe824c68ad 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -895,7 +895,7 @@ static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) // Apply Modifiers for (const auto& modifier : rrd.Modifiers) { - switch (modifier.Type) + switch (modifier.type) { case RatingsModifierType::BonusLength: RideRatingsApplyBonusLength(ratings, ride, modifier); @@ -1021,7 +1021,7 @@ static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) // Requirements that may be ignored if the ride has inversions if (ride.inversions == 0 || !rrd.RelaxRequirementsIfInversions) { - switch (modifier.Type) + switch (modifier.type) { case RatingsModifierType::RequirementDropHeight: RideRatingsApplyRequirementDropHeight(ratings, ride, modifier); @@ -1046,12 +1046,12 @@ static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; #ifdef ORIGINAL_RATINGS - if (ride.ratings.Excitement != -1) + if (!ride.ratings.excitement.isNull()) { // Address underflows allowed by original RCT2 code - ride.ratings.Excitement = std::max(0, ride.ratings.Excitement); - ride.ratings.Intensity = std::max(0, ride.ratings.Intensity); - ride.ratings.Nausea = std::max(0, ride.ratings.Nausea); + ride.ratings.excitement = std::max(0, ride.ratings.excitement); + ride.ratings.intensity = std::max(0, ride.ratings.intensity); + ride.ratings.nausea = std::max(0, ride.ratings.nausea); } #endif @@ -1063,28 +1063,26 @@ static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) if (hookEngine.HasSubscriptions(HOOK_TYPE::RIDE_RATINGS_CALCULATE)) { auto ctx = GetContext()->GetScriptEngine().GetContext(); - auto originalExcitement = ride.excitement; - auto originalIntensity = ride.intensity; - auto originalNausea = ride.nausea; + auto originalRatings = ride.ratings; // Create event args object auto obj = DukObject(ctx); obj.Set("rideId", ride.id.ToUnderlying()); - obj.Set("excitement", originalExcitement); - obj.Set("intensity", originalIntensity); - obj.Set("nausea", originalNausea); + obj.Set("excitement", originalRatings.excitement); + obj.Set("intensity", originalRatings.intensity); + obj.Set("nausea", originalRatings.nausea); // Call the subscriptions auto e = obj.Take(); hookEngine.Call(HOOK_TYPE::RIDE_RATINGS_CALCULATE, e, true); - auto scriptExcitement = AsOrDefault(e["excitement"], static_cast(originalExcitement)); - auto scriptIntensity = AsOrDefault(e["intensity"], static_cast(originalIntensity)); - auto scriptNausea = AsOrDefault(e["nausea"], static_cast(originalNausea)); + auto scriptExcitement = AsOrDefault(e["excitement"], static_cast(originalRatings.excitement)); + auto scriptIntensity = AsOrDefault(e["intensity"], static_cast(originalRatings.intensity)); + auto scriptNausea = AsOrDefault(e["nausea"], static_cast(originalRatings.nausea)); - ride.excitement = std::clamp(scriptExcitement, 0, INT16_MAX); - ride.intensity = std::clamp(scriptIntensity, 0, INT16_MAX); - ride.nausea = std::clamp(scriptNausea, 0, INT16_MAX); + ride.ratings.excitement = std::clamp(scriptExcitement, 0, INT16_MAX); + ride.ratings.intensity = std::clamp(scriptIntensity, 0, INT16_MAX); + ride.ratings.nausea = std::clamp(scriptNausea, 0, INT16_MAX); } } #endif @@ -1131,9 +1129,9 @@ 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; - money64 value = (((ride.excitement * ratingsMultipliers.Excitement) * 32) >> 15) - + (((ride.intensity * ratingsMultipliers.Intensity) * 32) >> 15) - + (((ride.nausea * ratingsMultipliers.Nausea) * 32) >> 15); + 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) @@ -1195,11 +1193,7 @@ static money64 RideComputeUpkeep(RideRatingUpdateState& state, const Ride& ride) auto upkeep = ride.GetRideTypeDescriptor().UpkeepCosts.BaseCost; auto trackCost = ride.GetRideTypeDescriptor().UpkeepCosts.CostPerTrackPiece; - uint8_t dropFactor = ride.drops; - - dropFactor >>= 6; - dropFactor &= 3; - upkeep += trackCost * dropFactor; + upkeep += trackCost * ride.getNumPoweredLifts(); uint32_t totalLength = ride.GetTotalLength() >> 16; @@ -1280,28 +1274,28 @@ static void RideRatingsApplyAdjustments(const Ride& ride, RatingTuple& ratings) // Apply ride entry multipliers RideRatingsAdd( - ratings, ((static_cast(ratings.Excitement) * rideEntry->excitement_multiplier) >> 7), - ((static_cast(ratings.Intensity) * rideEntry->intensity_multiplier) >> 7), - ((static_cast(ratings.Nausea) * rideEntry->nausea_multiplier) >> 7)); + ratings, ((static_cast(ratings.excitement) * rideEntry->excitement_multiplier) >> 7), + ((static_cast(ratings.intensity) * rideEntry->intensity_multiplier) >> 7), + ((static_cast(ratings.nausea) * rideEntry->nausea_multiplier) >> 7)); // Apply total air time #ifdef ORIGINAL_RATINGS if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_AIR_TIME)) { - uint16_t totalAirTime = ride.total_air_time; + uint16_t totalAirTime = ride.totalAirTime; if (rideEntry->flags & RIDE_ENTRY_FLAG_LIMIT_AIRTIME_BONUS) { if (totalAirTime >= 96) { totalAirTime -= 96; - ratings.Excitement -= totalAirTime / 8; - ratings.Nausea += totalAirTime / 16; + ratings.excitement -= totalAirTime / 8; + ratings.nausea += totalAirTime / 16; } } else { - ratings.Excitement += totalAirTime / 8; - ratings.Nausea += totalAirTime / 16; + ratings.excitement += totalAirTime / 8; + ratings.nausea += totalAirTime / 16; } } #else @@ -1311,13 +1305,13 @@ static void RideRatingsApplyAdjustments(const Ride& ride, RatingTuple& ratings) if (rideEntry->flags & RIDE_ENTRY_FLAG_LIMIT_AIRTIME_BONUS) { // Limit airtime bonus for heartline twister coaster (see issues #2031 and #2064) - excitementModifier = std::min(ride.total_air_time, 96) / 8; + excitementModifier = std::min(ride.totalAirTime, 96) / 8; } else { - excitementModifier = ride.total_air_time / 8; + excitementModifier = ride.totalAirTime / 8; } - int32_t nauseaModifier = ride.total_air_time / 16; + int32_t nauseaModifier = ride.totalAirTime / 16; RideRatingsAdd(ratings, excitementModifier, 0, nauseaModifier); } @@ -1331,15 +1325,15 @@ static void RideRatingsApplyAdjustments(const Ride& ride, RatingTuple& ratings) static void RideRatingsApplyIntensityPenalty(RatingTuple& ratings) { static constexpr ride_rating intensityBounds[] = { 1000, 1100, 1200, 1320, 1450 }; - ride_rating excitement = ratings.Excitement; + ride_rating excitement = ratings.excitement; for (auto intensityBound : intensityBounds) { - if (ratings.Intensity >= intensityBound) + if (ratings.intensity >= intensityBound) { excitement -= excitement / 4; } } - ratings.Excitement = excitement; + ratings.excitement = excitement; } /** @@ -1461,17 +1455,17 @@ static RatingTuple get_flat_turns_rating(const Ride& ride) int32_t num1Turns = GetTurnCount1Element(ride, 0); RatingTuple rating; - rating.Excitement = (num3PlusTurns * 0x28000) >> 16; - rating.Excitement += (num2Turns * 0x30000) >> 16; - rating.Excitement += (num1Turns * 63421) >> 16; + rating.excitement = (num3PlusTurns * 0x28000) >> 16; + rating.excitement += (num2Turns * 0x30000) >> 16; + rating.excitement += (num1Turns * 63421) >> 16; - rating.Intensity = (num3PlusTurns * 81920) >> 16; - rating.Intensity += (num2Turns * 49152) >> 16; - rating.Intensity += (num1Turns * 21140) >> 16; + rating.intensity = (num3PlusTurns * 81920) >> 16; + rating.intensity += (num2Turns * 49152) >> 16; + rating.intensity += (num1Turns * 21140) >> 16; - rating.Nausea = (num3PlusTurns * 0x50000) >> 16; - rating.Nausea += (num2Turns * 0x32000) >> 16; - rating.Nausea += (num1Turns * 42281) >> 16; + rating.nausea = (num3PlusTurns * 0x50000) >> 16; + rating.nausea += (num2Turns * 0x32000) >> 16; + rating.nausea += (num1Turns * 42281) >> 16; return rating; } @@ -1487,17 +1481,17 @@ static RatingTuple get_banked_turns_rating(const Ride& ride) int32_t num1Turns = GetTurnCount1Element(ride, 1); RatingTuple rating; - rating.Excitement = (num3PlusTurns * 0x3C000) >> 16; - rating.Excitement += (num2Turns * 0x3C000) >> 16; - rating.Excitement += (num1Turns * 73992) >> 16; + rating.excitement = (num3PlusTurns * 0x3C000) >> 16; + rating.excitement += (num2Turns * 0x3C000) >> 16; + rating.excitement += (num1Turns * 73992) >> 16; - rating.Intensity = (num3PlusTurns * 0x14000) >> 16; - rating.Intensity += (num2Turns * 49152) >> 16; - rating.Intensity += (num1Turns * 21140) >> 16; + rating.intensity = (num3PlusTurns * 0x14000) >> 16; + rating.intensity += (num2Turns * 49152) >> 16; + rating.intensity += (num1Turns * 21140) >> 16; - rating.Nausea = (num3PlusTurns * 0x50000) >> 16; - rating.Nausea += (num2Turns * 0x32000) >> 16; - rating.Nausea += (num1Turns * 48623) >> 16; + rating.nausea = (num3PlusTurns * 0x50000) >> 16; + rating.nausea += (num2Turns * 0x32000) >> 16; + rating.nausea += (num1Turns * 48623) >> 16; return rating; } @@ -1515,12 +1509,12 @@ static RatingTuple get_sloped_turns_rating(const Ride& ride) int32_t num2Turns = GetTurnCount2Elements(ride, 2); int32_t num1Turns = GetTurnCount1Element(ride, 2); - rating.Excitement = (std::min(num4PlusTurns, 4) * 0x78000) >> 16; - rating.Excitement += (std::min(num3Turns, 6) * 273066) >> 16; - rating.Excitement += (std::min(num2Turns, 6) * 0x3AAAA) >> 16; - rating.Excitement += (std::min(num1Turns, 7) * 187245) >> 16; - rating.Intensity = 0; - rating.Nausea = (std::min(num4PlusTurns, 8) * 0x78000) >> 16; + rating.excitement = (std::min(num4PlusTurns, 4) * 0x78000) >> 16; + rating.excitement += (std::min(num3Turns, 6) * 273066) >> 16; + rating.excitement += (std::min(num2Turns, 6) * 0x3AAAA) >> 16; + rating.excitement += (std::min(num1Turns, 7) * 187245) >> 16; + rating.intensity = 0; + rating.nausea = (std::min(num4PlusTurns, 8) * 0x78000) >> 16; return rating; } @@ -1533,9 +1527,9 @@ static RatingTuple get_inversions_ratings(uint16_t inversions) { RatingTuple rating; - rating.Excitement = (std::min(inversions, 6) * 0x1AAAAA) >> 16; - rating.Intensity = (inversions * 0x320000) >> 16; - rating.Nausea = (inversions * 0x15AAAA) >> 16; + rating.excitement = (std::min(inversions, 6) * 0x1AAAAA) >> 16; + rating.intensity = (inversions * 0x320000) >> 16; + rating.nausea = (inversions * 0x15AAAA) >> 16; return rating; } @@ -1612,30 +1606,30 @@ static RatingTuple ride_ratings_get_turns_ratings(const Ride& ride) int32_t excitement = 0, intensity = 0, nausea = 0; RatingTuple specialTrackElementsRating = GetSpecialTrackElementsRating(ride.type, ride); - excitement += specialTrackElementsRating.Excitement; - intensity += specialTrackElementsRating.Intensity; - nausea += specialTrackElementsRating.Nausea; + excitement += specialTrackElementsRating.excitement; + intensity += specialTrackElementsRating.intensity; + nausea += specialTrackElementsRating.nausea; RatingTuple flatTurnsRating = get_flat_turns_rating(ride); - excitement += flatTurnsRating.Excitement; - intensity += flatTurnsRating.Intensity; - nausea += flatTurnsRating.Nausea; + excitement += flatTurnsRating.excitement; + intensity += flatTurnsRating.intensity; + nausea += flatTurnsRating.nausea; RatingTuple bankedTurnsRating = get_banked_turns_rating(ride); - excitement += bankedTurnsRating.Excitement; - intensity += bankedTurnsRating.Intensity; - nausea += bankedTurnsRating.Nausea; + excitement += bankedTurnsRating.excitement; + intensity += bankedTurnsRating.intensity; + nausea += bankedTurnsRating.nausea; RatingTuple slopedTurnsRating = get_sloped_turns_rating(ride); - excitement += slopedTurnsRating.Excitement; - intensity += slopedTurnsRating.Intensity; - nausea += slopedTurnsRating.Nausea; + excitement += slopedTurnsRating.excitement; + intensity += slopedTurnsRating.intensity; + nausea += slopedTurnsRating.nausea; auto inversions = (ride.type == RIDE_TYPE_MINI_GOLF) ? ride.holes : ride.inversions; RatingTuple inversionsRating = get_inversions_ratings(inversions); - excitement += inversionsRating.Excitement; - intensity += inversionsRating.Intensity; - nausea += inversionsRating.Nausea; + excitement += inversionsRating.excitement; + intensity += inversionsRating.intensity; + nausea += inversionsRating.nausea; RatingTuple rating = { static_cast(excitement), static_cast(intensity), static_cast(nausea) }; @@ -1688,39 +1682,39 @@ static RatingTuple ride_ratings_get_sheltered_ratings(const Ride& ride) static RatingTuple ride_ratings_get_gforce_ratings(const Ride& ride) { RatingTuple result = { - .Excitement = 0, - .Intensity = 0, - .Nausea = 0, + .excitement = 0, + .intensity = 0, + .nausea = 0, }; // 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.max_positive_vertical_g * 5242) >> 16; + result.intensity += (ride.max_positive_vertical_g * 52428) >> 16; + result.nausea += (ride.max_positive_vertical_g * 17039) >> 16; // Apply maximum negative G force factor fixed16_2dp gforce = ride.max_negative_vertical_g; - result.Excitement += (std::clamp(gforce, -FIXED_2DP(2, 50), FIXED_2DP(0, 00)) * -15728) >> 16; - result.Intensity += ((gforce - FIXED_2DP(1, 00)) * -52428) >> 16; - result.Nausea += ((gforce - FIXED_2DP(1, 00)) * -14563) >> 16; + result.excitement += (std::clamp(gforce, -FIXED_2DP(2, 50), FIXED_2DP(0, 00)) * -15728) >> 16; + result.intensity += ((gforce - FIXED_2DP(1, 00)) * -52428) >> 16; + result.nausea += ((gforce - FIXED_2DP(1, 00)) * -14563) >> 16; // Apply lateral G force factor - result.Excitement += (std::min(FIXED_2DP(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(FIXED_2DP(1, 50), ride.max_lateral_g) * 26214) >> 16; + result.intensity += ride.max_lateral_g; + result.nausea += (ride.max_lateral_g * 21845) >> 16; // Very high lateral G force penalty #ifdef ORIGINAL_RATINGS if (ride.max_lateral_g > FIXED_2DP(2, 80)) { - result.Intensity += FIXED_2DP(3, 75); - result.Nausea += FIXED_2DP(2, 00); + result.intensity += FIXED_2DP(3, 75); + result.nausea += FIXED_2DP(2, 00); } if (ride.max_lateral_g > FIXED_2DP(3, 10)) { - result.Excitement /= 2; - result.Intensity += FIXED_2DP(8, 50); - result.Nausea += FIXED_2DP(4, 00); + result.excitement /= 2; + result.intensity += FIXED_2DP(8, 50); + result.nausea += FIXED_2DP(4, 00); } #endif @@ -1740,10 +1734,10 @@ static RatingTuple ride_ratings_get_drop_ratings(const Ride& ride) }; // Apply number of drops factor - int32_t drops = ride.drops & 0x3F; - result.Excitement += (std::min(9, drops) * 728177) >> 16; - result.Intensity += (drops * 928426) >> 16; - result.Nausea += (drops * 655360) >> 16; + int32_t drops = ride.getNumDrops(); + result.excitement += (std::min(9, drops) * 728177) >> 16; + result.intensity += (drops * 928426) >> 16; + result.nausea += (drops * 655360) >> 16; // Apply highest drop factor RideRatingsAdd( @@ -1816,9 +1810,9 @@ static int32_t ride_ratings_get_scenery_score(const Ride& ride) static void RideRatingsSet(RatingTuple& ratings, int32_t excitement, int32_t intensity, int32_t nausea) { - ratings.Excitement = 0; - ratings.Intensity = 0; - ratings.Nausea = 0; + ratings.excitement = 0; + ratings.intensity = 0; + ratings.nausea = 0; RideRatingsAdd(ratings, excitement, intensity, nausea); } @@ -1827,94 +1821,94 @@ static void RideRatingsSet(RatingTuple& ratings, int32_t excitement, int32_t int */ static void RideRatingsAdd(RatingTuple& ratings, int32_t excitement, int32_t intensity, int32_t nausea) { - int32_t newExcitement = ratings.Excitement + excitement; - int32_t newIntensity = ratings.Intensity + intensity; - int32_t newNausea = ratings.Nausea + nausea; - ratings.Excitement = std::clamp(newExcitement, 0, INT16_MAX); - ratings.Intensity = std::clamp(newIntensity, 0, INT16_MAX); - ratings.Nausea = std::clamp(newNausea, 0, INT16_MAX); + int32_t newExcitement = ratings.excitement + excitement; + int32_t newIntensity = ratings.intensity + intensity; + int32_t newNausea = ratings.nausea + nausea; + ratings.excitement = std::clamp(newExcitement, 0, INT16_MAX); + ratings.intensity = std::clamp(newIntensity, 0, INT16_MAX); + ratings.nausea = std::clamp(newNausea, 0, INT16_MAX); } static void RideRatingsApplyBonusLength(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - RideRatingsAdd(ratings, (std::min(ride.GetTotalLength() >> 16, modifier.Threshold) * modifier.Excitement) >> 16, 0, 0); + RideRatingsAdd(ratings, (std::min(ride.GetTotalLength() >> 16, 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)) { - RideRatingsAdd(ratings, modifier.Excitement, modifier.Intensity, modifier.Nausea); + RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } } 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.num_cars_per_train - 1) * modifier.excitement) >> 16, 0, 0); } static void RideRatingsApplyBonusMaxSpeed(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { int32_t maxSpeedMod = ride.max_speed >> 16; RideRatingsAdd( - ratings, (maxSpeedMod * modifier.Excitement) >> 16, (maxSpeedMod * modifier.Intensity) >> 16, - (maxSpeedMod * modifier.Nausea) >> 16); + ratings, (maxSpeedMod * modifier.excitement) >> 16, (maxSpeedMod * modifier.intensity) >> 16, + (maxSpeedMod * modifier.nausea) >> 16); } static void RideRatingsApplyBonusAverageSpeed(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { int32_t avgSpeedMod = ride.average_speed >> 16; - RideRatingsAdd(ratings, (avgSpeedMod * modifier.Excitement) >> 16, (avgSpeedMod * modifier.Intensity) >> 16, 0); + 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) { RatingTuple subRating = ride_ratings_get_gforce_ratings(ride); RideRatingsAdd( - ratings, (subRating.Excitement * modifier.Excitement) >> 16, (subRating.Intensity * modifier.Intensity) >> 16, - (subRating.Nausea * modifier.Nausea) >> 16); + ratings, (subRating.excitement * modifier.excitement) >> 16, (subRating.intensity * modifier.intensity) >> 16, + (subRating.nausea * modifier.nausea) >> 16); } static void RideRatingsApplyBonusTurns(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { RatingTuple subRating = ride_ratings_get_turns_ratings(ride); RideRatingsAdd( - ratings, (subRating.Excitement * modifier.Excitement) >> 16, (subRating.Intensity * modifier.Intensity) >> 16, - (subRating.Nausea * modifier.Nausea) >> 16); + ratings, (subRating.excitement * modifier.excitement) >> 16, (subRating.intensity * modifier.intensity) >> 16, + (subRating.nausea * modifier.nausea) >> 16); } static void RideRatingsApplyBonusDrops(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { RatingTuple subRating = ride_ratings_get_drop_ratings(ride); RideRatingsAdd( - ratings, (subRating.Excitement * modifier.Excitement) >> 16, (subRating.Intensity * modifier.Intensity) >> 16, - (subRating.Nausea * modifier.Nausea) >> 16); + ratings, (subRating.excitement * modifier.excitement) >> 16, (subRating.intensity * modifier.intensity) >> 16, + (subRating.nausea * modifier.nausea) >> 16); } static void RideRatingsApplyBonusSheltered(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { RatingTuple subRating = ride_ratings_get_sheltered_ratings(ride); RideRatingsAdd( - ratings, (subRating.Excitement * modifier.Excitement) >> 16, (subRating.Intensity * modifier.Intensity) >> 16, - (subRating.Nausea * modifier.Nausea) >> 16); + ratings, (subRating.excitement * modifier.excitement) >> 16, (subRating.intensity * modifier.intensity) >> 16, + (subRating.nausea * modifier.nausea) >> 16); } static void RideRatingsApplyBonusRotations(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { RideRatingsAdd( - ratings, ride.rotations * modifier.Excitement, ride.rotations * modifier.Intensity, ride.rotations * modifier.Nausea); + ratings, ride.rotations * modifier.excitement, ride.rotations * modifier.intensity, ride.rotations * modifier.nausea); } 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.operation_option * modifier.intensity) + : (ride.operation_option / std::abs(modifier.intensity)); + RideRatingsAdd(ratings, ride.operation_option * modifier.excitement, intensity, ride.operation_option * modifier.nausea); } static void RideRatingsApplyBonusReversedTrains(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) @@ -1922,16 +1916,16 @@ static void RideRatingsApplyBonusReversedTrains(RatingTuple& ratings, const Ride if (ride.HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)) { RideRatingsAdd( - ratings, ((ratings.Excitement * modifier.Excitement) >> 7), (ratings.Intensity * modifier.Intensity) >> 7, - (ratings.Nausea * modifier.Nausea) >> 7); + ratings, ((ratings.excitement * modifier.excitement) >> 7), (ratings.intensity * modifier.intensity) >> 7, + (ratings.nausea * modifier.nausea) >> 7); } } 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); + RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); int32_t lapsFactor = (ride.NumLaps - 1) * 30; RideRatingsAdd(ratings, lapsFactor, lapsFactor / 2, 0); @@ -1942,8 +1936,8 @@ static void RideRatingsApplyBonusTowerRide(RatingTuple& ratings, const Ride& rid { int32_t lengthFactor = (ride.GetTotalLength() >> 16); RideRatingsAdd( - ratings, (lengthFactor * modifier.Excitement) >> 16, (lengthFactor * modifier.Intensity) >> 16, - (lengthFactor * modifier.Nausea) >> 16); + ratings, (lengthFactor * modifier.excitement) >> 16, (lengthFactor * modifier.intensity) >> 16, + (lengthFactor * modifier.nausea) >> 16); } static void RideRatingsApplyBonusRotoDrop(RatingTuple& ratings, const Ride& ride) @@ -1954,8 +1948,8 @@ static void RideRatingsApplyBonusRotoDrop(RatingTuple& ratings, const Ride& ride static void RideRatingsApplyBonusMazeSize(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - int32_t size = std::min(ride.maze_tiles, modifier.Threshold); - RideRatingsAdd(ratings, size * modifier.Excitement, size * modifier.Intensity, size * modifier.Nausea); + int32_t size = std::min(ride.maze_tiles, modifier.threshold); + RideRatingsAdd(ratings, size * modifier.excitement, size * modifier.intensity, size * modifier.nausea); } static void RideRatingsApplyBonusBoatHireNoCircuit(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) @@ -1963,7 +1957,7 @@ static void RideRatingsApplyBonusBoatHireNoCircuit(RatingTuple& ratings, const R // Most likely checking if the ride has does not have a circuit if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) { - RideRatingsAdd(ratings, modifier.Excitement, modifier.Intensity, modifier.Nausea); + RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } } @@ -1971,7 +1965,7 @@ static void RideRatingsApplyBonusSlideUnlimitedRides(RatingTuple& ratings, const { if (ride.mode == RideMode::UnlimitedRidesPerAdmission) { - RideRatingsAdd(ratings, modifier.Excitement, modifier.Intensity, modifier.Nausea); + RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } } @@ -2027,24 +2021,24 @@ static void RideRatingsApplyBonusTopSpinMode(RatingTuple& ratings, const Ride& r static void RideRatingsApplyBonusReversals( RatingTuple& ratings, const Ride& ride, RideRatingUpdateState& state, RatingsModifier modifier) { - int32_t numReversers = std::min(state.AmountOfReversers, modifier.Threshold); + int32_t numReversers = std::min(state.AmountOfReversers, modifier.threshold); RideRatingsAdd( - ratings, numReversers * modifier.Excitement, numReversers * modifier.Intensity, numReversers * modifier.Nausea); + ratings, numReversers * modifier.excitement, numReversers * modifier.intensity, numReversers * modifier.nausea); } static void RideRatingsApplyBonusHoles(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { RideRatingsAdd( - ratings, (ride.holes) * modifier.Excitement, (ride.holes) * modifier.Intensity, (ride.holes) * modifier.Nausea); + ratings, (ride.holes) * modifier.excitement, (ride.holes) * modifier.intensity, (ride.holes) * modifier.nausea); } static void RideRatingsApplyBonusNumTrains(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { // 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); + RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } } @@ -2052,15 +2046,15 @@ static void RideRatingsApplyBonusDownwardLaunch(RatingTuple& ratings, const Ride { if (ride.mode == RideMode::DownwardLaunch) { - RideRatingsAdd(ratings, modifier.Excitement, modifier.Intensity, modifier.Nausea); + RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } } 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.operation_option * modifier.excitement) >> 16, (ride.operation_option * modifier.intensity) >> 16, + (ride.operation_option * modifier.nausea) >> 16); } static void RideRatingsApplyBonusLaunchedFreefallSpecial( @@ -2091,124 +2085,124 @@ static void RideRatingsApplyBonusLaunchedFreefallSpecial( static void RideRatingsApplyBonusProximity( RatingTuple& ratings, const Ride& ride, RideRatingUpdateState& state, RatingsModifier modifier) { - RideRatingsAdd(ratings, (ride_ratings_get_proximity_score(state) * modifier.Excitement) >> 16, 0, 0); + RideRatingsAdd(ratings, (ride_ratings_get_proximity_score(state) * modifier.excitement) >> 16, 0, 0); } static void RideRatingsApplyBonusScenery(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - RideRatingsAdd(ratings, (ride_ratings_get_scenery_score(ride) * modifier.Excitement) >> 16, 0, 0); + RideRatingsAdd(ratings, (ride_ratings_get_scenery_score(ride) * modifier.excitement) >> 16, 0, 0); } 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; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementDropHeight(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.highest_drop_height < modifier.Threshold) + if (ride.highest_drop_height < modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementMaxSpeed(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.max_speed < modifier.Threshold) + if (ride.max_speed < modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementNumDrops(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if ((ride.drops & 0x3F) < modifier.Threshold) + if (ride.getNumDrops() < modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementNegativeGs(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.max_negative_vertical_g >= modifier.Threshold) + if (ride.max_negative_vertical_g >= modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementLateralGs(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.max_lateral_g < modifier.Threshold) + if (ride.max_lateral_g < modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementInversions(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.inversions < modifier.Threshold) + if (ride.inversions < modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementUnsheltered( RatingTuple& ratings, const Ride& ride, uint8_t shelteredEighths, RatingsModifier modifier) { - if (shelteredEighths >= modifier.Threshold) + if (shelteredEighths >= modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementReversals( RatingTuple& ratings, const Ride& ride, RideRatingUpdateState& state, RatingsModifier modifier) { - if (state.AmountOfReversers < modifier.Threshold) + if (state.AmountOfReversers < modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementHoles(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.holes < modifier.Threshold) + if (ride.holes < modifier.threshold) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } static void RideRatingsApplyRequirementStations(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.num_stations <= modifier.Threshold) + if (ride.num_stations <= modifier.threshold) { // Excitement is set to 0 in original code - this could be changed for consistency - ratings.Excitement = 0; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement = 0; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } @@ -2216,9 +2210,9 @@ static void RideRatingsApplyRequirementSplashdown(RatingTuple& ratings, const Ri { if (!(ride.special_track_elements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS)) { - ratings.Excitement /= modifier.Excitement; - ratings.Intensity /= modifier.Intensity; - ratings.Nausea /= modifier.Nausea; + ratings.excitement /= modifier.excitement; + ratings.intensity /= modifier.intensity; + ratings.nausea /= modifier.nausea; } } @@ -2228,27 +2222,27 @@ static RatingTuple ride_ratings_get_excessive_lateral_g_penalty(const Ride& ride RatingTuple result{}; if (ride.max_lateral_g > FIXED_2DP(2, 80)) { - result.Intensity = FIXED_2DP(3, 75); - result.Nausea = FIXED_2DP(2, 00); + result.intensity = FIXED_2DP(3, 75); + result.nausea = FIXED_2DP(2, 00); } if (ride.max_lateral_g > FIXED_2DP(3, 10)) { // Remove half of the ride_ratings_get_gforce_ratings - result.Excitement = (ride.max_positive_vertical_g * 5242) >> 16; + result.excitement = (ride.max_positive_vertical_g * 5242) >> 16; // Apply maximum negative G force factor fixed16_2dp gforce = ride.max_negative_vertical_g; - result.Excitement += (std::clamp(gforce, -FIXED_2DP(2, 50), FIXED_2DP(0, 00)) * -15728) >> 16; + result.excitement += (std::clamp(gforce, -FIXED_2DP(2, 50), FIXED_2DP(0, 00)) * -15728) >> 16; // Apply lateral G force factor - result.Excitement += (std::min(FIXED_2DP(1, 50), ride.max_lateral_g) * 26214) >> 16; + result.excitement += (std::min(FIXED_2DP(1, 50), ride.max_lateral_g) * 26214) >> 16; // Remove half of the ride_ratings_get_gforce_ratings - result.Excitement /= 2; - result.Excitement *= -1; - result.Intensity = FIXED_2DP(12, 25); - result.Nausea = FIXED_2DP(6, 00); + result.excitement /= 2; + result.excitement *= -1; + result.intensity = FIXED_2DP(12, 25); + result.nausea = FIXED_2DP(6, 00); } return result; } @@ -2259,9 +2253,21 @@ static void RideRatingsApplyPenaltyLateralGs(RatingTuple& ratings, const Ride& r #ifndef ORIGINAL_RATINGS RatingTuple subRating = ride_ratings_get_excessive_lateral_g_penalty(ride); RideRatingsAdd( - ratings, (subRating.Excitement * modifier.Excitement) >> 16, (subRating.Intensity * modifier.Intensity) >> 16, - (subRating.Nausea * modifier.Nausea) >> 16); + ratings, (subRating.excitement * modifier.excitement) >> 16, (subRating.intensity * modifier.intensity) >> 16, + (subRating.nausea * modifier.nausea) >> 16); #endif } #pragma endregion + +bool RatingTuple::isNull() const +{ + return excitement == kRideRatingUndefined; +} + +void RatingTuple::setNull() +{ + excitement = kRideRatingUndefined; + intensity = kRideRatingUndefined; + nausea = kRideRatingUndefined; +} diff --git a/src/openrct2/ride/RideRatings.h b/src/openrct2/ride/RideRatings.h index 257f617106..d7894a44aa 100644 --- a/src/openrct2/ride/RideRatings.h +++ b/src/openrct2/ride/RideRatings.h @@ -10,6 +10,7 @@ #pragma once #include "../common.h" +#include "../core/FixedPoint.hpp" #include "../world/Location.hpp" #include "RideTypes.h" @@ -26,9 +27,12 @@ constexpr ride_rating kRideRatingUndefined = 0xFFFFu; // Used for return values, for functions that modify all three. struct RatingTuple { - ride_rating Excitement; - ride_rating Intensity; - ride_rating Nausea; + ride_rating excitement{}; + ride_rating intensity{}; + ride_rating nausea{}; + + bool isNull() const; + void setNull(); }; assert_struct_size(RatingTuple, 6); diff --git a/src/openrct2/ride/RideStringIds.h b/src/openrct2/ride/RideStringIds.h new file mode 100644 index 0000000000..9e19970661 --- /dev/null +++ b/src/openrct2/ride/RideStringIds.h @@ -0,0 +1,208 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 "../common.h" + +enum : StringId +{ + // Coasters + STR_RIDE_NAME_38 = 58, + STR_RIDE_NAME_3A = 60, + STR_RIDE_NAME_40 = 66, + STR_RIDE_NAME_AIR_POWERED_VERTICAL_COASTER = 77, + STR_RIDE_NAME_ALPINE_COASTER = 95, + STR_RIDE_NAME_BOBSLEIGH_COASTER = 15, + STR_RIDE_NAME_CLASSIC_MINI_ROLLER_COASTER = 6111, + STR_RIDE_NAME_CLASSIC_STAND_UP_ROLLER_COASTER = 97, + STR_RIDE_NAME_CLASSIC_WOODEN_ROLLER_COASTER = 96, + STR_RIDE_NAME_COMPACT_INVERTED_COASTER = 75, + STR_RIDE_NAME_CORKSCREW_ROLLER_COASTER = 21, + STR_RIDE_NAME_FLYING_ROLLER_COASTER = 59, + STR_RIDE_NAME_GIGA_COASTER = 70, + STR_RIDE_NAME_HEARTLINE_TWISTER_COASTER = 68, + STR_RIDE_NAME_HYBRID_COASTER = 93, + STR_RIDE_NAME_HYPERCOASTER = 6105, + STR_RIDE_NAME_HYPER_TWISTER = 6109, + STR_RIDE_NAME_INVERTED_HAIRPIN_COASTER = 78, + STR_RIDE_NAME_INVERTED_IMPULSE_COASTER = 88, + STR_RIDE_NAME_INVERTED_ROLLER_COASTER = 5, + STR_RIDE_NAME_JUNIOR_ROLLER_COASTER = 6, + STR_RIDE_NAME_LAY_DOWN_ROLLER_COASTER = 64, + STR_RIDE_NAME_LIM_LAUNCHED_ROLLER_COASTER = 92, + STR_RIDE_NAME_LOOPING_ROLLER_COASTER = 17, + STR_RIDE_NAME_MINE_RIDE = 90, + STR_RIDE_NAME_MINE_TRAIN_COASTER = 19, + STR_RIDE_NAME_MINI_ROLLER_COASTER = 89, + STR_RIDE_NAME_MINI_SUSPENDED_COASTER = 9, + STR_RIDE_NAME_MULTI_DIMENSION_ROLLER_COASTER = 57, + STR_RIDE_NAME_REVERSER_ROLLER_COASTER = 67, + STR_RIDE_NAME_REVERSE_FREEFALL_COASTER = 44, + STR_RIDE_NAME_SIDE_FRICTION_ROLLER_COASTER = 55, + STR_RIDE_NAME_SINGLE_RAIL_ROLLER_COASTER = 94, + STR_RIDE_NAME_SPINNING_WILD_MOUSE = 6162, + STR_RIDE_NAME_SPIRAL_ROLLER_COASTER = 2, + STR_RIDE_NAME_STAND_UP_ROLLER_COASTER = 3, + STR_RIDE_NAME_STEEPLECHASE = 12, + STR_RIDE_NAME_SUSPENDED_SWINGING_COASTER = 4, + STR_RIDE_NAME_TWISTER_ROLLER_COASTER = 53, + STR_RIDE_NAME_VERTICAL_DROP_ROLLER_COASTER = 46, + STR_RIDE_NAME_VIRGINIA_REEL = 61, + STR_RIDE_NAME_WATER_COASTER = 76, + STR_RIDE_NAME_WILD_MOUSE = 56, + STR_RIDE_NAME_WOODEN_ROLLER_COASTER = 54, + STR_RIDE_NAME_WOODEN_WILD_MOUSE = 11, + STR_RIDE_DESCRIPTION_AIR_POWERED_VERTICAL_COASTER = 587, + STR_RIDE_DESCRIPTION_ALPINE_COASTER = 605, + STR_RIDE_DESCRIPTION_BOBSLEIGH_COASTER = 525, + STR_RIDE_DESCRIPTION_CLASSIC_MINI_COASTER = 6119, + STR_RIDE_DESCRIPTION_CLASSIC_STAND_UP_ROLLER_COASTER = 607, + STR_RIDE_DESCRIPTION_CLASSIC_WOODEN_ROLLER_COASTER = 606, + STR_RIDE_DESCRIPTION_COMPACT_INVERTED_COASTER = 585, + STR_RIDE_DESCRIPTION_CORKSCREW_ROLLER_COASTER = 531, + STR_RIDE_DESCRIPTION_FLYING_ROLLER_COASTER = 569, + STR_RIDE_DESCRIPTION_GIGA_COASTER = 580, + STR_RIDE_DESCRIPTION_HEARTLINE_TWISTER_COASTER = 578, + STR_RIDE_DESCRIPTION_HYBRID_COASTER = 603, + STR_RIDE_DESCRIPTION_HYPERCOASTER = 6113, + STR_RIDE_DESCRIPTION_HYPER_TWISTER = 563, + STR_RIDE_DESCRIPTION_INVERTED_HAIRPIN_COASTER = 588, + STR_RIDE_DESCRIPTION_INVERTED_IMPULSE_COASTER = 598, + STR_RIDE_DESCRIPTION_INVERTED_ROLLER_COASTER = 515, + STR_RIDE_DESCRIPTION_JUNIOR_ROLLER_COASTER = 516, + STR_RIDE_DESCRIPTION_LAY_DOWN_ROLLER_COASTER = 574, + STR_RIDE_DESCRIPTION_LIM_LAUNCHED_ROLLER_COASTER = 602, + STR_RIDE_DESCRIPTION_LOOPING_ROLLER_COASTER = 527, + STR_RIDE_DESCRIPTION_MINE_RIDE = 600, + STR_RIDE_DESCRIPTION_MINE_TRAIN_COASTER = 529, + STR_RIDE_DESCRIPTION_MINI_ROLLER_COASTER = 599, + STR_RIDE_DESCRIPTION_MINI_SUSPENDED_COASTER = 519, + STR_RIDE_DESCRIPTION_MULTI_DIMENSION_ROLLER_COASTER = 567, + STR_RIDE_DESCRIPTION_REVERSER_ROLLER_COASTER = 577, + STR_RIDE_DESCRIPTION_REVERSE_FREEFALL_COASTER = 554, + STR_RIDE_DESCRIPTION_SIDE_FRICTION_ROLLER_COASTER = 565, + STR_RIDE_DESCRIPTION_SINGLE_RAIL_ROLLER_COASTER = 604, + STR_RIDE_DESCRIPTION_SPINNING_WILD_MOUSE = 6163, + STR_RIDE_DESCRIPTION_SPIRAL_ROLLER_COASTER = 512, + STR_RIDE_DESCRIPTION_STAND_UP_ROLLER_COASTER = 513, + STR_RIDE_DESCRIPTION_STEEPLECHASE = 522, + STR_RIDE_DESCRIPTION_SUSPENDED_SWINGING_COASTER = 514, + STR_RIDE_DESCRIPTION_TWISTER_ROLLER_COASTER = 6116, + STR_RIDE_DESCRIPTION_VERTICAL_DROP_ROLLER_COASTER = 556, + STR_RIDE_DESCRIPTION_VIRGINIA_REEL = 571, + STR_RIDE_DESCRIPTION_WATER_COASTER = 586, + STR_RIDE_DESCRIPTION_WILD_MOUSE = 566, + STR_RIDE_DESCRIPTION_WOODEN_ROLLER_COASTER = 564, + STR_RIDE_DESCRIPTION_WOODEN_WILD_MOUSE = 521, + + // Gentle rides + STR_RIDE_NAME_CAR_RIDE = 13, + STR_RIDE_NAME_CIRCUS = 51, + STR_RIDE_NAME_CROOKED_HOUSE = 73, + STR_RIDE_NAME_DODGEMS = 27, + STR_RIDE_NAME_FERRIS_WHEEL = 39, + STR_RIDE_NAME_FLYING_SAUCERS = 72, + STR_RIDE_NAME_GHOST_TRAIN = 52, + STR_RIDE_NAME_HAUNTED_HOUSE = 49, + STR_RIDE_NAME_MAZE = 22, + STR_RIDE_NAME_MERRY_GO_ROUND = 35, + STR_RIDE_NAME_MINI_GOLF = 69, + STR_RIDE_NAME_MINI_HELICOPTERS = 63, + STR_RIDE_NAME_MONORAIL_CYCLES = 74, + STR_RIDE_NAME_MONSTER_TRUCKS = 6107, + STR_RIDE_NAME_OBSERVATION_TOWER = 16, + STR_RIDE_NAME_SPACE_RINGS = 43, + STR_RIDE_NAME_SPIRAL_SLIDE = 23, + STR_RIDE_DESCRIPTION_CAR_RIDE = 523, + STR_RIDE_DESCRIPTION_CIRCUS = 561, + STR_RIDE_DESCRIPTION_CROOKED_HOUSE = 583, + STR_RIDE_DESCRIPTION_DODGEMS = 537, + STR_RIDE_DESCRIPTION_FERRIS_WHEEL = 549, + STR_RIDE_DESCRIPTION_FLYING_SAUCERS = 582, + STR_RIDE_DESCRIPTION_GHOST_TRAIN = 562, + STR_RIDE_DESCRIPTION_HAUNTED_HOUSE = 559, + STR_RIDE_DESCRIPTION_MAZE = 532, + STR_RIDE_DESCRIPTION_MERRY_GO_ROUND = 545, + STR_RIDE_DESCRIPTION_MINI_GOLF = 579, + STR_RIDE_DESCRIPTION_MINI_HELICOPTERS = 573, + STR_RIDE_DESCRIPTION_MONORAIL_CYCLES = 584, + STR_RIDE_DESCRIPTION_MONSTER_TRUCKS = 6115, + STR_RIDE_DESCRIPTION_OBSERVATION_TOWER = 526, + STR_RIDE_DESCRIPTION_SPACE_RINGS = 553, + STR_RIDE_DESCRIPTION_SPIRAL_SLIDE = 533, + + // Shops + STR_RIDE_NAME_CASH_MACHINE = 47, + STR_RIDE_NAME_DRINK_STALL = 32, + STR_RIDE_NAME_FIRST_AID = 50, + STR_RIDE_NAME_FOOD_STALL = 30, + STR_RIDE_NAME_INFORMATION_KIOSK = 37, + STR_RIDE_NAME_SHOP = 34, + STR_RIDE_NAME_TOILETS = 38, + STR_RIDE_DESCRIPTION_CASH_MACHINE = 557, + STR_RIDE_DESCRIPTION_DRINK_STALL = 542, + STR_RIDE_DESCRIPTION_FIRST_AID = 560, + STR_RIDE_DESCRIPTION_FOOD_STALL = 540, + STR_RIDE_DESCRIPTION_INFORMATION_KIOSK = 547, + STR_RIDE_DESCRIPTION_SHOP = 544, + STR_RIDE_DESCRIPTION_TOILETS = 548, + + // Thrill rides + STR_RIDE_NAME_3D_CINEMA = 41, + STR_RIDE_NAME_ENTERPRISE = 83, + STR_RIDE_NAME_GO_KARTS = 24, + STR_RIDE_NAME_LAUNCHED_FREEFALL = 14, + STR_RIDE_NAME_MAGIC_CARPET = 79, + STR_RIDE_NAME_MOTION_SIMULATOR = 40, + STR_RIDE_NAME_ROTO_DROP = 71, + STR_RIDE_NAME_SWINGING_INVERTER_SHIP = 29, + STR_RIDE_NAME_SWINGING_SHIP = 28, + STR_RIDE_NAME_TOP_SPIN = 42, + STR_RIDE_NAME_TWIST = 48, + STR_RIDE_DESCRIPTION_3D_CINEMA = 551, + STR_RIDE_DESCRIPTION_ENTERPRISE = 593, + STR_RIDE_DESCRIPTION_GO_KARTS = 534, + STR_RIDE_DESCRIPTION_LAUNCHED_FREEFALL = 524, + STR_RIDE_DESCRIPTION_MAGIC_CARPET = 589, + STR_RIDE_DESCRIPTION_MOTION_SIMULATOR = 550, + STR_RIDE_DESCRIPTION_ROTO_DROP = 581, + STR_RIDE_DESCRIPTION_SWINGING_INVERTER_SHIP = 539, + STR_RIDE_DESCRIPTION_SWINGING_SHIP = 538, + STR_RIDE_DESCRIPTION_TOP_SPIN = 552, + STR_RIDE_DESCRIPTION_TWIST = 558, + + // Transport rides + STR_RIDE_NAME_CHAIRLIFT = 20, + STR_RIDE_NAME_LIFT = 45, + STR_RIDE_NAME_MINIATURE_RAILWAY = 7, + STR_RIDE_NAME_MONORAIL = 8, + STR_RIDE_NAME_SUSPENDED_MONORAIL = 65, + STR_RIDE_DESCRIPTION_CHAIRLIFT = 530, + STR_RIDE_DESCRIPTION_LIFT = 555, + STR_RIDE_DESCRIPTION_MINIATURE_RAILWAY = 517, + STR_RIDE_DESCRIPTION_MONORAIL = 518, + STR_RIDE_DESCRIPTION_SUSPENDED_MONORAIL = 575, + + // Water rides + STR_RIDE_NAME_BOAT_HIRE = 10, + STR_RIDE_NAME_DINGHY_SLIDE = 18, + STR_RIDE_NAME_LOG_FLUME = 25, + STR_RIDE_NAME_RIVER_RAFTS = 81, + STR_RIDE_NAME_RIVER_RAPIDS = 26, + STR_RIDE_NAME_SPLASH_BOATS = 62, + STR_RIDE_NAME_SUBMARINE_RIDE = 80, + STR_RIDE_DESCRIPTION_BOAT_HIRE = 520, + STR_RIDE_DESCRIPTION_DINGHY_SLIDE = 528, + STR_RIDE_DESCRIPTION_LOG_FLUME = 535, + STR_RIDE_DESCRIPTION_RIVER_RAFTS = 591, + STR_RIDE_DESCRIPTION_RIVER_RAPIDS = 536, + STR_RIDE_DESCRIPTION_SPLASH_BOATS = 572, + STR_RIDE_DESCRIPTION_SUBMARINE_RIDE = 590, +}; diff --git a/src/openrct2/ride/ShopItem.h b/src/openrct2/ride/ShopItem.h index 9aa53277c5..078084e4be 100644 --- a/src/openrct2/ride/ShopItem.h +++ b/src/openrct2/ride/ShopItem.h @@ -10,6 +10,7 @@ #pragma once #include "../common.h" +#include "../core/Money.hpp" #include "../entity/Litter.h" #include "../util/Util.h" diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index c660cec881..d4b6d6df4b 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -20,6 +20,7 @@ #include "../network/network.h" #include "../platform/Platform.h" #include "../rct1/RCT1.h" +#include "../ride/RideColour.h" #include "../util/SawyerCoding.h" #include "../util/Util.h" #include "../world/Footpath.h" @@ -123,7 +124,7 @@ ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, int32 if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION)) { - if (ride->num_stations >= Limits::MaxStationsPerRide) + if (ride->num_stations >= Limits::kMaxStationsPerRide) { return { false, STR_NO_MORE_STATIONS_ALLOWED_ON_THIS_RIDE }; } @@ -192,7 +193,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::MaxStationsPerRide && !fromTrackDesign) + if (stationBackLoc == stationFrontLoc && ride->num_stations >= Limits::kMaxStationsPerRide && !fromTrackDesign) { return { false, STR_NO_MORE_STATIONS_ALLOWED_ON_THIS_RIDE }; } @@ -329,7 +330,8 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn if (!(flags & GAME_COMMAND_FLAG_APPLY)) { - if ((removeLoc != stationBackLoc) && (removeLoc != stationFrontLoc) && ride->num_stations >= Limits::MaxStationsPerRide) + if ((removeLoc != stationBackLoc) && (removeLoc != stationFrontLoc) + && ride->num_stations >= Limits::kMaxStationsPerRide) { return { false, STR_NO_MORE_STATIONS_ALLOWED_ON_THIS_RIDE }; } @@ -893,10 +895,10 @@ uint8_t TrackElement::GetColourScheme() const return URide.ColourScheme & TRACK_ELEMENT_COLOUR_SCHEME_MASK; } -void TrackElement::SetColourScheme(uint8_t newColourScheme) +void TrackElement::SetColourScheme(RideColourScheme newColourScheme) { URide.ColourScheme &= ~TRACK_ELEMENT_COLOUR_SCHEME_MASK; - URide.ColourScheme |= (newColourScheme & TRACK_ELEMENT_COLOUR_SCHEME_MASK); + URide.ColourScheme |= (EnumValue(newColourScheme) & TRACK_ELEMENT_COLOUR_SCHEME_MASK); } bool TrackElement::HasCableLift() const diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index 52f393a714..fd67b01ed3 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -22,7 +22,7 @@ constexpr uint8_t kRCT2DefaultBlockBrakeSpeed = 2; constexpr int32_t kBlockBrakeBaseSpeed = 0x20364; constexpr int32_t kBlockBrakeSpeedOffset = kBlockBrakeBaseSpeed - (kRCT2DefaultBlockBrakeSpeed << 16); -constexpr uint8_t kMaximumBrakeSpeed = 30; +constexpr uint8_t kMaximumTrackSpeed = 30; using track_type_t = uint16_t; diff --git a/src/openrct2/ride/TrackData.h b/src/openrct2/ride/TrackData.h index a4f432a8d5..bd5594b03f 100644 --- a/src/openrct2/ride/TrackData.h +++ b/src/openrct2/ride/TrackData.h @@ -11,7 +11,6 @@ #include "../common.h" #include "Track.h" -#include "TrackPaint.h" constexpr uint8_t MaxSequencesPerPiece = 16; diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index b44bd1d774..970af8f1a9 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -58,6 +58,7 @@ #include "../world/Scenery.h" #include "../world/Surface.h" #include "../world/Wall.h" +#include "../world/tile_element/Slope.h" #include "Ride.h" #include "RideData.h" #include "Track.h" @@ -69,6 +70,20 @@ #include #include +namespace TrackDesignSceneryElementFlags +{ + static constexpr uint8_t kRotationMask = 0b00000011; + + static constexpr uint8_t kQuadrantMask = 0b00001100; + + static constexpr uint8_t kEdgesMask = 0b00001111; + static constexpr uint8_t kHasSlopeMask = 0b00010000; + static constexpr uint8_t kSlopeDirectionMask = 0b01100000; + static constexpr uint8_t kIsQueueMask = 0b10000000; +} // namespace TrackDesignSceneryElementFlags + +using namespace TrackDesignSceneryElementFlags; + using namespace OpenRCT2; using namespace OpenRCT2::Drawing; using namespace OpenRCT2::TrackMetaData; @@ -94,7 +109,7 @@ static u8string_view TrackDesignGetStationObjectIdentifier(const Ride& ride) ResultWithMessage TrackDesign::CreateTrackDesign(TrackDesignState& tds, const Ride& ride) { - type = ride.type; + trackAndVehicle.rtdIndex = ride.type; auto object = ObjectEntryGetObject(ObjectType::Ride, ride.subtype); if (object != nullptr) @@ -105,62 +120,48 @@ ResultWithMessage TrackDesign::CreateTrackDesign(TrackDesignState& tds, const Ri { return { false, STR_VEHICLE_UNSUPPORTED_TD6 }; } - vehicle_object = ObjectEntryDescriptor(entry); + trackAndVehicle.vehicleObject = ObjectEntryDescriptor(entry); } - ride_mode = ride.mode; - colour_scheme = ride.colour_scheme_type & 3; + operation.rideMode = ride.mode; + appearance.vehicleColourSettings = ride.vehicleColourSettings; - for (size_t i = 0; i < std::size(vehicle_colours); i++) + for (size_t i = 0; i < std::size(appearance.vehicleColours); i++) { - vehicle_colours[i] = ride.vehicle_colours[i]; + appearance.vehicleColours[i] = ride.vehicle_colours[i]; } - for (int32_t i = 0; i < OpenRCT2::Limits::NumColourSchemes; i++) + for (size_t i = 0; i < std::min(std::size(ride.track_colour), std::size(appearance.trackColours)); i++) { - track_spine_colour[i] = ride.track_colour[i].main; - track_rail_colour[i] = ride.track_colour[i].additional; - track_support_colour[i] = ride.track_colour[i].supports; + appearance.trackColours[i] = ride.track_colour[i]; } - depart_flags = ride.depart_flags; - number_of_trains = ride.NumTrains; - number_of_cars_per_train = ride.num_cars_per_train; - min_waiting_time = ride.min_waiting_time; - max_waiting_time = ride.max_waiting_time; - operation_setting = ride.operation_option; - lift_hill_speed = ride.lift_hill_speed; - num_circuits = ride.num_circuits; + 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; - StationObjectIdentifier = TrackDesignGetStationObjectIdentifier(ride); - max_speed = static_cast(ride.max_speed / 65536); - average_speed = static_cast(ride.average_speed / 65536); - ride_length = ride.GetTotalLength() / 65536; - max_positive_vertical_g = ride.max_positive_vertical_g / 32; - max_negative_vertical_g = ride.max_negative_vertical_g / 32; - max_lateral_g = ride.max_lateral_g / 32; - holes = ride.holes & 0x1F; - inversions = ride.inversions & 0x1F; - inversions |= (ride.sheltered_eighths << 5); - drops = ride.drops; - highest_drop_height = ride.highest_drop_height; + appearance.stationObjectIdentifier = TrackDesignGetStationObjectIdentifier(ride); + statistics.maxSpeed = static_cast(ride.max_speed / 65536); + statistics.averageSpeed = static_cast(ride.average_speed / 65536); + statistics.rideLength = ride.GetTotalLength() / 65536; + statistics.maxPositiveVerticalG = ride.max_positive_vertical_g; + statistics.maxNegativeVerticalG = ride.max_negative_vertical_g; + statistics.maxLateralG = ride.max_lateral_g; + statistics.inversions = ride.inversions; + statistics.holes = ride.holes; + statistics.drops = ride.getNumDrops(); + statistics.highestDropHeight = ride.highest_drop_height; + statistics.totalAirTime = ride.totalAirTime; - uint16_t totalAirTime = (ride.total_air_time * 123) / 1024; - if (totalAirTime > 255) - { - totalAirTime = 0; - } - total_air_time = static_cast(totalAirTime); + statistics.ratings = ride.ratings; + statistics.upkeepCost = ride.upkeep_cost; - excitement = ride.ratings.Excitement / 10; - intensity = ride.ratings.Intensity / 10; - nausea = ride.ratings.Nausea / 10; - - upkeep_cost = ride.upkeep_cost; - flags = 0; - flags2 = 0; - - const auto& rtd = GetRideTypeDescriptor(type); + const auto& rtd = GetRideTypeDescriptor(trackAndVehicle.rtdIndex); if (rtd.DesignCreateMode == TrackDesignCreateMode::Maze) { @@ -208,7 +209,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con TileElement* initialMap = trackElement.element; CoordsXYZ startPos = { trackElement.x, trackElement.y, z + trackCoordinates->z_begin - trackBlock->z }; - tds.Origin = startPos; + tds.origin = startPos; do { @@ -221,27 +222,27 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con } TrackDesignTrackElement track{}; - track.Type = element->GetTrackType(); - track.ColourScheme = element->GetColourScheme(); - track.StationIndex = element->GetStationIndex(); - track.BrakeBoosterSpeed = element->GetBrakeBoosterSpeed(); - track.SeatRotation = element->GetSeatRotation(); + track.type = element->GetTrackType(); + track.colourScheme = element->GetColourScheme(); + track.stationIndex = element->GetStationIndex(); + track.brakeBoosterSpeed = element->GetBrakeBoosterSpeed(); + track.seatRotation = element->GetSeatRotation(); // This warning will not apply to new track design format - if (track.Type == TrackElemType::BlockBrakes && element->GetBrakeBoosterSpeed() != kRCT2DefaultBlockBrakeSpeed) + if (track.type == TrackElemType::BlockBrakes && element->GetBrakeBoosterSpeed() != kRCT2DefaultBlockBrakeSpeed) { warningMessage = STR_TRACK_DESIGN_BLOCK_BRAKE_SPEED_RESET; } if (element->HasChain()) - track.SetFlag(TrackDesignTrackElementFlag::HasChain); + track.SetFlag(TrackDesignTrackElementFlag::hasChain); if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE) && element->IsInverted()) { - track.SetFlag(TrackDesignTrackElementFlag::IsInverted); + track.SetFlag(TrackDesignTrackElementFlag::isInverted); } - track_elements.push_back(track); + trackElements.push_back(track); if (!TrackBlockGetNext(&trackElement, &trackElement, nullptr, nullptr)) { @@ -261,7 +262,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con trackElement.x = newCoords->x; trackElement.y = newCoords->y; - if (track_elements.size() > RCT2::Limits::TD6MaxTrackElements) + if (trackElements.size() > RCT2::Limits::kTD6MaxTrackElements) { return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } @@ -309,11 +310,11 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con entranceDirection -= _saveDirection; entranceDirection &= kTileElementDirectionMask; - mapLocation -= tds.Origin; + mapLocation -= tds.origin; // Rotate entrance coordinates backwards to the correct direction auto rotatedMapLocation = TileCoordsXY(mapLocation.Rotate(0 - _saveDirection)); - z -= tds.Origin.z; + z -= tds.origin.z; z /= COORDS_Z_STEP; if (z > 127 || z < -126) @@ -322,28 +323,27 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con } TrackDesignEntranceElement entrance{}; - entrance.Location = TileCoordsXYZD(rotatedMapLocation, z, entranceDirection); + entrance.location = TileCoordsXYZD(rotatedMapLocation, z, entranceDirection); // If this is the exit version if (i == 1) { - entrance.IsExit = true; + entrance.isExit = true; } - entrance_elements.push_back(entrance); + entranceElements.push_back(entrance); } } - TrackDesignPreviewDrawOutlines(tds, this, RideGetTemporaryForPreview(), { 4096, 4096, 0, _currentTrackPieceDirection }); + TrackDesignPreviewDrawOutlines(tds, *this, RideGetTemporaryForPreview(), { 4096, 4096, 0, _currentTrackPieceDirection }); // Resave global vars for scenery reasons. - tds.Origin = startPos; + tds.origin = startPos; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; gMapSelectFlags &= ~MAP_SELECT_FLAG_GREEN; - space_required_x = ((tds.PreviewMax.x - tds.PreviewMin.x) / 32) + 1; - space_required_y = ((tds.PreviewMax.y - tds.PreviewMin.y) / 32) + 1; + statistics.spaceRequired = TileCoordsXY(tds.previewMax - tds.previewMin) + TileCoordsXY{ 1, 1 }; return { true, warningMessage }; } @@ -356,7 +356,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } - tds.Origin = { startLoc.x, startLoc.y, startLoc.element->GetBaseZ() }; + tds.origin = { startLoc.x, startLoc.y, startLoc.element->GetBaseZ() }; // x is defined here as we can start the search // on tile start_x, start_y but then the next row @@ -377,13 +377,13 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons TrackDesignMazeElement maze{}; - maze.maze_entry = tileElement->AsTrack()->GetMazeEntry(); - maze.x = (x - startLoc.x) / COORDS_XY_STEP; - maze.y = (y - startLoc.y) / COORDS_XY_STEP; + maze.mazeEntry = tileElement->AsTrack()->GetMazeEntry(); + maze.location.x = (x - startLoc.x) / COORDS_XY_STEP; + maze.location.y = (y - startLoc.y) / COORDS_XY_STEP; _saveDirection = tileElement->GetDirection(); - maze_elements.push_back(maze); + mazeElements.push_back(maze); - if (maze_elements.size() >= 2000) + if (mazeElements.size() >= 2000) { return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } @@ -415,9 +415,9 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons auto entranceOffset = entranceLoc - startLoc; TrackDesignEntranceElement mazeEntrance{}; - mazeEntrance.Location = TileCoordsXYZD(CoordsXYZD(entranceOffset, 0, tileElement->GetDirection())); - mazeEntrance.IsExit = false; - entrance_elements.push_back(mazeEntrance); + mazeEntrance.location = TileCoordsXYZD(CoordsXYZD(entranceOffset, 0, tileElement->GetDirection())); + mazeEntrance.isExit = false; + entranceElements.push_back(mazeEntrance); location = ride.GetStation().Exit; if (location.IsNull()) @@ -442,21 +442,21 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons auto exitOffset = exitLoc - startLoc; TrackDesignEntranceElement mazeExit{}; - mazeExit.Location = TileCoordsXYZD(CoordsXYZD(exitOffset, 0, tileElement->GetDirection())); - mazeExit.IsExit = true; - entrance_elements.push_back(mazeExit); + mazeExit.location = TileCoordsXYZD(CoordsXYZD(exitOffset, 0, tileElement->GetDirection())); + mazeExit.isExit = true; + entranceElements.push_back(mazeExit); // Save global vars as they are still used by scenery???? - int32_t startZ = tds.Origin.z; - TrackDesignPreviewDrawOutlines(tds, this, RideGetTemporaryForPreview(), { 4096, 4096, 0, _currentTrackPieceDirection }); - tds.Origin = { startLoc.x, startLoc.y, startZ }; + int32_t startZ = tds.origin.z; + TrackDesignPreviewDrawOutlines(tds, *this, RideGetTemporaryForPreview(), { 4096, 4096, 0, _currentTrackPieceDirection }); + tds.origin = { startLoc.x, startLoc.y, startZ }; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; gMapSelectFlags &= ~MAP_SELECT_FLAG_GREEN; - space_required_x = ((tds.PreviewMax.x - tds.PreviewMin.x) / 32) + 1; - space_required_y = ((tds.PreviewMax.y - tds.PreviewMin.y) / 32) + 1; + statistics.spaceRequired = TileCoordsXY(tds.previewMax - tds.previewMin) + TileCoordsXY{ 1, 1 }; + return { true }; } @@ -488,53 +488,40 @@ CoordsXYE TrackDesign::MazeGetFirstElement(const Ride& ride) ResultWithMessage TrackDesign::CreateTrackDesignScenery(TrackDesignState& tds) { - scenery_elements = _trackSavedTileElementsDesc; + sceneryElements = _trackSavedTileElementsDesc; // Run an element loop - for (auto& scenery : scenery_elements) + for (auto& scenery : sceneryElements) { - switch (scenery.scenery_object.GetType()) + switch (scenery.sceneryObject.GetType()) { case ObjectType::Paths: { - uint8_t slope = (scenery.flags & 0x60) >> 5; - slope -= _saveDirection; + uint8_t slope = (scenery.getSlopeDirection() - _saveDirection) % kNumOrthogonalDirections; + scenery.setSlopeDirection(slope); - scenery.flags &= 0x9F; - scenery.flags |= ((slope & 3) << 5); - - // Direction of connection on path - uint8_t direction = scenery.flags & 0xF; - // Rotate the direction by the track direction - direction = ((direction << 4) >> _saveDirection); - - scenery.flags &= 0xF0; - scenery.flags |= (direction & 0xF) | (direction >> 4); + uint8_t edges = Numerics::ror4(scenery.getEdges(), _saveDirection); + scenery.setEdges(edges); break; } case ObjectType::Walls: { - uint8_t direction = scenery.flags & 3; - direction -= _saveDirection; - - scenery.flags &= 0xFC; - scenery.flags |= (direction & 3); + auto direction = (scenery.getRotation() - _saveDirection) % kNumOrthogonalDirections; + scenery.setRotation(direction); break; } default: { - uint8_t direction = scenery.flags & 3; - uint8_t quadrant = (scenery.flags & 0x0C) >> 2; + auto direction = (scenery.getRotation() - _saveDirection) % kNumOrthogonalDirections; + scenery.setRotation(direction); - direction -= _saveDirection; - quadrant -= _saveDirection; + auto quadrant = (scenery.getQuadrant() - _saveDirection) % kNumOrthogonalDirections; + scenery.setQuadrant(quadrant); - scenery.flags &= 0xF0; - scenery.flags |= (direction & 3) | ((quadrant & 3) << 2); break; } } - const auto relativeMapPosition = scenery.loc - tds.Origin; + const auto relativeMapPosition = scenery.loc - tds.origin; const CoordsXY rotatedRelativeMapPos = relativeMapPosition.Rotate(0 - _saveDirection); if (rotatedRelativeMapPos.x > 127 * COORDS_XY_STEP || rotatedRelativeMapPos.y > 127 * COORDS_XY_STEP @@ -557,57 +544,50 @@ void TrackDesign::Serialise(DataSerialiser& stream) { if (stream.IsLogging()) { - stream << DS_TAG(name); + stream << DS_TAG(gameStateData.name); // There is too much information logged. // See sub actions for this information if required. return; } - stream << DS_TAG(type); - stream << DS_TAG(vehicle_type); - stream << DS_TAG(cost); - stream << DS_TAG(flags); - stream << DS_TAG(ride_mode); - stream << DS_TAG(track_flags); - stream << DS_TAG(colour_scheme); - stream << DS_TAG(vehicle_colours); - stream << DS_TAG(StationObjectIdentifier); - stream << DS_TAG(total_air_time); - stream << DS_TAG(depart_flags); - stream << DS_TAG(number_of_trains); - stream << DS_TAG(number_of_cars_per_train); - stream << DS_TAG(min_waiting_time); - stream << DS_TAG(max_waiting_time); - stream << DS_TAG(operation_setting); - stream << DS_TAG(max_speed); - stream << DS_TAG(average_speed); - stream << DS_TAG(ride_length); - stream << DS_TAG(max_positive_vertical_g); - stream << DS_TAG(max_negative_vertical_g); - stream << DS_TAG(max_lateral_g); - stream << DS_TAG(inversions); - stream << DS_TAG(holes); - stream << DS_TAG(drops); - stream << DS_TAG(highest_drop_height); - stream << DS_TAG(excitement); - stream << DS_TAG(intensity); - stream << DS_TAG(nausea); - stream << DS_TAG(upkeep_cost); - stream << DS_TAG(track_spine_colour); - stream << DS_TAG(track_rail_colour); - stream << DS_TAG(track_support_colour); - stream << DS_TAG(flags2); - stream << DS_TAG(vehicle_object); - stream << DS_TAG(space_required_x); - stream << DS_TAG(space_required_y); - stream << DS_TAG(lift_hill_speed); - stream << DS_TAG(num_circuits); + stream << DS_TAG(trackAndVehicle.rtdIndex); + stream << DS_TAG(gameStateData.cost); + stream << DS_TAG(operation.rideMode); + stream << DS_TAG(gameStateData.flags); + stream << DS_TAG(appearance.vehicleColourSettings); + stream << DS_TAG(appearance.vehicleColours); + stream << DS_TAG(appearance.stationObjectIdentifier); + stream << DS_TAG(statistics.totalAirTime); + stream << DS_TAG(operation.departFlags); + stream << DS_TAG(trackAndVehicle.numberOfTrains); + stream << DS_TAG(trackAndVehicle.numberOfCarsPerTrain); + stream << DS_TAG(operation.minWaitingTime); + stream << DS_TAG(operation.maxWaitingTime); + stream << DS_TAG(operation.operationSetting); + stream << DS_TAG(statistics.maxSpeed); + stream << DS_TAG(statistics.averageSpeed); + stream << DS_TAG(statistics.rideLength); + stream << DS_TAG(statistics.maxPositiveVerticalG); + stream << DS_TAG(statistics.maxNegativeVerticalG); + stream << DS_TAG(statistics.maxLateralG); + stream << DS_TAG(statistics.inversions); + stream << DS_TAG(statistics.holes); + stream << DS_TAG(statistics.drops); + stream << DS_TAG(statistics.highestDropHeight); + stream << DS_TAG(statistics.ratings); + stream << DS_TAG(statistics.upkeepCost); + stream << DS_TAG(appearance.trackColours); + stream << DS_TAG(trackAndVehicle.vehicleObject); + stream << DS_TAG(statistics.spaceRequired.x); + stream << DS_TAG(statistics.spaceRequired.y); + stream << DS_TAG(operation.liftHillSpeed); + stream << DS_TAG(operation.numCircuits); - stream << DS_TAG(maze_elements); - stream << DS_TAG(track_elements); - stream << DS_TAG(entrance_elements); - stream << DS_TAG(scenery_elements); + stream << DS_TAG(mazeElements); + stream << DS_TAG(trackElements); + stream << DS_TAG(entranceElements); + stream << DS_TAG(sceneryElements); - stream << DS_TAG(name); + stream << DS_TAG(gameStateData.name); } std::unique_ptr TrackDesignImport(const utf8* path) @@ -630,23 +610,23 @@ std::unique_ptr TrackDesignImport(const utf8* path) * * rct2: 0x006ABDB0 */ -static void TrackDesignLoadSceneryObjects(TrackDesign* td6) +static void TrackDesignLoadSceneryObjects(const TrackDesign& td) { auto& objectManager = OpenRCT2::GetContext()->GetObjectManager(); objectManager.UnloadAllTransient(); // Load ride object - if (td6->vehicle_object.HasValue()) + if (td.trackAndVehicle.vehicleObject.HasValue()) { - objectManager.LoadObject(td6->vehicle_object); + objectManager.LoadObject(td.trackAndVehicle.vehicleObject); } // Load scenery objects - for (const auto& scenery : td6->scenery_elements) + for (const auto& scenery : td.sceneryElements) { - if (scenery.scenery_object.HasValue()) + if (scenery.sceneryObject.HasValue()) { - objectManager.LoadObject(scenery.scenery_object); + objectManager.LoadObject(scenery.sceneryObject); } } } @@ -699,13 +679,13 @@ static std::optional TrackDesignPlaceSceneryElementGetEntry(c TrackSceneryEntry result; auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager(); - if (scenery.scenery_object.GetType() == ObjectType::Paths) + if (scenery.sceneryObject.GetType() == ObjectType::Paths) { - auto footpathMapping = RCT2::GetFootpathSurfaceId(scenery.scenery_object, true, scenery.IsQueue()); + auto footpathMapping = RCT2::GetFootpathSurfaceId(scenery.sceneryObject, true, scenery.isQueue()); if (footpathMapping == nullptr) { // Check if legacy path object is loaded - auto obj = objectMgr.GetLoadedObject(scenery.scenery_object); + auto obj = objectMgr.GetLoadedObject(scenery.sceneryObject); if (obj != nullptr) { result.Type = obj->GetObjectType(); @@ -720,12 +700,12 @@ static std::optional TrackDesignPlaceSceneryElementGetEntry(c { result.Type = ObjectType::FootpathSurface; result.Index = objectMgr.GetLoadedObjectEntryIndex( - ObjectEntryDescriptor(scenery.IsQueue() ? footpathMapping->QueueSurface : footpathMapping->NormalSurface)); + ObjectEntryDescriptor(scenery.isQueue() ? footpathMapping->QueueSurface : footpathMapping->NormalSurface)); result.SecondaryIndex = objectMgr.GetLoadedObjectEntryIndex(ObjectEntryDescriptor(footpathMapping->Railing)); } if (result.Index == OBJECT_ENTRY_INDEX_NULL) - result.Index = TrackDesignGetDefaultSurfaceIndex(scenery.IsQueue()); + result.Index = TrackDesignGetDefaultSurfaceIndex(scenery.isQueue()); if (result.SecondaryIndex == OBJECT_ENTRY_INDEX_NULL) result.SecondaryIndex = TrackDesignGetDefaultRailingIndex(); @@ -737,7 +717,7 @@ static std::optional TrackDesignPlaceSceneryElementGetEntry(c } else { - auto obj = objectMgr.GetLoadedObject(scenery.scenery_object); + auto obj = objectMgr.GetLoadedObject(scenery.sceneryObject); bool objectUnavailable = obj == nullptr; if (obj != nullptr) { @@ -761,10 +741,10 @@ static std::optional TrackDesignPlaceSceneryElementGetEntry(c * * rct2: 0x006D247A */ -static void TrackDesignMirrorScenery(TrackDesign* td6) +static void TrackDesignMirrorScenery(TrackDesign& td) { auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager(); - for (auto& scenery : td6->scenery_elements) + for (auto& scenery : td.sceneryElements) { auto entryInfo = TrackDesignPlaceSceneryElementGetEntry(scenery); if (!entryInfo) @@ -797,7 +777,7 @@ static void TrackDesignMirrorScenery(TrackDesign* td6) } } - switch (scenery.flags & 3) + switch (scenery.getRotation()) { case 0: scenery.loc.y = -(scenery.loc.y + y1) - y2; @@ -805,7 +785,6 @@ static void TrackDesignMirrorScenery(TrackDesign* td6) case 1: scenery.loc.x = scenery.loc.x + y2 + y1; scenery.loc.y = -scenery.loc.y; - scenery.flags ^= (1 << 1); break; case 2: scenery.loc.y = -(scenery.loc.y - y2) + y1; @@ -813,9 +792,9 @@ static void TrackDesignMirrorScenery(TrackDesign* td6) case 3: scenery.loc.x = scenery.loc.x - y2 - y1; scenery.loc.y = -scenery.loc.y; - scenery.flags ^= (1 << 1); break; } + scenery.setRotation(DirectionFlipXAxis(scenery.getRotation())); break; } case ObjectType::SmallScenery: @@ -825,28 +804,22 @@ static void TrackDesignMirrorScenery(TrackDesign* td6) if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_DIAGONAL)) { - scenery.flags ^= (1 << 0); + scenery.setRotation(scenery.getRotation() ^ (1 << 0)); if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE)) { - scenery.flags ^= (1 << 2); + scenery.setQuadrant(scenery.getQuadrant() ^ (1 << 0)); } break; } - if (scenery.flags & (1 << 0)) - { - scenery.flags ^= (1 << 1); - } - scenery.flags ^= (1 << 2); + scenery.setRotation(DirectionFlipXAxis(scenery.getRotation())); + scenery.setQuadrant(scenery.getQuadrant() ^ (1 << 0)); break; } case ObjectType::Walls: { scenery.loc.y = -scenery.loc.y; - if (scenery.flags & (1 << 0)) - { - scenery.flags ^= (1 << 1); - } + scenery.setRotation(DirectionFlipXAxis(scenery.getRotation())); break; } case ObjectType::Paths: @@ -854,15 +827,14 @@ static void TrackDesignMirrorScenery(TrackDesign* td6) { scenery.loc.y = -scenery.loc.y; - if (scenery.flags & (1 << 5)) + if (scenery.hasSlope()) { - scenery.flags ^= (1 << 6); + scenery.setSlopeDirection(DirectionFlipXAxis(scenery.getSlopeDirection())); } - uint8_t flags = scenery.flags; - flags = ((flags & (1 << 3)) >> 2) | ((flags & (1 << 1)) << 2); - scenery.flags &= 0xF5; - scenery.flags |= flags; + uint8_t edges = scenery.getEdges(); + edges = ((edges & 0b1000) >> 2) | ((edges & 0b0010) << 2) | (edges & 0b0101); + scenery.setEdges(edges); break; } default: @@ -873,12 +845,12 @@ static void TrackDesignMirrorScenery(TrackDesign* td6) static void TrackDesignMirrorEntrances(TrackDesign& td) { - for (auto& entrance : td.entrance_elements) + for (auto& entrance : td.entranceElements) { - entrance.Location.y = -entrance.Location.y; - if (entrance.Location.direction & 1) + entrance.location.y = -entrance.location.y; + if (entrance.location.direction & 1) { - entrance.Location.direction = DirectionReverse(entrance.Location.direction); + entrance.location.direction = DirectionReverse(entrance.location.direction); } } } @@ -887,12 +859,12 @@ static void TrackDesignMirrorEntrances(TrackDesign& td) * * rct2: 0x006D2443 */ -static void TrackDesignMirrorRide(TrackDesign* td6) +static void TrackDesignMirrorRide(TrackDesign& td) { - for (auto& track : td6->track_elements) + for (auto& track : td.trackElements) { - const auto& ted = GetTrackElementDescriptor(track.Type); - track.Type = ted.MirrorElement; + const auto& ted = GetTrackElementDescriptor(track.type); + track.type = ted.MirrorElement; } } @@ -905,20 +877,20 @@ static constexpr uint8_t maze_segment_mirror_map[] = { * * rct2: 0x006D25FA */ -static void TrackDesignMirrorMaze(TrackDesign* td6) +static void TrackDesignMirrorMaze(TrackDesign& td) { - for (auto& maze : td6->maze_elements) + for (auto& maze : td.mazeElements) { - maze.y = -maze.y; + maze.location.y = -maze.location.y; - uint16_t maze_entry = maze.maze_entry; - uint16_t new_entry = 0; - for (uint8_t position = UtilBitScanForward(maze_entry); position != 0xFF; position = UtilBitScanForward(maze_entry)) + auto mazeEntry = maze.mazeEntry; + uint16_t newEntry = 0; + for (uint8_t position = UtilBitScanForward(mazeEntry); position != 0xFF; position = UtilBitScanForward(mazeEntry)) { - maze_entry &= ~(1 << position); - new_entry |= (1 << maze_segment_mirror_map[position]); + mazeEntry &= ~(1 << position); + newEntry |= (1 << maze_segment_mirror_map[position]); } - maze.maze_entry = new_entry; + maze.mazeEntry = newEntry; } } @@ -926,19 +898,19 @@ static void TrackDesignMirrorMaze(TrackDesign* td6) * * rct2: 0x006D2436 */ -void TrackDesignMirror(TrackDesign* td6) +void TrackDesignMirror(TrackDesign& td) { - const auto& rtd = GetRideTypeDescriptor(td6->type); + const auto& rtd = GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - TrackDesignMirrorMaze(td6); + TrackDesignMirrorMaze(td); } else { - TrackDesignMirrorRide(td6); + TrackDesignMirrorRide(td); } - TrackDesignMirrorEntrances(*td6); - TrackDesignMirrorScenery(td6); + TrackDesignMirrorEntrances(td); + TrackDesignMirrorScenery(td); } static void TrackDesignAddSelectedTile(const CoordsXY& coords) @@ -952,10 +924,10 @@ static void TrackDesignAddSelectedTile(const CoordsXY& coords) static void TrackDesignUpdatePreviewBounds(TrackDesignState& tds, const CoordsXYZ& coords) { - tds.PreviewMin = { std::min(tds.PreviewMin.x, coords.x), std::min(tds.PreviewMin.y, coords.y), - std::min(tds.PreviewMin.z, coords.z) }; - tds.PreviewMax = { std::max(tds.PreviewMax.x, coords.x), std::max(tds.PreviewMax.y, coords.y), - std::max(tds.PreviewMax.z, coords.z) }; + tds.previewMin = { std::min(tds.previewMin.x, coords.x), std::min(tds.previewMin.y, coords.y), + std::min(tds.previewMin.z, coords.z) }; + tds.previewMax = { std::max(tds.previewMax.x, coords.x), std::max(tds.previewMax.y, coords.y), + std::max(tds.previewMax.z, coords.z) }; } static GameActions::Result TrackDesignPlaceSceneryElementRemoveGhost( @@ -973,7 +945,7 @@ static GameActions::Result TrackDesignPlaceSceneryElementRemoveGhost( } int32_t z = scenery.loc.z + originZ; - uint8_t sceneryRotation = (rotation + scenery.flags) & kTileElementDirectionMask; + uint8_t sceneryRotation = (rotation + scenery.getRotation()) & kTileElementDirectionMask; const uint32_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; std::unique_ptr ga; @@ -981,7 +953,7 @@ static GameActions::Result TrackDesignPlaceSceneryElementRemoveGhost( { case ObjectType::SmallScenery: { - uint8_t quadrant = (scenery.flags >> 2) + _currentTrackPieceDirection; + uint8_t quadrant = scenery.getQuadrant() + _currentTrackPieceDirection; quadrant &= 3; auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(entryInfo->Index); @@ -1015,10 +987,10 @@ static GameActions::Result TrackDesignPlaceSceneryElementRemoveGhost( static bool TrackDesignPlaceSceneryElementGetPlaceZ(TrackDesignState& tds, const TrackDesignSceneryElement& scenery) { - int32_t z = scenery.loc.z + tds.PlaceZ; - if (z < tds.PlaceSceneryZ) + int32_t z = scenery.loc.z + tds.placeZ; + if (z < tds.placeSceneryZ) { - tds.PlaceSceneryZ = z; + tds.placeSceneryZ = z; } TrackDesignPlaceSceneryElementGetEntry(scenery); @@ -1029,18 +1001,18 @@ static GameActions::Result TrackDesignPlaceSceneryElement( TrackDesignState& tds, CoordsXY mapCoord, uint8_t mode, const TrackDesignSceneryElement& scenery, uint8_t rotation, int32_t originZ) { - if (tds.PlaceOperation == PTD_OPERATION_DRAW_OUTLINES && mode == 0) + if (tds.placeOperation == TrackPlaceOperation::drawOutlines && mode == 0) { TrackDesignAddSelectedTile(mapCoord); return GameActions::Result(); } - if (tds.PlaceOperation == PTD_OPERATION_REMOVE_GHOST && mode == 0) + if (tds.placeOperation == TrackPlaceOperation::removeGhost && mode == 0) { return TrackDesignPlaceSceneryElementRemoveGhost(mapCoord, scenery, rotation, originZ); } - if (tds.PlaceOperation == PTD_OPERATION_GET_PLACE_Z) + if (tds.placeOperation == TrackPlaceOperation::getPlaceZ) { TrackDesignPlaceSceneryElementGetPlaceZ(tds, scenery); return GameActions::Result(); @@ -1048,8 +1020,9 @@ static GameActions::Result TrackDesignPlaceSceneryElement( money64 cost = 0; - if (tds.PlaceOperation != PTD_OPERATION_PLACE_QUERY && tds.PlaceOperation != PTD_OPERATION_PLACE - && tds.PlaceOperation != PTD_OPERATION_PLACE_GHOST && tds.PlaceOperation != PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation != TrackPlaceOperation::placeQuery && tds.placeOperation != TrackPlaceOperation::place + && tds.placeOperation != TrackPlaceOperation::placeGhost + && tds.placeOperation != TrackPlaceOperation::placeTrackPreview) { return GameActions::Result(); } @@ -1062,7 +1035,6 @@ static GameActions::Result TrackDesignPlaceSceneryElement( int16_t z; uint8_t flags; - uint8_t quadrant; switch (entryInfo->Type) { @@ -1073,34 +1045,34 @@ static GameActions::Result TrackDesignPlaceSceneryElement( return GameActions::Result(); } - rotation += scenery.flags; + rotation += scenery.getRotation(); rotation &= 3; z = scenery.loc.z + originZ; - quadrant = ((scenery.flags >> 2) + _currentTrackPieceDirection) & 3; + uint8_t quadrant = (scenery.getQuadrant() + _currentTrackPieceDirection) & 3; flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_TRACK_DESIGN; - if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_TRACK_DESIGN | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST) + else if (tds.placeOperation == TrackPlaceOperation::placeGhost) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_TRACK_DESIGN | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_NO_SPEND; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY) + else if (tds.placeOperation == TrackPlaceOperation::placeQuery) { flags = GAME_COMMAND_FLAG_TRACK_DESIGN; } - if (tds.IsReplay) + if (tds.isReplay) { flags |= GAME_COMMAND_FLAG_REPLAY; } auto smallSceneryPlace = SmallSceneryPlaceAction( - { mapCoord.x, mapCoord.y, z, rotation }, quadrant, entryInfo->Index, scenery.primary_colour, - scenery.secondary_colour, COLOUR_DARK_BROWN); + { mapCoord.x, mapCoord.y, z, rotation }, quadrant, entryInfo->Index, scenery.primaryColour, + scenery.secondaryColour, scenery.tertiaryColour); smallSceneryPlace.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&smallSceneryPlace) @@ -1116,33 +1088,33 @@ static GameActions::Result TrackDesignPlaceSceneryElement( return GameActions::Result(); } - rotation += scenery.flags; + rotation += scenery.getRotation(); rotation &= 3; z = scenery.loc.z + originZ; flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_TRACK_DESIGN; - if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_TRACK_DESIGN | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST) + else if (tds.placeOperation == TrackPlaceOperation::placeGhost) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_TRACK_DESIGN | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_NO_SPEND; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY) + else if (tds.placeOperation == TrackPlaceOperation::placeQuery) { flags = GAME_COMMAND_FLAG_TRACK_DESIGN; } - if (tds.IsReplay) + if (tds.isReplay) { flags |= GAME_COMMAND_FLAG_REPLAY; } auto sceneryPlaceAction = LargeSceneryPlaceAction( - { mapCoord.x, mapCoord.y, z, rotation }, entryInfo->Index, scenery.primary_colour, scenery.secondary_colour, - COLOUR_DARK_BROWN); + { mapCoord.x, mapCoord.y, z, rotation }, entryInfo->Index, scenery.primaryColour, scenery.secondaryColour, + scenery.tertiaryColour); sceneryPlaceAction.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&sceneryPlaceAction) : GameActions::QueryNested(&sceneryPlaceAction); @@ -1158,31 +1130,31 @@ static GameActions::Result TrackDesignPlaceSceneryElement( } z = scenery.loc.z + originZ; - rotation += scenery.flags; + rotation += scenery.getRotation(); rotation &= 3; flags = GAME_COMMAND_FLAG_APPLY; - if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_TRACK_DESIGN | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST) + else if (tds.placeOperation == TrackPlaceOperation::placeGhost) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY) + else if (tds.placeOperation == TrackPlaceOperation::placeQuery) { flags = 0; } - if (tds.IsReplay) + if (tds.isReplay) { flags |= GAME_COMMAND_FLAG_REPLAY; } auto wallPlaceAction = WallPlaceAction( - entryInfo->Index, { mapCoord.x, mapCoord.y, z }, rotation, scenery.primary_colour, scenery.secondary_colour, - (scenery.flags & 0xFC) >> 2); + entryInfo->Index, { mapCoord.x, mapCoord.y, z }, rotation, scenery.primaryColour, scenery.secondaryColour, + scenery.tertiaryColour); wallPlaceAction.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&wallPlaceAction) : GameActions::QueryNested(&wallPlaceAction); @@ -1195,38 +1167,30 @@ static GameActions::Result TrackDesignPlaceSceneryElement( z = scenery.loc.z + originZ; if (mode == 0) { - auto isQueue = scenery.IsQueue(); - - uint8_t bh = ((scenery.flags & 0xF) << rotation); - flags = bh >> 4; - bh = (bh | flags) & 0xF; - flags = (((scenery.flags >> 5) + rotation) & 3) << 5; - bh |= flags; - - bh |= scenery.flags & 0x90; - flags = GAME_COMMAND_FLAG_APPLY; - if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND; } - if (tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST) + if (tds.placeOperation == TrackPlaceOperation::placeGhost) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; } - if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY) + if (tds.placeOperation == TrackPlaceOperation::placeQuery) { flags = 0; } - if (tds.IsReplay) + if (tds.isReplay) { flags |= GAME_COMMAND_FLAG_REPLAY; } - uint8_t slope = ((bh >> 5) & 0x3) | ((bh >> 2) & 0x4); - uint8_t edges = bh & 0xF; + uint8_t slope = (scenery.getSlopeDirection() + rotation) & 0x3; + if (scenery.hasSlope()) + slope |= FOOTPATH_PROPERTIES_FLAG_IS_SLOPED; + uint8_t edges = Numerics::rol4(scenery.getEdges(), rotation); PathConstructFlags constructFlags = 0; - if (isQueue) + if (scenery.isQueue()) constructFlags |= PathConstructFlag::IsQueue; if (entryInfo->Type == ObjectType::Paths) constructFlags |= PathConstructFlag::IsLegacyPathObject; @@ -1240,7 +1204,7 @@ static GameActions::Result TrackDesignPlaceSceneryElement( } else { - if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY) + if (tds.placeOperation == TrackPlaceOperation::placeQuery) { return GameActions::Result(); } @@ -1251,28 +1215,28 @@ static GameActions::Result TrackDesignPlaceSceneryElement( return GameActions::Result(); } - if (tds.PlaceOperation == PTD_OPERATION_PLACE) + if (tds.placeOperation == TrackPlaceOperation::place) { FootpathQueueChainReset(); FootpathRemoveEdgesAt(mapCoord, reinterpret_cast(pathElement)); } flags = GAME_COMMAND_FLAG_APPLY; - if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND; } - if (tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST) + if (tds.placeOperation == TrackPlaceOperation::placeGhost) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; } - if (tds.IsReplay) + if (tds.isReplay) { flags |= GAME_COMMAND_FLAG_REPLAY; } - if (tds.PlaceOperation == PTD_OPERATION_PLACE) + if (tds.placeOperation == TrackPlaceOperation::place) { FootpathConnectEdges(mapCoord, reinterpret_cast(pathElement), flags); FootpathUpdateQueueChains(); @@ -1299,7 +1263,7 @@ static GameActions::Result TrackDesignPlaceSceneryElement( static GameActions::Result TrackDesignPlaceAllScenery( TrackDesignState& tds, const std::vector& sceneryList, uint8_t rotation) { - const auto& origin = tds.Origin; + const auto& origin = tds.origin; money64 cost = 0; @@ -1307,10 +1271,10 @@ static GameActions::Result TrackDesignPlaceAllScenery( { if (!sceneryList.empty()) { - tds.HasScenery = true; + tds.hasScenery = true; } - if (!tds.PlaceScenery) + if (!tds.placeScenery) { continue; } @@ -1324,7 +1288,7 @@ static GameActions::Result TrackDesignPlaceAllScenery( if (placementRes.Error != GameActions::Status::Ok) { // Allow operation to fail when its removing ghosts. - if (tds.PlaceOperation != PTD_OPERATION_REMOVE_GHOST) + if (tds.placeOperation != TrackPlaceOperation::removeGhost) { return placementRes; } @@ -1342,30 +1306,30 @@ static GameActions::Result TrackDesignPlaceAllScenery( static std::optional TrackDesignPlaceEntrances( TrackDesignState& tds, const TrackDesign& td, CoordsXYZ newCoords, RideId rideId, money64& totalCost) { - for (const auto& entrance : td.entrance_elements) + for (const auto& entrance : td.entranceElements) { auto rotation = _currentTrackPieceDirection & 3; - CoordsXY entranceMapPos = entrance.Location.ToCoordsXY(); + CoordsXY entranceMapPos = entrance.location.ToCoordsXY(); auto rotatedEntranceMapPos = entranceMapPos.Rotate(rotation); - newCoords = { rotatedEntranceMapPos + tds.Origin, newCoords.z }; + newCoords = { rotatedEntranceMapPos + tds.origin, newCoords.z }; TrackDesignUpdatePreviewBounds(tds, newCoords); - switch (tds.PlaceOperation) + switch (tds.placeOperation) { - case PTD_OPERATION_DRAW_OUTLINES: + case TrackPlaceOperation::drawOutlines: TrackDesignAddSelectedTile(newCoords); break; - case PTD_OPERATION_PLACE_QUERY: - case PTD_OPERATION_PLACE: - case PTD_OPERATION_PLACE_GHOST: - case PTD_OPERATION_PLACE_TRACK_PREVIEW: + case TrackPlaceOperation::placeQuery: + case TrackPlaceOperation::place: + case TrackPlaceOperation::placeGhost: + case TrackPlaceOperation::placeTrackPreview: { - rotation = (rotation + entrance.Location.direction) & 3; - newCoords.z = entrance.Location.z * COORDS_Z_STEP; - newCoords.z += tds.Origin.z; + rotation = (rotation + entrance.location.direction) & 3; + newCoords.z = entrance.location.z * COORDS_Z_STEP; + newCoords.z += tds.origin.z; - if (tds.PlaceOperation != PTD_OPERATION_PLACE_QUERY) + if (tds.placeOperation != TrackPlaceOperation::placeQuery) { auto tile = CoordsXY{ newCoords } + CoordsDirectionDelta[rotation]; TileElement* tile_element = MapGetFirstElementAt(tile); @@ -1388,27 +1352,27 @@ static std::optional TrackDesignPlaceEntrances( auto stationIndex = tile_element->AsTrack()->GetStationIndex(); uint8_t flags = GAME_COMMAND_FLAG_APPLY; - if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND; } - if (tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST) + if (tds.placeOperation == TrackPlaceOperation::placeGhost) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; } - if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY) + if (tds.placeOperation == TrackPlaceOperation::placeQuery) { flags = 0; } - if (tds.IsReplay) + if (tds.isReplay) { flags |= GAME_COMMAND_FLAG_REPLAY; } auto rideEntranceExitPlaceAction = RideEntranceExitPlaceAction( - newCoords, rotation, rideId, stationIndex, entrance.IsExit); + newCoords, rotation, rideId, stationIndex, entrance.isExit); rideEntranceExitPlaceAction.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&rideEntranceExitPlaceAction) : GameActions::QueryNested(&rideEntranceExitPlaceAction); @@ -1418,7 +1382,7 @@ static std::optional TrackDesignPlaceEntrances( return res; } totalCost += res.Cost; - tds.EntranceExitPlaced = true; + tds.entranceExitPlaced = true; _trackDesignPlaceStateEntranceExitPlaced = true; break; } while (!(tile_element++)->IsLastForTile()); @@ -1432,11 +1396,14 @@ static std::optional TrackDesignPlaceEntrances( } totalCost += res.Cost; - tds.EntranceExitPlaced = true; + tds.entranceExitPlaced = true; _trackDesignPlaceStateEntranceExitPlaced = true; } break; } + case TrackPlaceOperation::removeGhost: + case TrackPlaceOperation::getPlaceZ: + break; } } @@ -1444,50 +1411,51 @@ static std::optional TrackDesignPlaceEntrances( } static GameActions::Result TrackDesignPlaceMaze( - TrackDesignState& tds, TrackDesign& td, const CoordsXYZ& origin, const Ride& ride) + TrackDesignState& tds, const TrackDesign& td, const CoordsXYZ& origin, const Ride& ride) { - if (tds.PlaceOperation == PTD_OPERATION_DRAW_OUTLINES) + if (tds.placeOperation == TrackPlaceOperation::drawOutlines) { gMapSelectionTiles.clear(); gMapSelectArrowPosition = CoordsXYZ{ origin, TileElementHeight(origin) }; gMapSelectArrowDirection = _currentTrackPieceDirection; } - tds.PlaceZ = 0; + tds.placeZ = 0; money64 totalCost = 0; - for (const auto& maze_element : td.maze_elements) + for (const auto& maze_element : td.mazeElements) { uint8_t rotation = _currentTrackPieceDirection & 3; - CoordsXY mazeMapPos = TileCoordsXY(maze_element.x, maze_element.y).ToCoordsXY(); + CoordsXY mazeMapPos = maze_element.location.ToCoordsXY(); auto mapCoord = mazeMapPos.Rotate(rotation); mapCoord += origin; TrackDesignUpdatePreviewBounds(tds, { mapCoord, origin.z }); - if (tds.PlaceOperation == PTD_OPERATION_DRAW_OUTLINES) + if (tds.placeOperation == TrackPlaceOperation::drawOutlines) { TrackDesignAddSelectedTile(mapCoord); } - if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY || tds.PlaceOperation == PTD_OPERATION_PLACE - || tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST || tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeQuery || tds.placeOperation == TrackPlaceOperation::place + || tds.placeOperation == TrackPlaceOperation::placeGhost + || tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { uint8_t flags; money64 cost = 0; - uint16_t maze_entry = Numerics::rol16(maze_element.maze_entry, rotation * 4); + uint16_t mazeEntry = Numerics::rol16(maze_element.mazeEntry, rotation * 4); - if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST) + else if (tds.placeOperation == TrackPlaceOperation::placeGhost) { flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY) + else if (tds.placeOperation == TrackPlaceOperation::placeQuery) { flags = 0; } @@ -1495,12 +1463,12 @@ static GameActions::Result TrackDesignPlaceMaze( { flags = GAME_COMMAND_FLAG_APPLY; } - if (tds.IsReplay) + if (tds.isReplay) { flags |= GAME_COMMAND_FLAG_REPLAY; } - auto mazePlace = MazePlaceTrackAction({ mapCoord, origin.z }, ride.id, maze_entry); + auto mazePlace = MazePlaceTrackAction({ mapCoord, origin.z }, ride.id, mazeEntry); mazePlace.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&mazePlace) : GameActions::QueryNested(&mazePlace); @@ -1513,7 +1481,7 @@ static GameActions::Result TrackDesignPlaceMaze( totalCost += cost; } - if (tds.PlaceOperation == PTD_OPERATION_GET_PLACE_Z) + if (tds.placeOperation == TrackPlaceOperation::getPlaceZ) { if (!MapIsLocationValid(mapCoord)) { @@ -1524,10 +1492,10 @@ static GameActions::Result TrackDesignPlaceMaze( if (surfaceElement == nullptr) continue; int16_t surfaceZ = surfaceElement->GetBaseZ(); - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + if (surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) { surfaceZ += LAND_HEIGHT_STEP; - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) { surfaceZ += LAND_HEIGHT_STEP; } @@ -1539,15 +1507,15 @@ static GameActions::Result TrackDesignPlaceMaze( surfaceZ = waterZ; } - int16_t temp_z = origin.z + tds.PlaceZ - surfaceZ; + int16_t temp_z = origin.z + tds.placeZ - surfaceZ; if (temp_z < 0) { - tds.PlaceZ -= temp_z; + tds.placeZ -= temp_z; } } } - tds.Origin = origin; + tds.origin = origin; auto result = TrackDesignPlaceEntrances(tds, td, origin, ride.id, totalCost); if (result.has_value()) @@ -1555,7 +1523,7 @@ static GameActions::Result TrackDesignPlaceMaze( return result.value(); } - if (tds.PlaceOperation == PTD_OPERATION_REMOVE_GHOST) + if (tds.placeOperation == TrackPlaceOperation::removeGhost) { auto gameAction = RideDemolishAction(ride.id, RIDE_MODIFY_DEMOLISH); gameAction.SetFlags(GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST); @@ -1568,32 +1536,33 @@ static GameActions::Result TrackDesignPlaceMaze( return res; } -static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesign* td6, const CoordsXYZ& origin, Ride& ride) +static GameActions::Result TrackDesignPlaceRide( + TrackDesignState& tds, const TrackDesign& td, const CoordsXYZ& origin, Ride& ride) { - tds.Origin = origin; - if (tds.PlaceOperation == PTD_OPERATION_DRAW_OUTLINES) + tds.origin = origin; + if (tds.placeOperation == TrackPlaceOperation::drawOutlines) { gMapSelectionTiles.clear(); gMapSelectArrowPosition = CoordsXYZ{ origin, TileElementHeight(origin) }; gMapSelectArrowDirection = _currentTrackPieceDirection; } - tds.PlaceZ = 0; + tds.placeZ = 0; money64 totalCost = 0; uint8_t rotation = _currentTrackPieceDirection; // Track elements auto newCoords = origin; - for (const auto& track : td6->track_elements) + for (const auto& track : td.trackElements) { - auto trackType = track.Type; + auto trackType = track.type; const auto& ted = GetTrackElementDescriptor(trackType); TrackDesignUpdatePreviewBounds(tds, newCoords); - switch (tds.PlaceOperation) + switch (tds.placeOperation) { - case PTD_OPERATION_DRAW_OUTLINES: + case TrackPlaceOperation::drawOutlines: for (const PreviewTrack* trackBlock = ted.Block; trackBlock->index != 0xFF; trackBlock++) { auto tile = CoordsXY{ newCoords } + CoordsXY{ trackBlock->x, trackBlock->y }.Rotate(rotation); @@ -1601,7 +1570,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi TrackDesignAddSelectedTile(tile); } break; - case PTD_OPERATION_REMOVE_GHOST: + case TrackPlaceOperation::removeGhost: { const TrackCoordinates* trackCoordinates = &ted.Coordinates; const PreviewTrack* trackBlock = ted.Block; @@ -1614,10 +1583,10 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi GameActions::ExecuteNested(&trackRemoveAction); break; } - case PTD_OPERATION_PLACE_QUERY: - case PTD_OPERATION_PLACE: - case PTD_OPERATION_PLACE_GHOST: - case PTD_OPERATION_PLACE_TRACK_PREVIEW: + case TrackPlaceOperation::placeQuery: + case TrackPlaceOperation::place: + case TrackPlaceOperation::placeGhost: + case TrackPlaceOperation::placeTrackPreview: { const TrackCoordinates* trackCoordinates = &ted.Coordinates; @@ -1625,39 +1594,39 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi int16_t tempZ = newCoords.z - trackCoordinates->z_begin; int32_t liftHillAndAlternativeState = 0; - if (track.HasFlag(TrackDesignTrackElementFlag::HasChain)) + if (track.HasFlag(TrackDesignTrackElementFlag::hasChain)) { liftHillAndAlternativeState |= 1; } - if (track.HasFlag(TrackDesignTrackElementFlag::IsInverted)) + if (track.HasFlag(TrackDesignTrackElementFlag::isInverted)) { liftHillAndAlternativeState |= 2; } uint8_t flags = GAME_COMMAND_FLAG_APPLY; - if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) + if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { flags |= GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED; flags |= GAME_COMMAND_FLAG_NO_SPEND; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST) + else if (tds.placeOperation == TrackPlaceOperation::placeGhost) { flags |= GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED; flags |= GAME_COMMAND_FLAG_NO_SPEND; flags |= GAME_COMMAND_FLAG_GHOST; } - else if (tds.PlaceOperation == PTD_OPERATION_PLACE_QUERY) + else if (tds.placeOperation == TrackPlaceOperation::placeQuery) { flags = GAME_COMMAND_FLAG_NO_SPEND; } - if (tds.IsReplay) + if (tds.isReplay) { flags |= GAME_COMMAND_FLAG_REPLAY; } auto trackPlaceAction = TrackPlaceAction( ride.id, trackType, ride.type, { newCoords, tempZ, static_cast(rotation) }, - track.BrakeBoosterSpeed, track.ColourScheme, track.SeatRotation, liftHillAndAlternativeState, true); + track.brakeBoosterSpeed, track.colourScheme, track.seatRotation, liftHillAndAlternativeState, true); trackPlaceAction.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&trackPlaceAction) @@ -1670,7 +1639,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi totalCost += res.Cost; break; } - case PTD_OPERATION_GET_PLACE_Z: + case TrackPlaceOperation::getPlaceZ: { int32_t tempZ = newCoords.z - ted.Coordinates.z_begin; for (const PreviewTrack* trackBlock = ted.Block; trackBlock->index != 0xFF; trackBlock++) @@ -1690,10 +1659,10 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi } int32_t surfaceZ = surfaceElement->GetBaseZ(); - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + if (surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) { surfaceZ += LAND_HEIGHT_STEP; - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) { surfaceZ += LAND_HEIGHT_STEP; } @@ -1704,10 +1673,10 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi { surfaceZ = waterZ; } - int32_t heightDifference = tempZ + tds.PlaceZ + trackBlock->z - surfaceZ; + int32_t heightDifference = tempZ + tds.placeZ + trackBlock->z - surfaceZ; if (heightDifference < 0) { - tds.PlaceZ -= heightDifference; + tds.placeZ -= heightDifference; } } break; @@ -1730,13 +1699,13 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi } } - auto result = TrackDesignPlaceEntrances(tds, *td6, newCoords, ride.id, totalCost); + auto result = TrackDesignPlaceEntrances(tds, td, newCoords, ride.id, totalCost); if (result.has_value()) { return result.value(); } - if (tds.PlaceOperation == PTD_OPERATION_REMOVE_GHOST) + if (tds.placeOperation == TrackPlaceOperation::removeGhost) { ride.ValidateStations(); ride.Delete(); @@ -1762,26 +1731,26 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi * rct2: 0x006D01B3 */ static GameActions::Result TrackDesignPlaceVirtual( - TrackDesignState& tds, TrackDesign* td6, uint8_t ptdOperation, bool placeScenery, Ride& ride, const CoordsXYZD& coords) + TrackDesignState& tds, const TrackDesign& td, TrackPlaceOperation ptdOperation, bool placeScenery, Ride& ride, + const CoordsXYZD& coords, bool isReplay = false) { _trackDesignPlaceStateSceneryUnavailable = false; _trackDesignPlaceStateEntranceExitPlaced = false; - tds.PlaceScenery = placeScenery; - tds.EntranceExitPlaced = false; - tds.HasScenery = false; + tds.placeScenery = placeScenery; + tds.entranceExitPlaced = false; + tds.hasScenery = false; - tds.IsReplay = ptdOperation & PTD_OPERATION_FLAG_IS_REPLAY; - ptdOperation &= ~PTD_OPERATION_FLAG_IS_REPLAY; - tds.PlaceOperation = ptdOperation; + tds.isReplay = isReplay; + tds.placeOperation = ptdOperation; - tds.PreviewMin = coords; - tds.PreviewMax = coords; - tds.PlaceSceneryZ = 0; + tds.previewMin = coords; + tds.previewMax = coords; + tds.placeSceneryZ = 0; if (gTrackDesignSceneryToggle) { - tds.PlaceScenery = false; + tds.placeScenery = false; } // NOTE: We need to save this, in networked games this would affect all clients otherwise. @@ -1791,14 +1760,14 @@ static GameActions::Result TrackDesignPlaceVirtual( _currentTrackPieceDirection = coords.direction; GameActions::Result trackPlaceRes; - const auto& rtd = GetRideTypeDescriptor(td6->type); + const auto& rtd = GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - trackPlaceRes = TrackDesignPlaceMaze(tds, *td6, coords, ride); + trackPlaceRes = TrackDesignPlaceMaze(tds, td, coords, ride); } else { - trackPlaceRes = TrackDesignPlaceRide(tds, td6, coords, ride); + trackPlaceRes = TrackDesignPlaceRide(tds, td, coords, ride); } _currentRideIndex = savedRideId; _currentTrackPieceDirection = savedTrackPieceDirection; @@ -1809,14 +1778,14 @@ static GameActions::Result TrackDesignPlaceVirtual( } // Scenery elements - auto sceneryPlaceRes = TrackDesignPlaceAllScenery(tds, td6->scenery_elements, coords.direction); + auto sceneryPlaceRes = TrackDesignPlaceAllScenery(tds, td.sceneryElements, coords.direction); if (sceneryPlaceRes.Error != GameActions::Status::Ok) { return sceneryPlaceRes; } // 0x6D0FE6 - if (tds.PlaceOperation == PTD_OPERATION_DRAW_OUTLINES) + if (tds.placeOperation == TrackPlaceOperation::drawOutlines) { gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE_CONSTRUCT; gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE_ARROW; @@ -1830,44 +1799,45 @@ static GameActions::Result TrackDesignPlaceVirtual( return res; } -GameActions::Result TrackDesignPlace(TrackDesign* td6, uint32_t flags, bool placeScenery, Ride& ride, const CoordsXYZD& coords) +GameActions::Result TrackDesignPlace( + const TrackDesign& td, uint32_t flags, bool placeScenery, Ride& ride, const CoordsXYZD& coords) { - uint32_t ptdOperation = (flags & GAME_COMMAND_FLAG_APPLY) != 0 ? PTD_OPERATION_PLACE : PTD_OPERATION_PLACE_QUERY; + TrackPlaceOperation ptdOperation = (flags & GAME_COMMAND_FLAG_APPLY) != 0 ? TrackPlaceOperation::place + : TrackPlaceOperation::placeQuery; if ((flags & GAME_COMMAND_FLAG_APPLY) != 0 && (flags & GAME_COMMAND_FLAG_GHOST) != 0) { - ptdOperation = PTD_OPERATION_PLACE_GHOST; + ptdOperation = TrackPlaceOperation::placeGhost; } - if (flags & GAME_COMMAND_FLAG_REPLAY) - ptdOperation |= PTD_OPERATION_FLAG_IS_REPLAY; + bool isReplay = flags & GAME_COMMAND_FLAG_REPLAY; TrackDesignState tds{}; - return TrackDesignPlaceVirtual(tds, td6, ptdOperation, placeScenery, ride, coords); + return TrackDesignPlaceVirtual(tds, td, ptdOperation, placeScenery, ride, coords, isReplay); } -void TrackDesignPreviewRemoveGhosts(TrackDesign* td6, Ride& ride, const CoordsXYZD& coords) +void TrackDesignPreviewRemoveGhosts(const TrackDesign& td, Ride& ride, const CoordsXYZD& coords) { TrackDesignState tds{}; - TrackDesignPlaceVirtual(tds, td6, PTD_OPERATION_REMOVE_GHOST, true, ride, coords); + TrackDesignPlaceVirtual(tds, td, TrackPlaceOperation::removeGhost, true, ride, coords); } -void TrackDesignPreviewDrawOutlines(TrackDesignState& tds, TrackDesign* td6, Ride& ride, const CoordsXYZD& coords) +void TrackDesignPreviewDrawOutlines(TrackDesignState& tds, const TrackDesign& td, Ride& ride, const CoordsXYZD& coords) { - TrackDesignPlaceVirtual(tds, td6, PTD_OPERATION_DRAW_OUTLINES, true, ride, coords); + TrackDesignPlaceVirtual(tds, td, TrackPlaceOperation::drawOutlines, true, ride, coords); } -static int32_t TrackDesignGetZPlacement(TrackDesignState& tds, TrackDesign* td6, Ride& ride, const CoordsXYZD& coords) +static int32_t TrackDesignGetZPlacement(TrackDesignState& tds, const TrackDesign& td, Ride& ride, const CoordsXYZD& coords) { - TrackDesignPlaceVirtual(tds, td6, PTD_OPERATION_GET_PLACE_Z, true, ride, coords); + TrackDesignPlaceVirtual(tds, td, TrackPlaceOperation::getPlaceZ, true, ride, coords); // Change from vanilla: originally, _trackDesignPlaceSceneryZ was not subtracted // from _trackDesignPlaceZ, causing bug #259. - return tds.PlaceZ - tds.PlaceSceneryZ; + return tds.placeZ - tds.placeSceneryZ; } -int32_t TrackDesignGetZPlacement(TrackDesign* td6, Ride& ride, const CoordsXYZD& coords) +int32_t TrackDesignGetZPlacement(const TrackDesign& td, Ride& ride, const CoordsXYZD& coords) { TrackDesignState tds{}; - return TrackDesignGetZPlacement(tds, td6, ride, coords); + return TrackDesignGetZPlacement(tds, td, ride, coords); } static money64 TrackDesignCreateRide(int32_t type, int32_t subType, int32_t flags, RideId* outRideIndex) @@ -1895,18 +1865,19 @@ static money64 TrackDesignCreateRide(int32_t type, int32_t subType, int32_t flag * ebx = ride_id * cost = edi */ -static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, money64* cost, Ride** outRide, uint8_t* flags) +static bool TrackDesignPlacePreview( + TrackDesignState& tds, const TrackDesign& td, Ride** outRide, TrackDesignGameStateData& gameStateData) { *outRide = nullptr; - *flags = 0; + gameStateData.flags = 0; auto& gameState = GetGameState(); auto& objManager = GetContext()->GetObjectManager(); - auto entry_index = objManager.GetLoadedObjectEntryIndex(td6->vehicle_object); + auto entry_index = objManager.GetLoadedObjectEntryIndex(td.trackAndVehicle.vehicleObject); RideId rideIndex; uint8_t rideCreateFlags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND; - if (TrackDesignCreateRide(td6->type, entry_index, rideCreateFlags, &rideIndex) == kMoney64Undefined) + if (TrackDesignCreateRide(td.trackAndVehicle.rtdIndex, entry_index, rideCreateFlags, &rideIndex) == kMoney64Undefined) { return false; } @@ -1917,26 +1888,24 @@ static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, mon ride->custom_name = {}; - ride->entrance_style = objManager.GetLoadedObjectEntryIndex(td6->StationObjectIdentifier); + ride->entrance_style = objManager.GetLoadedObjectEntryIndex(td.appearance.stationObjectIdentifier); if (ride->entrance_style == OBJECT_ENTRY_INDEX_NULL) { ride->entrance_style = gameState.LastEntranceStyle; } - for (int32_t i = 0; i < OpenRCT2::Limits::NumColourSchemes; i++) + for (size_t i = 0; i < std::min(std::size(ride->track_colour), std::size(td.appearance.trackColours)); i++) { - ride->track_colour[i].main = td6->track_spine_colour[i]; - ride->track_colour[i].additional = td6->track_rail_colour[i]; - ride->track_colour[i].supports = td6->track_support_colour[i]; + ride->track_colour[i] = td.appearance.trackColours[i]; } // Flat rides need their vehicle colours loaded for display // in the preview window - if (!GetRideTypeDescriptor(td6->type).HasFlag(RIDE_TYPE_FLAG_HAS_TRACK)) + if (!GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex).HasFlag(RIDE_TYPE_FLAG_HAS_TRACK)) { for (size_t i = 0; i < std::size(ride->vehicle_colours); i++) { - ride->vehicle_colours[i] = td6->vehicle_colours[i]; + ride->vehicle_colours[i] = td.appearance.vehicleColours[i]; } } @@ -1948,24 +1917,24 @@ static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, mon _currentTrackPieceDirection = 0; int32_t z = TrackDesignGetZPlacement( - tds, td6, RideGetTemporaryForPreview(), { mapSize.x, mapSize.y, 16, _currentTrackPieceDirection }); + tds, td, RideGetTemporaryForPreview(), { mapSize.x, mapSize.y, 16, _currentTrackPieceDirection }); - if (tds.HasScenery) + if (tds.hasScenery) { - *flags |= TRACK_DESIGN_FLAG_HAS_SCENERY; + gameStateData.setFlag(TrackDesignGameStateFlag::HasScenery, true); } - z += 16 - tds.PlaceSceneryZ; + z += 16 - tds.placeSceneryZ; bool placeScenery = true; if (_trackDesignPlaceStateSceneryUnavailable) { placeScenery = false; - *flags |= TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE; + gameStateData.setFlag(TrackDesignGameStateFlag::SceneryUnavailable, true); } auto res = TrackDesignPlaceVirtual( - tds, td6, PTD_OPERATION_PLACE_TRACK_PREVIEW, placeScenery, *ride, + tds, td, TrackPlaceOperation::placeTrackPreview, placeScenery, *ride, { mapSize.x, mapSize.y, z, _currentTrackPieceDirection }); gameState.Park.Flags = backup_park_flags; @@ -1973,16 +1942,16 @@ static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, mon { if (entry_index == OBJECT_ENTRY_INDEX_NULL) { - *flags |= TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE; + gameStateData.setFlag(TrackDesignGameStateFlag::VehicleUnavailable, true); } else if (!RideEntryIsInvented(entry_index) && !GetGameState().Cheats.IgnoreResearchStatus) { - *flags |= TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE; + gameStateData.setFlag(TrackDesignGameStateFlag::VehicleUnavailable, true); } _currentTrackPieceDirection = backup_rotation; _trackDesignDrawingPreview = false; - *cost = res.Cost; + gameStateData.cost = res.Cost; *outRide = ride; return true; } @@ -1993,46 +1962,127 @@ static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, mon return false; } +Direction TrackDesignSceneryElement::getRotation() const +{ + return flags & kRotationMask; +} + +void TrackDesignSceneryElement::setRotation(Direction rotation) +{ + flags &= ~kRotationMask; + flags |= (rotation & kRotationMask); +} + +// Small scenery +uint8_t TrackDesignSceneryElement::getQuadrant() const +{ + return (flags & kQuadrantMask) >> 2; +} + +void TrackDesignSceneryElement::setQuadrant(uint8_t quadrant) +{ + flags &= ~kQuadrantMask; + flags |= ((quadrant << 2) & kQuadrantMask); +} + +// Path +bool TrackDesignSceneryElement::hasSlope() const +{ + return (flags & kHasSlopeMask) != 0; +} + +void TrackDesignSceneryElement::setHasSlope(bool on) +{ + if (on) + flags |= kHasSlopeMask; + else + flags &= ~kHasSlopeMask; +} + +Direction TrackDesignSceneryElement::getSlopeDirection() const +{ + return (flags >> 5) % kNumOrthogonalDirections; +} + +void TrackDesignSceneryElement::setSlopeDirection(Direction slope) +{ + flags &= ~kSlopeDirectionMask; + flags |= ((slope << 5) & kSlopeDirectionMask); +} + +uint8_t TrackDesignSceneryElement::getEdges() const +{ + return (flags & kEdgesMask); +} + +void TrackDesignSceneryElement::setEdges(uint8_t edges) +{ + flags &= ~kEdgesMask; + flags |= (edges & kEdgesMask); +} + +bool TrackDesignSceneryElement::isQueue() const +{ + return (flags & kIsQueueMask) != 0; +} + +void TrackDesignSceneryElement::setIsQueue(bool on) +{ + if (on) + flags |= kIsQueueMask; + else + flags &= ~kIsQueueMask; +} + +bool TrackDesignSceneryElement::operator==(const TrackDesignSceneryElement& rhs) +{ + return sceneryObject == rhs.sceneryObject && loc == rhs.loc && flags == rhs.flags && primaryColour == rhs.primaryColour + && secondaryColour == rhs.secondaryColour && tertiaryColour == rhs.tertiaryColour; +} + +bool TrackDesignSceneryElement::operator!=(const TrackDesignSceneryElement& rhs) +{ + return !((*this) == rhs); +} + #pragma region Track Design Preview /** * * rct2: 0x006D1EF0 */ -void TrackDesignDrawPreview(TrackDesign* td6, uint8_t* pixels) +void TrackDesignDrawPreview(TrackDesign& td, uint8_t* pixels) { StashMap(); TrackDesignPreviewClearMap(); if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { - TrackDesignLoadSceneryObjects(td6); + TrackDesignLoadSceneryObjects(td); } TrackDesignState tds{}; - money64 cost; Ride* ride; - uint8_t flags; - if (!TrackDesignPlacePreview(tds, td6, &cost, &ride, &flags)) + TrackDesignGameStateData updatedGameStateData = td.gameStateData; + if (!TrackDesignPlacePreview(tds, td, &ride, updatedGameStateData)) { std::fill_n(pixels, kTrackPreviewImageSize * 4, 0x00); UnstashMap(); return; } - td6->cost = cost; - td6->track_flags = flags & 7; + td.gameStateData = updatedGameStateData; - CoordsXYZ centre = { (tds.PreviewMin.x + tds.PreviewMax.x) / 2 + 16, (tds.PreviewMin.y + tds.PreviewMax.y) / 2 + 16, - (tds.PreviewMin.z + tds.PreviewMax.z) / 2 }; + CoordsXYZ centre = { (tds.previewMin.x + tds.previewMax.x) / 2 + 16, (tds.previewMin.y + tds.previewMax.y) / 2 + 16, + (tds.previewMin.z + tds.previewMax.z) / 2 }; - int32_t size_x = tds.PreviewMax.x - tds.PreviewMin.x; - int32_t size_y = tds.PreviewMax.y - tds.PreviewMin.y; - int32_t size_z = tds.PreviewMax.z - tds.PreviewMin.z; + int32_t size_x = tds.previewMax.x - tds.previewMin.x; + int32_t size_y = tds.previewMax.y - tds.previewMin.y; + int32_t size_z = tds.previewMax.z - tds.previewMin.z; // Special case for flat rides - Z-axis info is irrelevant // and must be zeroed out lest the preview be off-centre - if (!GetRideTypeDescriptor(td6->type).HasFlag(RIDE_TYPE_FLAG_HAS_TRACK)) + if (!GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex).HasFlag(RIDE_TYPE_FLAG_HAS_TRACK)) { centre.z = 0; size_z = 0; @@ -2111,7 +2161,7 @@ static void TrackDesignPreviewClearMap() auto* element = &tileElements.emplace_back(); element->ClearAs(TileElementType::Surface); element->SetLastForTile(true); - element->AsSurface()->SetSlope(TILE_ELEMENT_SLOPE_FLAT); + element->AsSurface()->SetSlope(kTileSlopeFlat); element->AsSurface()->SetWaterHeight(0); element->AsSurface()->SetSurfaceObjectIndex(0); element->AsSurface()->SetEdgeObjectIndex(0); @@ -2128,3 +2178,16 @@ bool TrackDesignAreEntranceAndExitPlaced() } #pragma endregion + +bool TrackDesignGameStateData::hasFlag(TrackDesignGameStateFlag flag) const +{ + return flags & EnumToFlag(flag); +} + +void TrackDesignGameStateData::setFlag(TrackDesignGameStateFlag flag, bool on) +{ + if (on) + flags |= EnumToFlag(flag); + else + flags &= ~EnumToFlag(flag); +} diff --git a/src/openrct2/ride/TrackDesign.h b/src/openrct2/ride/TrackDesign.h index faf5ae735f..cc820d310a 100644 --- a/src/openrct2/ride/TrackDesign.h +++ b/src/openrct2/ride/TrackDesign.h @@ -13,7 +13,9 @@ #include "../actions/GameActionResult.h" #include "../common.h" #include "../object/Object.h" +#include "../ride/RideColour.h" #include "../world/Map.h" +#include "RideRatings.h" #include "VehicleColour.h" #include @@ -23,147 +25,192 @@ struct ResultWithMessage; constexpr uint32_t kTrackPreviewImageSize = 370 * 217; +enum class TrackPlaceOperation : uint8_t +{ + drawOutlines, + placeQuery, + place, + getPlaceZ, + placeGhost, + placeTrackPreview, + removeGhost, +}; + struct TrackDesignState { - CoordsXYZ PreviewMin; - CoordsXYZ PreviewMax; - CoordsXYZ Origin; - uint8_t PlaceOperation{}; - int16_t PlaceZ{}; - int16_t PlaceSceneryZ{}; - bool EntranceExitPlaced{}; - bool HasScenery{}; - bool PlaceScenery{}; - bool IsReplay{}; + CoordsXYZ previewMin; + CoordsXYZ previewMax; + CoordsXYZ origin; + TrackPlaceOperation placeOperation{}; + int16_t placeZ{}; + int16_t placeSceneryZ{}; + bool entranceExitPlaced{}; + bool hasScenery{}; + bool placeScenery{}; + bool isReplay{}; }; /* Track Entrance entry */ struct TrackDesignEntranceElement { - TileCoordsXYZD Location{}; - bool IsExit{}; + TileCoordsXYZD location{}; + bool isExit{}; }; struct TrackDesignSceneryElement { - ObjectEntryDescriptor scenery_object; - CoordsXYZ loc; - uint8_t flags; - uint8_t primary_colour; - uint8_t secondary_colour; + ObjectEntryDescriptor sceneryObject{}; + CoordsXYZ loc{}; + uint8_t flags{}; + colour_t primaryColour{}; + colour_t secondaryColour{}; + colour_t tertiaryColour = COLOUR_DARK_BROWN; - bool IsQueue() const - { - return (flags & (1 << 7)) != 0; - } + Direction getRotation() const; + void setRotation(Direction rotation); + + // Small scenery + uint8_t getQuadrant() const; + void setQuadrant(uint8_t quadrant); + + // Path + bool hasSlope() const; + void setHasSlope(bool on); + + Direction getSlopeDirection() const; + void setSlopeDirection(Direction slope); + + uint8_t getEdges() const; + void setEdges(uint8_t edges); + + bool isQueue() const; + void setIsQueue(bool on); + + bool operator==(const TrackDesignSceneryElement& rhs); + bool operator!=(const TrackDesignSceneryElement& rhs); }; enum class TrackDesignTrackElementFlag : uint8_t { - HasChain = (1 << 0), - IsInverted = (1 << 1), - IsCovered = (1 << 2), // Reserved + hasChain = (1 << 0), + isInverted = (1 << 1), + isCovered = (1 << 2), // Reserved }; struct TrackDesignTrackElement { - track_type_t Type = 0; - uint8_t Flags = 0; - uint8_t ColourScheme = 0; - ::StationIndex StationIndex = StationIndex::FromUnderlying(0); - uint8_t BrakeBoosterSpeed = 0; - uint8_t SeatRotation = 4; + track_type_t type = 0; + uint8_t flags = 0; + uint8_t colourScheme = 0; + ::StationIndex stationIndex = StationIndex::FromUnderlying(0); + uint8_t brakeBoosterSpeed = 0; + uint8_t seatRotation = 4; constexpr bool HasFlag(const TrackDesignTrackElementFlag flag) const { - return Flags & EnumValue(flag); + return flags & EnumValue(flag); } constexpr void SetFlag(const TrackDesignTrackElementFlag flag) { - Flags |= EnumValue(flag); + flags |= EnumValue(flag); } constexpr void ClearFlag(const TrackDesignTrackElementFlag flag) { - Flags &= ~EnumValue(flag); + flags &= ~EnumValue(flag); } }; -/* Maze Element entry size: 0x04 */ struct TrackDesignMazeElement { - union - { - uint32_t all; - struct - { - int8_t x; - int8_t y; - union - { - uint16_t maze_entry; - struct - { - uint8_t direction; - uint8_t type; - }; - }; - }; - }; + TileCoordsXY location{}; + uint16_t mazeEntry{}; }; class DataSerialiser; enum class RideMode : uint8_t; +enum class TrackDesignGameStateFlag +{ + SceneryUnavailable, + HasScenery, + VehicleUnavailable, +}; + +struct TrackDesignTrackAndVehicleSettings +{ + ride_type_t rtdIndex{}; + ObjectEntryDescriptor vehicleObject{}; + uint8_t numberOfTrains{}; + uint8_t numberOfCarsPerTrain{}; +}; + +struct TrackDesignOperatingSettings +{ + RideMode rideMode{}; + uint8_t liftHillSpeed{}; + uint8_t numCircuits{}; + uint8_t operationSetting{}; + uint8_t departFlags{}; + uint8_t minWaitingTime{}; + uint8_t maxWaitingTime{}; +}; + +struct TrackDesignAppearanceSettings +{ + std::array trackColours{}; + u8string stationObjectIdentifier{}; + VehicleColourSettings vehicleColourSettings{}; + std::array vehicleColours{}; +}; + +struct TrackDesignStatistics +{ + RatingTuple ratings{}; + int8_t maxSpeed{}; + int8_t averageSpeed{}; + + // TODO: move to a struct of its own, together with rideTime, that can be repeated for multiple stations. + uint16_t rideLength; + + fixed16_2dp maxPositiveVerticalG{}; + fixed16_2dp maxNegativeVerticalG{}; + fixed16_2dp maxLateralG{}; + uint16_t totalAirTime{}; + uint8_t drops{}; + uint8_t highestDropHeight{}; + uint8_t inversions{}; + uint8_t holes; + + money64 upkeepCost; + TileCoordsXY spaceRequired{}; +}; + +// Not saved in the track design, but calculated when trying to place one. +struct TrackDesignGameStateData +{ + u8string name{}; + uint8_t flags{}; + money64 cost = 0.00_GBP; + + bool hasFlag(TrackDesignGameStateFlag flag) const; + void setFlag(TrackDesignGameStateFlag flag, bool on); +}; + struct TrackDesign { - uint8_t type; - uint8_t vehicle_type; - money64 cost; - uint32_t flags; - RideMode ride_mode; - uint8_t track_flags; - uint8_t colour_scheme; - std::array vehicle_colours; - u8string StationObjectIdentifier{}; - uint8_t total_air_time; - uint8_t depart_flags; - uint8_t number_of_trains; - uint8_t number_of_cars_per_train; - uint8_t min_waiting_time; - uint8_t max_waiting_time; - uint8_t operation_setting; - int8_t max_speed; - int8_t average_speed; - uint16_t ride_length; - uint8_t max_positive_vertical_g; - int8_t max_negative_vertical_g; - uint8_t max_lateral_g; - uint8_t inversions; - uint8_t holes; - uint8_t drops; - uint8_t highest_drop_height; - uint8_t excitement; - uint8_t intensity; - uint8_t nausea; - money64 upkeep_cost; - uint8_t track_spine_colour[OpenRCT2::Limits::NumColourSchemes]; - uint8_t track_rail_colour[OpenRCT2::Limits::NumColourSchemes]; - uint8_t track_support_colour[OpenRCT2::Limits::NumColourSchemes]; - uint32_t flags2; - ObjectEntryDescriptor vehicle_object; - uint8_t space_required_x; - uint8_t space_required_y; - uint8_t lift_hill_speed; - uint8_t num_circuits; + TrackDesignTrackAndVehicleSettings trackAndVehicle{}; + TrackDesignOperatingSettings operation{}; + TrackDesignAppearanceSettings appearance{}; + TrackDesignStatistics statistics{}; - std::vector maze_elements; - std::vector track_elements; - std::vector entrance_elements; - std::vector scenery_elements; + std::vector mazeElements; + std::vector trackElements; + std::vector entranceElements; + std::vector sceneryElements; - std::string name; + TrackDesignGameStateData gameStateData{}; public: ResultWithMessage CreateTrackDesign(TrackDesignState& tds, const Ride& ride); @@ -177,31 +224,6 @@ private: CoordsXYE MazeGetFirstElement(const Ride& ride); }; -enum -{ - TDPF_PLACE_SCENERY = 1 << 0, -}; - -enum -{ - TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE = (1 << 0), - TRACK_DESIGN_FLAG_HAS_SCENERY = (1 << 1), - TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE = (1 << 2), -}; - -enum -{ - PTD_OPERATION_DRAW_OUTLINES, - PTD_OPERATION_PLACE_QUERY, - PTD_OPERATION_PLACE, - PTD_OPERATION_GET_PLACE_Z, - PTD_OPERATION_PLACE_GHOST, - PTD_OPERATION_PLACE_TRACK_PREVIEW, - PTD_OPERATION_REMOVE_GHOST, -}; - -static constexpr uint8_t PTD_OPERATION_FLAG_IS_REPLAY = (1 << 7); - extern bool gTrackDesignSceneryToggle; extern bool _trackDesignDrawingPreview; @@ -212,17 +234,18 @@ extern RideId gTrackDesignSaveRideIndex; [[nodiscard]] std::unique_ptr TrackDesignImport(const utf8* path); -void TrackDesignMirror(TrackDesign* td6); +void TrackDesignMirror(TrackDesign& td); -GameActions::Result TrackDesignPlace(TrackDesign* td6, uint32_t flags, bool placeScenery, Ride& ride, const CoordsXYZD& coords); -void TrackDesignPreviewRemoveGhosts(TrackDesign* td6, Ride& ride, const CoordsXYZD& coords); -void TrackDesignPreviewDrawOutlines(TrackDesignState& tds, TrackDesign* td6, Ride& ride, const CoordsXYZD& coords); -int32_t TrackDesignGetZPlacement(TrackDesign* td6, Ride& ride, const CoordsXYZD& coords); +GameActions::Result TrackDesignPlace( + const TrackDesign& td, uint32_t flags, bool placeScenery, Ride& ride, const CoordsXYZD& coords); +void TrackDesignPreviewRemoveGhosts(const TrackDesign& td, Ride& ride, const CoordsXYZD& coords); +void TrackDesignPreviewDrawOutlines(TrackDesignState& tds, const TrackDesign& td, Ride& ride, const CoordsXYZD& coords); +int32_t TrackDesignGetZPlacement(const TrackDesign& td, Ride& ride, const CoordsXYZD& coords); /////////////////////////////////////////////////////////////////////////////// // Track design preview /////////////////////////////////////////////////////////////////////////////// -void TrackDesignDrawPreview(TrackDesign* td6, uint8_t* pixels); +void TrackDesignDrawPreview(TrackDesign& td, uint8_t* pixels); /////////////////////////////////////////////////////////////////////////////// // Track design saving diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index f353513202..29b5ac0ced 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -11,7 +11,6 @@ #include "../Context.h" #include "../PlatformEnvironment.h" -#include "../config/Config.h" #include "../core/Collections.hpp" #include "../core/Console.hpp" #include "../core/File.h" @@ -74,14 +73,14 @@ public: public: std::optional Create(int32_t, const std::string& path) const override { - auto td6 = TrackDesignImport(path.c_str()); - if (td6 != nullptr) + auto td = TrackDesignImport(path.c_str()); + if (td != nullptr) { TrackRepositoryItem item; item.Name = GetNameFromTrackPath(path); item.Path = path; - item.RideType = td6->type; - item.ObjectEntry = std::string(td6->vehicle_object.Entry.name, 8); + item.RideType = td->trackAndVehicle.rtdIndex; + item.ObjectEntry = std::string(td->trackAndVehicle.vehicleObject.Entry.name, 8); item.Flags = 0; if (IsTrackReadOnly(path)) { diff --git a/src/openrct2/ride/TrackDesignSave.cpp b/src/openrct2/ride/TrackDesignSave.cpp index c7dd604c9d..d0859d8b5e 100644 --- a/src/openrct2/ride/TrackDesignSave.cpp +++ b/src/openrct2/ride/TrackDesignSave.cpp @@ -10,7 +10,6 @@ #include "../Context.h" #include "../Game.h" #include "../audio/audio.h" -#include "../config/Config.h" #include "../interface/Viewport.h" #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" @@ -209,30 +208,37 @@ static bool TrackDesignSaveIsSupportedObject(const Object* obj) return !entry.IsEmpty(); } -static void TrackDesignSavePushTileElementDesc( - const RCTObjectEntry& entry, const CoordsXYZ& loc, uint8_t flags, uint8_t primaryColour, uint8_t secondaryColour) +static TrackDesignSceneryElement TrackDesignCreateTileElementDesc(const RCTObjectEntry& entry, const CoordsXYZ& loc) { TrackDesignSceneryElement item{}; - item.scenery_object = ObjectEntryDescriptor(entry); + item.sceneryObject = ObjectEntryDescriptor(entry); item.loc = loc; - item.flags = flags; - item.primary_colour = primaryColour; - item.secondary_colour = secondaryColour; - - _trackSavedTileElementsDesc.push_back(std::move(item)); + return item; } -static void TrackDesignSavePushTileElementDesc( - const Object* obj, const CoordsXYZ& loc, uint8_t flags, uint8_t primaryColour, uint8_t secondaryColour) +static TrackDesignSceneryElement TrackDesignCreateTileElementDesc(const Object& obj, const CoordsXYZ& loc) { - const auto& entry = obj->GetObjectEntry(); + const auto& entry = obj.GetObjectEntry(); if (entry.IsEmpty()) { // Unsupported, should have been blocked earlier assert(false); } - TrackDesignSavePushTileElementDesc(entry, loc, flags, primaryColour, secondaryColour); + return TrackDesignCreateTileElementDesc(entry, loc); +} + +static TrackDesignSceneryElement TrackDesignSaveCreateSmallSceneryDesc( + const Object& object, const CoordsXY& loc, const SmallSceneryElement& smallSceneryElement) +{ + auto item = TrackDesignCreateTileElementDesc(object, { loc, smallSceneryElement.GetBaseZ() }); + item.setRotation(smallSceneryElement.GetDirection()); + item.setQuadrant(smallSceneryElement.GetSceneryQuadrant()); + item.primaryColour = smallSceneryElement.GetPrimaryColour(); + item.secondaryColour = smallSceneryElement.GetSecondaryColour(); + item.tertiaryColour = smallSceneryElement.GetTertiaryColour(); + + return item; } static TrackDesignAddStatus TrackDesignSaveAddSmallScenery(const CoordsXY& loc, SmallSceneryElement* sceneryElement) @@ -241,22 +247,27 @@ static TrackDesignAddStatus TrackDesignSaveAddSmallScenery(const CoordsXY& loc, auto obj = ObjectEntryGetObject(ObjectType::SmallScenery, entryIndex); if (obj != nullptr && TrackDesignSaveIsSupportedObject(obj)) { - uint8_t flags = 0; - flags |= sceneryElement->GetDirection(); - flags |= sceneryElement->GetSceneryQuadrant() << 2; - - uint8_t primaryColour = sceneryElement->GetPrimaryColour(); - uint8_t secondaryColour = sceneryElement->GetSecondaryColour(); - + auto item = TrackDesignSaveCreateSmallSceneryDesc(*obj, loc, *sceneryElement); TrackDesignSavePushTileElement(loc, reinterpret_cast(sceneryElement)); - TrackDesignSavePushTileElementDesc( - obj, { loc.x, loc.y, sceneryElement->GetBaseZ() }, flags, primaryColour, secondaryColour); + _trackSavedTileElementsDesc.push_back(std::move(item)); return TrackDesignAddStatus::Success(); } return TrackDesignAddStatus::Fail(STR_UNSUPPORTED_OBJECT_FORMAT); } +static TrackDesignSceneryElement TrackDesignSaveCreateLargeSceneryDesc( + const Object& object, const CoordsXYZ& loc, const LargeSceneryElement& largeSceneryElement) +{ + auto item = TrackDesignCreateTileElementDesc(object, loc); + item.setRotation(largeSceneryElement.GetDirection()); + item.primaryColour = largeSceneryElement.GetPrimaryColour(); + item.secondaryColour = largeSceneryElement.GetSecondaryColour(); + item.tertiaryColour = largeSceneryElement.GetTertiaryColour(); + + return item; +} + static TrackDesignAddStatus TrackDesignSaveAddLargeScenery(const CoordsXY& loc, LargeSceneryElement* tileElement) { auto entryIndex = tileElement->GetEntryIndex(); @@ -292,13 +303,10 @@ static TrackDesignAddStatus TrackDesignSaveAddLargeScenery(const CoordsXY& loc, { if (sequence == 0) { - uint8_t flags = largeElement->GetDirection(); - uint8_t primaryColour = largeElement->GetPrimaryColour(); - uint8_t secondaryColour = largeElement->GetSecondaryColour(); - - TrackDesignSavePushTileElementDesc(obj, tileLoc, flags, primaryColour, secondaryColour); + auto item = TrackDesignSaveCreateLargeSceneryDesc(*obj, tileLoc, *largeElement); + _trackSavedTileElementsDesc.push_back(std::move(item)); } - TrackDesignSavePushTileElement({ tileLoc.x, tileLoc.y }, reinterpret_cast(largeElement)); + TrackDesignSavePushTileElement(tileLoc, reinterpret_cast(largeElement)); } } return TrackDesignAddStatus::Success(); @@ -307,32 +315,37 @@ static TrackDesignAddStatus TrackDesignSaveAddLargeScenery(const CoordsXY& loc, return TrackDesignAddStatus::Fail(STR_UNSUPPORTED_OBJECT_FORMAT); } +static TrackDesignSceneryElement TrackDesignSaveCreateWallDesc( + const Object& object, const CoordsXY& loc, const WallElement& wallElement) +{ + auto item = TrackDesignCreateTileElementDesc(object, { loc, wallElement.GetBaseZ() }); + item.setRotation(wallElement.GetDirection()); + item.primaryColour = wallElement.GetPrimaryColour(); + item.secondaryColour = wallElement.GetSecondaryColour(); + item.tertiaryColour = wallElement.GetTertiaryColour(); + + return item; +} + static TrackDesignAddStatus TrackDesignSaveAddWall(const CoordsXY& loc, WallElement* wallElement) { auto entryIndex = wallElement->GetEntryIndex(); auto obj = ObjectEntryGetObject(ObjectType::Walls, entryIndex); if (obj != nullptr && TrackDesignSaveIsSupportedObject(obj)) { - uint8_t flags = 0; - flags |= wallElement->GetDirection(); - flags |= wallElement->GetTertiaryColour() << 2; - - uint8_t secondaryColour = wallElement->GetSecondaryColour(); - uint8_t primaryColour = wallElement->GetPrimaryColour(); - + auto item = TrackDesignSaveCreateWallDesc(*obj, loc, *wallElement); TrackDesignSavePushTileElement(loc, reinterpret_cast(wallElement)); - TrackDesignSavePushTileElementDesc( - obj, { loc.x, loc.y, wallElement->GetBaseZ() }, flags, primaryColour, secondaryColour); + _trackSavedTileElementsDesc.push_back(std::move(item)); return TrackDesignAddStatus::Success(); } return TrackDesignAddStatus::Fail(STR_UNSUPPORTED_OBJECT_FORMAT); } -static std::optional TrackDesignSaveFootpathGetBestEntry(PathElement* pathElement) +static std::optional TrackDesignSaveFootpathGetBestEntry(const PathElement& pathElement) { RCTObjectEntry pathEntry; - auto legacyPathObj = pathElement->GetLegacyPathEntry(); + auto legacyPathObj = pathElement.GetLegacyPathEntry(); if (legacyPathObj != nullptr) { pathEntry = legacyPathObj->GetObjectEntry(); @@ -343,36 +356,42 @@ static std::optional TrackDesignSaveFootpathGetBestEntry(PathEle } else { - auto surfaceEntry = pathElement->GetSurfaceEntry(); + auto surfaceEntry = pathElement.GetSurfaceEntry(); if (surfaceEntry != nullptr) { auto surfaceId = surfaceEntry->GetIdentifier(); - auto railingsEntry = pathElement->GetRailingsEntry(); + auto railingsEntry = pathElement.GetRailingsEntry(); auto railingsId = railingsEntry == nullptr ? "" : railingsEntry->GetIdentifier(); return RCT2::GetBestObjectEntryForSurface(surfaceId, railingsId); } } - return {}; + return std::nullopt; +} + +static TrackDesignSceneryElement TrackDesignSaveCreateFootpathDesc( + const RCTObjectEntry& pathEntry, const CoordsXY& loc, const PathElement& pathElement) +{ + auto item = TrackDesignCreateTileElementDesc(pathEntry, { loc, pathElement.GetBaseZ() }); + item.setEdges(pathElement.GetEdges()); + item.setHasSlope(pathElement.IsSloped()); + item.setSlopeDirection(pathElement.GetSlopeDirection()); + item.setIsQueue(pathElement.IsQueue()); + + return item; } static TrackDesignAddStatus TrackDesignSaveAddFootpath(const CoordsXY& loc, PathElement* pathElement) { - auto pathEntry = TrackDesignSaveFootpathGetBestEntry(pathElement); - if (!pathElement) + auto pathEntry = TrackDesignSaveFootpathGetBestEntry(*pathElement); + if (!pathEntry.has_value()) { return TrackDesignAddStatus::Fail(STR_UNSUPPORTED_OBJECT_FORMAT); } - uint8_t flags = 0; - flags |= pathElement->GetEdges(); - flags |= (pathElement->GetSlopeDirection()) << 5; - if (pathElement->IsSloped()) - flags |= 0b00010000; - if (pathElement->IsQueue()) - flags |= 1 << 7; - + auto item = TrackDesignSaveCreateFootpathDesc(pathEntry.value(), loc, *pathElement); TrackDesignSavePushTileElement(loc, reinterpret_cast(pathElement)); - TrackDesignSavePushTileElementDesc(*pathEntry, { loc.x, loc.y, pathElement->GetBaseZ() }, flags, 0, 0); + + _trackSavedTileElementsDesc.push_back(std::move(item)); return TrackDesignAddStatus::Success(); } @@ -430,17 +449,13 @@ static void TrackDesignSavePopTileElement(const CoordsXY& loc, TileElement* tile * * rct2: 0x006D2FDD */ -static void TrackDesignSavePopTileElementDesc(const ObjectEntryDescriptor& entry, const CoordsXYZ& loc, uint8_t flags) +static void TrackDesignSavePopTileElementDesc(const TrackDesignSceneryElement& desc) { size_t removeIndex = SIZE_MAX; for (size_t i = 0; i < _trackSavedTileElementsDesc.size(); i++) { - TrackDesignSceneryElement* item = &_trackSavedTileElementsDesc[i]; - if (item->loc != loc) - continue; - if (item->flags != flags) - continue; - if (item->scenery_object != entry) + TrackDesignSceneryElement& item = _trackSavedTileElementsDesc[i]; + if (item != desc) continue; removeIndex = i; @@ -458,12 +473,9 @@ static void TrackDesignSaveRemoveSmallScenery(const CoordsXY& loc, SmallSceneryE auto obj = ObjectEntryGetObject(ObjectType::SmallScenery, entryIndex); if (obj != nullptr) { - uint8_t flags = 0; - flags |= sceneryElement->GetDirection(); - flags |= sceneryElement->GetSceneryQuadrant() << 2; - + auto item = TrackDesignSaveCreateSmallSceneryDesc(*obj, loc, *sceneryElement); TrackDesignSavePopTileElement(loc, reinterpret_cast(sceneryElement)); - TrackDesignSavePopTileElementDesc(obj->GetDescriptor(), { loc.x, loc.y, sceneryElement->GetBaseZ() }, flags); + TrackDesignSavePopTileElementDesc(item); } } @@ -508,8 +520,8 @@ static void TrackDesignSaveRemoveLargeScenery(const CoordsXY& loc, LargeSceneryE { if (sequence == 0) { - uint8_t flags = largeElement->GetDirection(); - TrackDesignSavePopTileElementDesc(obj->GetDescriptor(), tileLoc, flags); + auto item = TrackDesignSaveCreateLargeSceneryDesc(*obj, tileLoc, *largeElement); + TrackDesignSavePopTileElementDesc(item); } TrackDesignSavePopTileElement({ tileLoc.x, tileLoc.y }, reinterpret_cast(largeElement)); } @@ -523,30 +535,20 @@ static void TrackDesignSaveRemoveWall(const CoordsXY& loc, WallElement* wallElem auto obj = ObjectEntryGetObject(ObjectType::Walls, entryIndex); if (obj != nullptr) { - uint8_t flags = 0; - flags |= wallElement->GetDirection(); - flags |= wallElement->GetTertiaryColour() << 2; - + auto item = TrackDesignSaveCreateWallDesc(*obj, loc, *wallElement); TrackDesignSavePopTileElement(loc, reinterpret_cast(wallElement)); - TrackDesignSavePopTileElementDesc(obj->GetDescriptor(), { loc.x, loc.y, wallElement->GetBaseZ() }, flags); + TrackDesignSavePopTileElementDesc(item); } } static void TrackDesignSaveRemoveFootpath(const CoordsXY& loc, PathElement* pathElement) { - auto pathEntry = TrackDesignSaveFootpathGetBestEntry(pathElement); - if (pathElement) + auto pathEntry = TrackDesignSaveFootpathGetBestEntry(*pathElement); + if (pathEntry.has_value()) { - uint8_t flags = 0; - flags |= pathElement->GetEdges(); - flags |= (pathElement->GetSlopeDirection()) << 5; - if (pathElement->IsSloped()) - flags |= 0b00010000; - if (pathElement->IsQueue()) - flags |= 1 << 7; - + auto item = TrackDesignSaveCreateFootpathDesc(pathEntry.value(), loc, *pathElement); TrackDesignSavePopTileElement(loc, reinterpret_cast(pathElement)); - TrackDesignSavePopTileElementDesc(ObjectEntryDescriptor(*pathEntry), { loc.x, loc.y, pathElement->GetBaseZ() }, flags); + TrackDesignSavePopTileElementDesc(item); } } diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index afea2c0af6..afacfe7332 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -23,6 +23,9 @@ #include "../paint/support/MetalSupports.h" #include "../paint/support/WoodenSupports.h" #include "../paint/tile_element/Paint.TileElement.h" +#include "../paint/tile_element/Segment.h" +#include "../paint/track/Segment.h" +#include "../paint/track/Support.h" #include "../scenario/Scenario.h" #include "../sprites.h" #include "../world/Map.h" @@ -50,85 +53,6 @@ static constexpr TileCoordsXY EntranceOffsetEdgeNW[] = { { -1, 0 }, }; -const MetalSupportPlace DiagSupportPlacement[] = { - MetalSupportPlace::LeftCorner, - MetalSupportPlace::TopCorner, - MetalSupportPlace::RightCorner, - MetalSupportPlace::BottomCorner, -}; - -const uint32_t floorSpritesCork[] = { - SPR_FLOOR_CORK_SE_SW, - SPR_FLOOR_CORK_SW, - SPR_FLOOR_CORK_SE, - SPR_FLOOR_CORK, -}; - -const uint32_t floorSpritesMetal[] = { - SPR_FLOOR_METAL, - SPR_FLOOR_METAL, - SPR_FLOOR_METAL, - SPR_FLOOR_METAL, -}; - -const uint32_t floorSpritesMetalB[] = { - SPR_FLOOR_METAL_B, - SPR_FLOOR_METAL_B, - SPR_FLOOR_METAL_B, - SPR_FLOOR_METAL_B, -}; - -const uint32_t fenceSpritesRope[] = { - SPR_FENCE_ROPE_NE, - SPR_FENCE_ROPE_SE, - SPR_FENCE_ROPE_SW, - SPR_FENCE_ROPE_NW, -}; - -const uint32_t fenceSpritesMetal[] = { - SPR_FENCE_METAL_NE, - SPR_FENCE_METAL_SE, - SPR_FENCE_METAL_SW, - SPR_FENCE_METAL_NW, -}; - -const uint32_t fenceSpritesMetalB[] = { - SPR_FENCE_METAL_B_NE, - SPR_FENCE_METAL_B_SE, - SPR_FENCE_METAL_B_SW, - SPR_FENCE_METAL_B_NW, -}; - -const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3] = { - { - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2, - }, - { - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_2, - }, - { - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_0, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_1, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_2, - }, - { - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2, - } -}; - -const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile[4] = { - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_SW_NW, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_NW_NE, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_NE_SE, - SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_SE_SW, -}; - static constexpr uint32_t trackSpritesGhostTrainSpinningTunnel[2][2][4] = { { { @@ -1238,20 +1162,13 @@ constexpr CoordsXY defaultDiagBoundLengths[4] = { { 32, 32 }, }; -static constexpr int8_t diag_sprite_map[4][4] = { - { -1, 0, -1, -1 }, - { -1, -1, -1, 0 }, - { -1, -1, 0, -1 }, - { 0, -1, -1, -1 }, -}; - void TrackPaintUtilDiagTilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, - const ImageId colourFlags, const uint32_t sprites[4], const CoordsXY offsets[4], const CoordsXY boundsLengths[4], - const CoordsXYZ boundsOffsets[4]) + const uint32_t sprites[4], const CoordsXY offsets[4], const CoordsXY boundsLengths[4], const CoordsXYZ boundsOffsets[4], + int8_t additionalBoundsHeight, const ImageId colourFlags) { - int32_t index = diag_sprite_map[direction][trackSequence]; - if (index < 0) + auto shouldDraw = kDiagSpriteMap[direction][trackSequence]; + if (!shouldDraw) { return; } @@ -1259,25 +1176,45 @@ void TrackPaintUtilDiagTilesPaint( auto imageId = colourFlags.WithIndex(sprites[direction]); CoordsXY offset = (offsets == nullptr ? CoordsXY() : offsets[direction]); CoordsXY boundsLength = boundsLengths[direction]; - CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction]); + CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, additionalBoundsHeight) : boundsOffsets[direction]); PaintAddImageAsParent( session, imageId, { offset, height }, { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, { boundsLength, thickness } }); } -const uint8_t mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[] = { +void TrackPaintUtilDiagTilesPaintExtra( + PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, + const uint32_t sprites[4], MetalSupportType supportType) +{ + TrackPaintUtilDiagTilesPaint( + session, thickness, height, direction, trackSequence, sprites, defaultDiagTileOffsets, defaultDiagBoundLengths, + nullptr); + + if (SupportedSequences::kDiagStraightFlat[trackSequence] != MetalSupportPlace::None) + { + MetalASupportsPaintSetupRotated( + session, supportType, SupportedSequences::kDiagStraightFlat[trackSequence], direction, 0, height, + session.SupportColours); + } + + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); +} + +const uint8_t kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[] = { 6, 4, 5, 3, 1, 2, 0, }; -const uint8_t mapReversedDiagonalStraight[4] = { +const uint8_t kMapReversedDiagonalStraight[4] = { 3, 2, 1, 0, }; -constexpr CoordsXY defaultRightQuarterTurn5TilesOffsets[4][5] = { +constexpr CoordsXY kDefaultRightQuarterTurn5TilesOffsets[4][5] = { { { 0, 6 }, { 0, 16 }, @@ -1308,7 +1245,7 @@ constexpr CoordsXY defaultRightQuarterTurn5TilesOffsets[4][5] = { }, }; -constexpr CoordsXYZ defaultRightQuarterTurn5TilesBoundOffsets[4][5] = { +constexpr CoordsXYZ kDefaultRightQuarterTurn5TilesBoundOffsets[4][5] = { { { 0, 6, 0 }, { 0, 16, 0 }, @@ -1339,7 +1276,7 @@ constexpr CoordsXYZ defaultRightQuarterTurn5TilesBoundOffsets[4][5] = { }, }; -constexpr CoordsXY defaultRightQuarterTurn5TilesBoundLengths[4][5] = { +constexpr CoordsXY kDefaultRightQuarterTurn5TilesBoundLengths[4][5] = { { { 32, 20 }, { 32, 16 }, @@ -1430,31 +1367,10 @@ void TrackPaintUtilRightQuarterTurn5TilesPaint3( PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size); } -void TrackPaintUtilRightQuarterTurn5TilesTunnel( - PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType) -{ - if (direction == 0 && trackSequence == 0) - { - PaintUtilPushTunnelLeft(session, height, tunnelType); - } - if (direction == 0 && trackSequence == 6) - { - PaintUtilPushTunnelRight(session, height, tunnelType); - } - if (direction == 1 && trackSequence == 6) - { - PaintUtilPushTunnelLeft(session, height, tunnelType); - } - if (direction == 3 && trackSequence == 0) - { - PaintUtilPushTunnelRight(session, height, tunnelType); - } -} - void TrackPaintUtilRightQuarterTurn5TilesWoodenSupports( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence) { - static constexpr WoodenSupportSubType supportTypes[NumOrthogonalDirections][7] = { + static constexpr WoodenSupportSubType supportTypes[kNumOrthogonalDirections][7] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::Null, WoodenSupportSubType::Corner3, WoodenSupportSubType::Corner1, @@ -1472,7 +1388,7 @@ void TrackPaintUtilRightQuarterTurn5TilesWoodenSupports( } } -const uint8_t mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[] = { +const uint8_t kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[] = { 3, 1, 2, @@ -1698,72 +1614,6 @@ void TrackPaintUtilRightQuarterTurn3TilesPaint4( PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size); } -void TrackPaintUtilRightQuarterTurn3TilesTunnel( - PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType) -{ - if (direction == 0 && trackSequence == 0) - { - PaintUtilPushTunnelLeft(session, height, tunnelType); - } - - if (direction == 0 && trackSequence == 3) - { - PaintUtilPushTunnelRight(session, height, tunnelType); - } - - if (direction == 1 && trackSequence == 3) - { - PaintUtilPushTunnelLeft(session, height, tunnelType); - } - - if (direction == 3 && trackSequence == 0) - { - PaintUtilPushTunnelRight(session, height, tunnelType); - } -} - -void TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel( - PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3) -{ - if (direction == 0 && trackSequence == 0) - { - PaintUtilPushTunnelLeft(session, height - 8, tunnelType0); - } - if (direction == 0 && trackSequence == 3) - { - PaintUtilPushTunnelRight(session, height + 8, tunnelType3); - } - if (direction == 1 && trackSequence == 3) - { - PaintUtilPushTunnelLeft(session, height + 8, tunnelType3); - } - if (direction == 3 && trackSequence == 0) - { - PaintUtilPushTunnelRight(session, height - 8, tunnelType0); - } -} - -void TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel( - PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3) -{ - if (direction == 0 && trackSequence == 0) - { - PaintUtilPushTunnelLeft(session, height + 8, tunnelType0); - } - if (direction == 0 && trackSequence == 3) - { - PaintUtilPushTunnelRight(session, height - 8, tunnelType3); - } - if (direction == 1 && trackSequence == 3) - { - PaintUtilPushTunnelLeft(session, height - 8, tunnelType3); - } - if (direction == 3 && trackSequence == 0) - { - PaintUtilPushTunnelRight(session, height + 8, tunnelType0); - } -} - static constexpr int8_t left_quarter_turn_3_tiles_sprite_map[] = { 2, -1, @@ -1867,30 +1717,6 @@ void TrackPaintUtilLeftQuarterTurn3TilesPaintWithHeightOffset( } } -void TrackPaintUtilLeftQuarterTurn3TilesTunnel( - PaintSession& session, int16_t height, uint8_t tunnelType, Direction direction, uint8_t trackSequence) -{ - if (direction == 0 && trackSequence == 0) - { - PaintUtilPushTunnelLeft(session, height, tunnelType); - } - - if (direction == 2 && trackSequence == 3) - { - PaintUtilPushTunnelRight(session, height, tunnelType); - } - - if (direction == 3 && trackSequence == 0) - { - PaintUtilPushTunnelRight(session, height, tunnelType); - } - - if (direction == 3 && trackSequence == 3) - { - PaintUtilPushTunnelLeft(session, height, tunnelType); - } -} - void TrackPaintUtilLeftQuarterTurn1TilePaint( PaintSession& session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction, const ImageId colourFlags, const uint32_t* sprites) @@ -1918,33 +1744,6 @@ void TrackPaintUtilLeftQuarterTurn1TilePaint( } } -void TrackPaintUtilRightQuarterTurn1TileTunnel( - PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, - uint8_t endTunnel) -{ - TrackPaintUtilLeftQuarterTurn1TileTunnel( - session, (direction + 3) % 4, baseHeight, endOffset, endTunnel, startOffset, startTunnel); -} - -void TrackPaintUtilLeftQuarterTurn1TileTunnel( - PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, - uint8_t endTunnel) -{ - switch (direction) - { - case 0: - PaintUtilPushTunnelLeft(session, baseHeight + startOffset, startTunnel); - break; - case 2: - PaintUtilPushTunnelRight(session, baseHeight + endOffset, endTunnel); - break; - case 3: - PaintUtilPushTunnelRight(session, baseHeight + startOffset, startTunnel); - PaintUtilPushTunnelLeft(session, baseHeight + endOffset, endTunnel); - break; - } -} - void TrackPaintUtilSpinningTunnelPaint(PaintSession& session, int8_t thickness, int16_t height, Direction direction) { int32_t frame = (GetGameState().CurrentTicks >> 2) & 3; diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index d343ad859a..a1f758f4f2 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -84,13 +84,12 @@ constexpr uint8_t kTrackMap1x4[][4] = { { 0, 1, 2, 3 }, }; -constexpr int32_t kDiagBlockedSegments[] = { - 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), +constexpr MetalSupportPlace kDiagSupportPlacement[] = { + MetalSupportPlace::LeftCorner, + MetalSupportPlace::TopCorner, + MetalSupportPlace::RightCorner, + MetalSupportPlace::BottomCorner, }; -extern const MetalSupportPlace DiagSupportPlacement[]; enum { @@ -296,25 +295,81 @@ enum MAZE_ENTRY_FLAG_15 = (1 << 15), }; -extern const uint32_t floorSpritesCork[]; -extern const uint32_t floorSpritesMetal[]; -extern const uint32_t floorSpritesMetalB[]; +constexpr uint32_t kFloorSpritesCork[] = { + SPR_FLOOR_CORK_SE_SW, + SPR_FLOOR_CORK_SW, + SPR_FLOOR_CORK_SE, + SPR_FLOOR_CORK, +}; +constexpr uint32_t kFloorSpritesMetal[] = { + SPR_FLOOR_METAL, + SPR_FLOOR_METAL, + SPR_FLOOR_METAL, + SPR_FLOOR_METAL, +}; +constexpr uint32_t kFloorSpritesMetalB[] = { + SPR_FLOOR_METAL_B, + SPR_FLOOR_METAL_B, + SPR_FLOOR_METAL_B, + SPR_FLOOR_METAL_B, +}; -extern const uint32_t fenceSpritesRope[]; -extern const uint32_t fenceSpritesMetal[]; -extern const uint32_t fenceSpritesMetalB[]; +constexpr uint32_t kFenceSpritesRope[] = { + SPR_FENCE_ROPE_NE, + SPR_FENCE_ROPE_SE, + SPR_FENCE_ROPE_SW, + SPR_FENCE_ROPE_NW, +}; +constexpr uint32_t kFenceSpritesMetal[] = { + SPR_FENCE_METAL_NE, + SPR_FENCE_METAL_SE, + SPR_FENCE_METAL_SW, + SPR_FENCE_METAL_NW, +}; +constexpr uint32_t kFenceSpritesMetalB[] = { + SPR_FENCE_METAL_B_NE, + SPR_FENCE_METAL_B_SE, + SPR_FENCE_METAL_B_SW, + SPR_FENCE_METAL_B_NW, +}; -extern const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3]; -extern const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile[4]; +constexpr uint32_t kTrackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3] = { + { + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2, + }, + { + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_2, + }, + { + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_0, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_1, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_2, + }, + { + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2, + } +}; +constexpr uint32_t kTrackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile[4] = { + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_SW_NW, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_NW_NE, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_NE_SE, + SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_SE_SW, +}; -extern const uint8_t mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[]; -extern const Direction mapReversedDiagonalStraight[]; +extern const uint8_t kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[]; +extern const Direction kMapReversedDiagonalStraight[]; -extern const CoordsXY defaultRightQuarterTurn5TilesOffsets[4][5]; -extern const CoordsXYZ defaultRightQuarterTurn5TilesBoundOffsets[4][5]; -extern const CoordsXY defaultRightQuarterTurn5TilesBoundLengths[4][5]; +extern const CoordsXY kDefaultRightQuarterTurn5TilesOffsets[4][5]; +extern const CoordsXYZ kDefaultRightQuarterTurn5TilesBoundOffsets[4][5]; +extern const CoordsXY kDefaultRightQuarterTurn5TilesBoundLengths[4][5]; -extern const uint8_t mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[]; +extern const uint8_t kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[]; extern const CoordsXY defaultRightQuarterTurn3TilesOffsets[4][3]; extern const CoordsXYZ defaultRightQuarterTurn3TilesBoundOffsets[4][3]; extern const CoordsXY defaultRightQuarterTurn3TilesBoundLengths[4][3]; @@ -336,6 +391,13 @@ extern const int8_t defaultEighthToDiagThickness[4][4]; extern const CoordsXY defaultDiagBoundLengths[4]; extern const CoordsXY defaultDiagTileOffsets[4]; +constexpr bool kDiagSpriteMap[kNumOrthogonalDirections][4] = { + { false, true, false, false }, + { false, false, false, true }, + { false, false, true, false }, + { true, false, false, false }, +}; + extern const uint8_t mapLeftEighthTurnToOrthogonal[5]; extern const size_t MiniGolfPeepAnimationLengths[]; @@ -386,16 +448,9 @@ void TrackPaintUtilRightQuarterTurn5TilesPaint2( void TrackPaintUtilRightQuarterTurn5TilesPaint3( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[][5]); -void TrackPaintUtilRightQuarterTurn5TilesTunnel( - PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType); + void TrackPaintUtilRightQuarterTurn5TilesWoodenSupports( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence); -void TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel( - PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0, - uint8_t tunnelType3); -void TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel( - PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0, - uint8_t tunnelType3); void TrackPaintUtilRightQuarterTurn3TilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][3], const CoordsXY offsets[4][3], const CoordsXY boundsLengths[4][3], @@ -412,16 +467,13 @@ void TrackPaintUtilRightQuarterTurn3TilesPaint3( void TrackPaintUtilRightQuarterTurn3TilesPaint4( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[4][3]); -void TrackPaintUtilRightQuarterTurn3TilesTunnel( - PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType); + void TrackPaintUtilLeftQuarterTurn3TilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][3]); void TrackPaintUtilLeftQuarterTurn3TilesPaintWithHeightOffset( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][3], int32_t heightOffset); -void TrackPaintUtilLeftQuarterTurn3TilesTunnel( - PaintSession& session, int16_t height, uint8_t tunnelType, Direction direction, uint8_t trackSequence); void TrackPaintUtilLeftQuarterTurn1TilePaint( PaintSession& session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction, const ImageId colourFlags, const uint32_t* sprites); @@ -456,15 +508,21 @@ void TrackPaintUtilEighthToDiagTilesPaint( const CoordsXYZ boundsOffsets[4][4]); void TrackPaintUtilDiagTilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, - const ImageId colourFlags, const uint32_t sprites[4], const CoordsXY offsets[4], const CoordsXY boundsLengths[4], - const CoordsXYZ boundsOffsets[4]); + const uint32_t sprites[4], const CoordsXY offsets[4], const CoordsXY boundsLengths[4], const CoordsXYZ boundsOffsets[4], + int8_t additionalBoundsHeight, const ImageId colourFlags); +inline void TrackPaintUtilDiagTilesPaint( + PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, + const uint32_t sprites[4], const CoordsXY offsets[4], const CoordsXY boundsLengths[4], + const CoordsXYZ boundsOffsets[4] = nullptr, int8_t additionalBoundsHeight = 0) +{ + TrackPaintUtilDiagTilesPaint( + session, thickness, height, direction, trackSequence, sprites, offsets, boundsLengths, boundsOffsets, + additionalBoundsHeight, session.TrackColours); +} -void TrackPaintUtilLeftQuarterTurn1TileTunnel( - PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, - uint8_t endTunnel); -void TrackPaintUtilRightQuarterTurn1TileTunnel( - PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, - uint8_t endTunnel); +void TrackPaintUtilDiagTilesPaintExtra( + PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, + const uint32_t sprites[4], MetalSupportType supportType); void TrackPaintUtilRightVerticalLoopSegments(PaintSession& session, Direction direction, uint8_t trackSequence); @@ -494,7 +552,6 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionDinghySlide(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionDinghySlideCovered(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionMineTrainRC(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionChairlift(int32_t trackType); -TRACK_PAINT_FUNCTION GetTrackPaintFunctionCorkscrewRC(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionMaze(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionSpiralSlide(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionGoKarts(int32_t trackType); diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index a81d0e8b65..f15e011765 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -19,7 +19,9 @@ #include "../audio/AudioMixer.h" #include "../audio/audio.h" #include "../config/Config.h" +#include "../core/FixedPoint.hpp" #include "../core/Memory.hpp" +#include "../core/Speed.hpp" #include "../entity/EntityRegistry.h" #include "../entity/Particle.h" #include "../entity/Yaw.hpp" @@ -780,7 +782,7 @@ void RideUpdateMeasurementsSpecialElements_Default(Ride& ride, const track_type_ uint16_t trackFlags = ted.Flags; if (trackFlags & TRACK_ELEM_FLAG_NORMAL_TO_INVERSION) { - if (ride.inversions < OpenRCT2::Limits::MaxInversions) + if (ride.inversions < OpenRCT2::Limits::kMaxInversions) ride.inversions++; } } @@ -791,7 +793,7 @@ void RideUpdateMeasurementsSpecialElements_MiniGolf(Ride& ride, const track_type uint16_t trackFlags = ted.Flags; if (trackFlags & TRACK_ELEM_FLAG_IS_GOLF_HOLE) { - if (ride.holes < OpenRCT2::Limits::MaxGolfHoles) + if (ride.holes < OpenRCT2::Limits::kMaxGolfHoles) ride.holes++; } } @@ -846,14 +848,14 @@ void Vehicle::UpdateMeasurements() if (curRide->average_speed_test_timeout == 0 && absVelocity > 0x8000) { - curRide->average_speed = AddClamp_int32_t(curRide->average_speed, absVelocity); + curRide->average_speed = AddClamp(curRide->average_speed, absVelocity); stationForTestSegment.SegmentTime++; } int32_t distance = abs(((velocity + acceleration) >> 10) * 42); if (NumLaps == 0) { - stationForTestSegment.SegmentLength = AddClamp_int32_t(stationForTestSegment.SegmentLength, distance); + stationForTestSegment.SegmentLength = AddClamp(stationForTestSegment.SegmentLength, distance); } if (curRide->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES)) @@ -868,7 +870,7 @@ void Vehicle::UpdateMeasurements() curRide->previous_lateral_g = gForces.LateralG; if (gForces.VerticalG <= 0) { - curRide->total_air_time++; + curRide->totalAirTime++; } if (gForces.VerticalG > curRide->max_positive_vertical_g) @@ -897,9 +899,11 @@ void Vehicle::UpdateMeasurements() if (!(curRide->testing_flags & RIDE_TESTING_POWERED_LIFT)) { curRide->testing_flags |= RIDE_TESTING_POWERED_LIFT; - if (curRide->drops + 64 < 0xFF) + auto numPoweredLifts = curRide->getNumPoweredLifts(); + if (numPoweredLifts < kRideMaxNumPoweredLiftsCount) { - curRide->drops += 64; + numPoweredLifts++; + curRide->setPoweredLifts(numPoweredLifts); } } } @@ -1029,11 +1033,10 @@ void Vehicle::UpdateMeasurements() curRide->testing_flags &= ~RIDE_TESTING_DROP_UP; curRide->testing_flags |= RIDE_TESTING_DROP_DOWN; - uint8_t drops = curRide->drops & 0x3F; - if (drops != 0x3F) + uint8_t drops = curRide->getNumDrops(); + if (drops < kRideMaxDropsCount) drops++; - curRide->drops &= ~0x3F; - curRide->drops |= drops; + curRide->setNumDrops(drops); curRide->start_drop_height = z / COORDS_Z_STEP; testingFlags &= ~RIDE_TESTING_DROP_UP; @@ -1061,11 +1064,10 @@ void Vehicle::UpdateMeasurements() curRide->testing_flags &= ~RIDE_TESTING_DROP_DOWN; curRide->testing_flags |= RIDE_TESTING_DROP_UP; - uint8_t drops = curRide->drops & 0x3F; - if (drops != 0x3F) + auto drops = curRide->getNumDrops(); + if (drops != kRideMaxDropsCount) drops++; - curRide->drops &= ~0x3F; - curRide->drops |= drops; + curRide->setNumDrops(drops); curRide->start_drop_height = z / COORDS_Z_STEP; } @@ -1073,7 +1075,7 @@ void Vehicle::UpdateMeasurements() if (trackFlags & TRACK_ELEM_FLAG_HELIX) { uint8_t helixes = RideGetHelixSections(*curRide); - if (helixes != OpenRCT2::Limits::MaxHelices) + if (helixes != OpenRCT2::Limits::kMaxHelices) helixes++; curRide->special_track_elements &= ~0x1F; @@ -1162,7 +1164,7 @@ void Vehicle::UpdateMeasurements() if (distance < 0) return; - curRide->sheltered_length = AddClamp_int32_t(curRide->sheltered_length, distance); + curRide->sheltered_length = AddClamp(curRide->sheltered_length, distance); } struct SoundIdVolume @@ -2350,7 +2352,7 @@ static void test_reset(Ride& ride, StationIndex curStation) ride.inversions = 0; ride.holes = 0; ride.sheltered_eighths = 0; - ride.drops = 0; + ride.dropsPoweredLifts = 0; ride.sheltered_length = 0; ride.var_11C = 0; ride.num_sheltered_sections = 0; @@ -2361,7 +2363,7 @@ static void test_reset(Ride& ride, StationIndex curStation) station.SegmentLength = 0; station.SegmentTime = 0; } - ride.total_air_time = 0; + ride.totalAirTime = 0; ride.current_test_station = curStation; WindowInvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); } @@ -2535,7 +2537,7 @@ void Vehicle::UpdateDeparting() case RideMode::UpwardLaunch: if ((curRide->launch_speed << 16) > velocity) { - acceleration = curRide->launch_speed << rtd.OperatingSettings.AccelerationFactor; + acceleration = curRide->launch_speed << rtd.BoosterSettings.AccelerationFactor; } break; case RideMode::DownwardLaunch: @@ -2762,7 +2764,7 @@ void Vehicle::CheckIfMissing() curRide->lifecycle_flags |= RIDE_LIFECYCLE_HAS_STALLED_VEHICLE; - if (gConfigNotifications.RideStalledVehicles) + if (Config::Get().notifications.RideStalledVehicles) { Formatter ft; ft.Add(GetRideComponentName(GetRideTypeDescriptor(curRide->type).NameConvention.vehicle).number); @@ -4520,7 +4522,7 @@ static void ride_train_crash(Ride& ride, uint16_t numFatalities) if (numFatalities != 0) { - if (gConfigNotifications.RideCasualties) + if (Config::Get().notifications.RideCasualties) { ride.FormatNameTo(ft); News::AddItemToQueue( @@ -7108,7 +7110,7 @@ Loc6DAEB9: auto boosterSpeed = GetBoosterSpeed(curRide.type, (brake_speed << 16)); if (boosterSpeed > _vehicleVelocityF64E08) { - acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.BoosterAcceleration + acceleration = GetRideTypeDescriptor(curRide.type).LegacyBoosterSettings.BoosterAcceleration << 16; //_vehicleVelocityF64E08 * 1.2; } } @@ -7117,10 +7119,10 @@ Loc6DAEB9: acceleration += CalculateRiderBraking(); } - if ((trackType == TrackElemType::Flat && curRide.type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) + if ((trackType == TrackElemType::Flat && curRide.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_LSM_BEHAVIOUR_ON_FLAT)) || (trackType == TrackElemType::PoweredLift)) { - acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.PoweredLiftAcceleration << 16; + acceleration = GetRideTypeDescriptor(curRide.type).LegacyBoosterSettings.PoweredLiftAcceleration << 16; } if (trackType == TrackElemType::BrakeForDrop) { @@ -7465,7 +7467,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c while (true) { auto trackType = GetTrackType(); - if (trackType == TrackElemType::Flat && curRide.type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) + if (trackType == TrackElemType::Flat && curRide.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_LSM_BEHAVIOUR_ON_FLAT)) { int32_t unkVelocity = _vehicleVelocityF64E08; if (unkVelocity < -524288) @@ -7490,7 +7492,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c auto boosterSpeed = GetBoosterSpeed(curRide.type, (brake_speed << 16)); if (boosterSpeed < _vehicleVelocityF64E08) { - acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.BoosterAcceleration << 16; + acceleration = GetRideTypeDescriptor(curRide.type).LegacyBoosterSettings.BoosterAcceleration << 16; } } diff --git a/src/openrct2/ride/VehiclePaint.cpp b/src/openrct2/ride/VehiclePaint.cpp index 39cb82727a..5381af79ca 100644 --- a/src/openrct2/ride/VehiclePaint.cpp +++ b/src/openrct2/ride/VehiclePaint.cpp @@ -11,6 +11,7 @@ #include "../Game.h" #include "../GameState.h" +#include "../core/Speed.hpp" #include "../drawing/Drawing.h" #include "../drawing/LightFX.h" #include "../entity/EntityRegistry.h" diff --git a/src/openrct2/ride/VehicleRiderControl.cpp b/src/openrct2/ride/VehicleRiderControl.cpp index 86be123f87..4423e01588 100644 --- a/src/openrct2/ride/VehicleRiderControl.cpp +++ b/src/openrct2/ride/VehicleRiderControl.cpp @@ -7,6 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../core/Speed.hpp" #include "../entity/EntityRegistry.h" #include "Vehicle.h" diff --git a/src/openrct2/ride/VehicleSubpositionData.h b/src/openrct2/ride/VehicleSubpositionData.h index 224799d0cf..f9d6feaa4c 100644 --- a/src/openrct2/ride/VehicleSubpositionData.h +++ b/src/openrct2/ride/VehicleSubpositionData.h @@ -13,7 +13,7 @@ #include -constexpr const size_t VehicleTrackSubpositionSizeDefault = TrackElemType::Count * NumOrthogonalDirections; +constexpr const size_t VehicleTrackSubpositionSizeDefault = TrackElemType::Count * kNumOrthogonalDirections; struct VehicleInfo; diff --git a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp index c49ec54db5..f6fcc86a5a 100644 --- a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp +++ b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + enum { SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE = 22164, @@ -180,12 +185,12 @@ static void AirPoweredVerticalRCTrackFlat( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void AirPoweredVerticalRCTrackStation( @@ -207,14 +212,14 @@ static void AirPoweredVerticalRCTrackStation( { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 5, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void AirPoweredVerticalRCTrackRightQuarterTurn5( @@ -254,7 +259,7 @@ static void AirPoweredVerticalRCTrackRightQuarterTurn5( TrackPaintUtilRightQuarterTurn5TilesPaint3(session, height, direction, trackSequence, session.TrackColours, imageIds); TrackPaintUtilRightQuarterTurn5TilesWoodenSupports(session, height, direction, trackSequence); - TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TunnelType::SquareFlat); switch (trackSequence) { @@ -311,14 +316,14 @@ static void AirPoweredVerticalRCTrackRightQuarterTurn5( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void AirPoweredVerticalRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; AirPoweredVerticalRCTrackRightQuarterTurn5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -344,12 +349,12 @@ static void AirPoweredVerticalRCTrackFlatToLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AFB84 */ @@ -374,12 +379,12 @@ static void AirPoweredVerticalRCTrackFlatToRightBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void AirPoweredVerticalRCTrackLeftBankToFlat( @@ -446,7 +451,7 @@ static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5( } TrackPaintUtilRightQuarterTurn5TilesWoodenSupports(session, height, direction, trackSequence); - TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TunnelType::SquareFlat); switch (trackSequence) { @@ -503,14 +508,14 @@ static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void AirPoweredVerticalRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; AirPoweredVerticalRCTrackBankedRightQuarterTurn5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -537,12 +542,12 @@ static void AirPoweredVerticalRCTrackLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void AirPoweredVerticalRCTrackRightBank( @@ -567,12 +572,12 @@ static void AirPoweredVerticalRCTrackBrakes( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void AirPoweredVerticalRCTrackVerticalSlopeUp( @@ -687,13 +692,12 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp( PaintAddImageAsChildRotated( session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 20, 32, bbHeight } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); break; case 1: case 2: @@ -717,15 +721,15 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (trackSequence == 0) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); break; case 4: if (isDirection03) @@ -746,13 +750,13 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); break; case 5: if (WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours)) + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours)) { ImageId floorImageId; if (direction & 1) @@ -773,7 +777,7 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp( session, direction, supportsImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 126 } }); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); break; case 6: if (isDirection03) @@ -791,12 +795,12 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp( session, direction, supportsImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetVerticalTunnel(session, height + 240); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); break; } } @@ -837,7 +841,7 @@ static void AirPoweredVerticalRCTrackVerticalUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); } static void AirPoweredVerticalRCTrackVerticalTop( @@ -939,7 +943,7 @@ static void AirPoweredVerticalRCTrackVerticalTop( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); } static void AirPoweredVerticalRCTrackVerticalDown( @@ -972,19 +976,19 @@ static void AirPoweredVerticalRCTrackBooster( { auto imageId = colour.WithIndex(SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { auto imageId = colour.WithIndex(SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void AirPoweredVerticalRCTrackOnridePhoto( @@ -1002,13 +1006,13 @@ static void AirPoweredVerticalRCTrackOnridePhoto( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionAirPoweredVerticalRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/AlpineCoaster.cpp b/src/openrct2/ride/coaster/AlpineCoaster.cpp index 2ab9d5a0b0..73ba5cae05 100644 --- a/src/openrct2/ride/coaster/AlpineCoaster.cpp +++ b/src/openrct2/ride/coaster/AlpineCoaster.cpp @@ -18,12 +18,17 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Fork; + namespace AlpineRC { static void TrackFlat( @@ -58,8 +63,8 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); } } else @@ -82,17 +87,14 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackStation( @@ -123,9 +125,9 @@ namespace AlpineRC { 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); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void Track25DegUp( @@ -160,8 +162,8 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 8, height, + session.SupportColours); } } else @@ -192,24 +194,21 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 8, height, + session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackFlatTo25DegUp( @@ -244,8 +243,8 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 3, height, + session.SupportColours); } } else @@ -276,24 +275,21 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 3, height, + session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void Track25DegUpToFlat( @@ -328,8 +324,8 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 6, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 6, height, + session.SupportColours); } } else @@ -360,24 +356,21 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 6, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 6, height, + session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void Track25DegDown( @@ -432,11 +425,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -446,10 +439,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -483,7 +476,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -510,15 +503,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 0, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -529,7 +522,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -538,7 +531,7 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -573,11 +566,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -587,10 +580,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -624,7 +617,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -658,10 +651,10 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -695,7 +688,7 @@ namespace AlpineRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -722,15 +715,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 0, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -741,7 +734,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -750,7 +743,7 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -785,19 +778,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -831,7 +820,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -865,7 +854,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -876,7 +865,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -894,7 +883,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 7)), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -909,7 +898,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 15)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -920,7 +909,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -956,19 +945,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1002,7 +987,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1036,7 +1021,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1047,7 +1032,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1065,7 +1050,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 23)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1080,8 +1065,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 31)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1092,7 +1076,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1117,181 +1101,15 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 3)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 3)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 2)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 2)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL, SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 1, SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 2, + SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 3 }, + { SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL, SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 1, + SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 2, SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 3 }, + }; + + TrackPaintUtilDiagTilesPaintExtra( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], kSupportType); } static void TrackDiag25DegUp( @@ -1332,7 +1150,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -1366,7 +1184,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -1400,7 +1218,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -1409,8 +1227,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1423,8 +1240,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1439,8 +1255,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1452,8 +1267,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1470,7 +1284,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -1513,7 +1327,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -1547,7 +1361,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -1581,7 +1395,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -1590,8 +1404,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1604,8 +1417,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1620,8 +1432,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1633,8 +1444,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1651,7 +1461,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -1694,7 +1504,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -1728,7 +1538,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -1762,7 +1572,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -1771,8 +1581,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 2, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1785,8 +1594,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 2, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1801,8 +1609,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 2, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1814,8 +1621,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 2, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 2, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1832,7 +1638,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1875,7 +1681,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -1909,7 +1715,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -1943,7 +1749,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -1952,8 +1758,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1966,8 +1771,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1982,8 +1786,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1995,8 +1798,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2013,7 +1815,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2130,8 +1932,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2144,8 +1945,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2160,8 +1960,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2173,8 +1972,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2194,7 +1992,7 @@ namespace AlpineRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiag25DegDownToFlat( @@ -2235,7 +2033,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -2269,7 +2067,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -2303,7 +2101,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -2312,8 +2110,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2326,8 +2123,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2342,8 +2138,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2355,8 +2150,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2373,7 +2167,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2414,16 +2208,13 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackFlatToRightBank( @@ -2462,16 +2253,13 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackLeftBankToFlat( @@ -2524,23 +2312,20 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 3, height, + session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackRightBankTo25DegUp( @@ -2579,23 +2364,20 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 3, height, + session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void Track25DegUpToLeftBank( @@ -2634,23 +2416,20 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 6, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 6, height, + session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void Track25DegUpToRightBank( @@ -2689,23 +2468,20 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 6, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 6, height, + session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackLeftBankTo25DegDown( @@ -2766,16 +2542,13 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackRightBank( @@ -2809,7 +2582,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2833,7 +2606,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2853,14 +2626,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2873,7 +2646,7 @@ namespace AlpineRC break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -2889,7 +2662,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2918,7 +2691,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2938,7 +2711,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2962,14 +2735,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2982,7 +2755,7 @@ namespace AlpineRC break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -2998,7 +2771,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3027,7 +2800,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3051,7 +2824,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3071,14 +2844,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3091,7 +2864,7 @@ namespace AlpineRC break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -3107,7 +2880,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3136,7 +2909,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3156,7 +2929,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3180,14 +2953,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3200,7 +2973,7 @@ namespace AlpineRC break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -3216,7 +2989,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3245,7 +3018,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3269,7 +3042,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3289,14 +3062,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3309,7 +3082,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -3325,7 +3098,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3354,7 +3127,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3374,7 +3147,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3398,14 +3171,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3418,7 +3191,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -3434,7 +3207,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3463,7 +3236,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -3487,7 +3260,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -3507,14 +3280,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3527,7 +3300,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -3543,7 +3316,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -3572,7 +3345,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -3592,7 +3365,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -3616,14 +3389,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3636,7 +3409,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -3652,7 +3425,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -3729,7 +3502,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3742,7 +3515,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -3761,7 +3534,7 @@ namespace AlpineRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiagRightBankTo25DegDown( @@ -3836,7 +3609,7 @@ namespace AlpineRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3849,7 +3622,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -3868,7 +3641,7 @@ namespace AlpineRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiag25DegDownToLeftBank( @@ -3895,7 +3668,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3919,7 +3692,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3939,14 +3712,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3959,7 +3732,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -3975,7 +3748,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4004,7 +3777,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -4024,7 +3797,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4048,14 +3821,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4068,7 +3841,7 @@ namespace AlpineRC break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -4084,7 +3857,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4113,7 +3886,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4133,7 +3906,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4153,14 +3926,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4173,7 +3946,7 @@ namespace AlpineRC break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -4189,7 +3962,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4218,7 +3991,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4238,7 +4011,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4258,14 +4031,14 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4278,7 +4051,7 @@ namespace AlpineRC break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -4294,7 +4067,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4333,11 +4106,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 2, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 2, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4347,10 +4120,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4384,7 +4157,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4414,15 +4187,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 2, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 2, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4433,7 +4206,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4442,7 +4215,7 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4480,11 +4253,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 1, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 1, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4494,10 +4267,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4531,7 +4304,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4565,10 +4338,10 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4602,7 +4375,7 @@ namespace AlpineRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4632,15 +4405,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 1, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 1, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4651,7 +4424,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4660,7 +4433,7 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4695,19 +4468,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4741,7 +4510,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4775,7 +4544,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -4786,7 +4555,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4804,7 +4573,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 7)), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4819,7 +4588,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 15)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4830,7 +4599,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4866,19 +4635,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4912,7 +4677,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4946,7 +4711,7 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -4957,7 +4722,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4975,7 +4740,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 23)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4990,8 +4755,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 31)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5002,7 +4766,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5054,11 +4818,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 8, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -5068,13 +4832,13 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5101,15 +4865,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 8, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -5120,7 +4884,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5156,11 +4920,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 8, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -5170,13 +4934,13 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5193,7 +4957,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_SMALL_CURVE + 11)), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5207,16 +4971,16 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_SMALL_CURVE + 15)), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -5227,7 +4991,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5236,7 +5000,7 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackRightQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -5244,7 +5008,7 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -5279,11 +5043,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 8, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -5293,10 +5057,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5330,7 +5094,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -5364,10 +5128,10 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -5401,7 +5165,7 @@ namespace AlpineRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -5428,15 +5192,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 8, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -5447,7 +5211,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5483,11 +5247,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 8, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -5497,10 +5261,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5534,7 +5298,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -5568,10 +5332,10 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -5605,7 +5369,7 @@ namespace AlpineRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -5632,15 +5396,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 8, height, + session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -5651,7 +5415,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5660,7 +5424,7 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -5668,7 +5432,7 @@ namespace AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -5703,11 +5467,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5717,7 +5481,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5727,7 +5491,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 1)), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5756,7 +5520,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5776,7 +5540,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 1)), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5795,7 +5559,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5822,15 +5586,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5841,7 +5605,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5877,11 +5641,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5891,7 +5655,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5901,8 +5665,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 9)), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5931,7 +5694,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5951,8 +5714,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 9)), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5971,7 +5733,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5998,15 +5760,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6017,7 +5779,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6056,11 +5818,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 5, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 5, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6070,10 +5832,10 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6107,7 +5869,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6137,15 +5899,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 9, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 9, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6156,7 +5918,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6186,15 +5948,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 5, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 5, height, + session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6205,10 +5967,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -6242,7 +6004,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -6272,11 +6034,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 9, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 9, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6286,7 +6048,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6325,11 +6087,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 5, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 5, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6339,10 +6101,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6376,7 +6138,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6406,15 +6168,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 9, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 9, height, + session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6425,7 +6187,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6455,15 +6217,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 5, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 5, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6474,10 +6236,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -6511,7 +6273,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -6541,11 +6303,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 9, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 9, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6555,7 +6317,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6569,7 +6331,7 @@ namespace AlpineRC trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -6582,7 +6344,7 @@ namespace AlpineRC trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -6620,11 +6382,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 3, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6634,10 +6396,10 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6671,7 +6433,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6705,10 +6467,10 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -6742,7 +6504,7 @@ namespace AlpineRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -6772,15 +6534,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 9, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 9, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6791,7 +6553,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -6821,15 +6583,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 3, height, + session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6840,10 +6602,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -6877,7 +6639,7 @@ namespace AlpineRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -6911,10 +6673,10 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -6948,7 +6710,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -6978,11 +6740,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 9, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 9, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6992,7 +6754,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7030,11 +6792,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 3, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -7044,10 +6806,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7081,7 +6843,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -7115,10 +6877,10 @@ namespace AlpineRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -7152,7 +6914,7 @@ namespace AlpineRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -7172,7 +6934,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 32)), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7186,16 +6948,16 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 43)), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7206,7 +6968,7 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -7236,15 +6998,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 3, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7255,10 +7017,10 @@ namespace AlpineRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -7292,7 +7054,7 @@ namespace AlpineRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -7326,10 +7088,10 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -7363,7 +7125,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -7376,7 +7138,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 32)), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7390,7 +7152,7 @@ namespace AlpineRC session, direction, session.TrackColours.WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 43)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7402,7 +7164,7 @@ namespace AlpineRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -7412,7 +7174,7 @@ namespace AlpineRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7426,7 +7188,7 @@ namespace AlpineRC trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -7439,7 +7201,7 @@ namespace AlpineRC trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -7465,16 +7227,13 @@ namespace AlpineRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackLeftBankToLeftQuarterTurn3Tile25DegUp( @@ -7511,11 +7270,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 3, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -7525,13 +7284,13 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7558,15 +7317,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 10, + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 10, height - 6, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -7577,7 +7336,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -7616,11 +7375,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 3, - height, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 3, height, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -7630,13 +7389,13 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7663,15 +7422,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 10, + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 10, height - 6, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -7682,7 +7441,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -7718,11 +7477,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 8, - height - 6, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 8, height - 6, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -7732,13 +7491,13 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7768,15 +7527,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 5, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 5, height, + session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7787,7 +7546,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -7823,11 +7582,11 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 8, - height - 6, session.SupportColours); + session, direction & 1 ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 8, height - 6, + session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -7837,13 +7596,13 @@ namespace AlpineRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7873,15 +7632,15 @@ namespace AlpineRC break; } MetalASupportsPaintSetup( - session, direction & 1 ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 5, - height, session.SupportColours); + session, direction & 1 ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 5, height, + session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7892,7 +7651,7 @@ namespace AlpineRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } diff --git a/src/openrct2/ride/coaster/BobsleighCoaster.cpp b/src/openrct2/ride/coaster/BobsleighCoaster.cpp index 3dcc10d481..086900427a 100644 --- a/src/openrct2/ride/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/ride/coaster/BobsleighCoaster.cpp @@ -12,18 +12,23 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + static constexpr uint32_t BOBSLEIGH_BLOCK_BRAKE_SW_NE_OPEN = 14586; static constexpr uint32_t BOBSLEIGH_BLOCK_BRAKE_NW_SE_OPEN = 14587; static constexpr uint32_t BOBSLEIGH_BLOCK_BRAKE_SW_NE_CLOSED = 14588; static constexpr uint32_t BOBSLEIGH_BLOCK_BRAKE_NW_SE_CLOSED = 14589; -static constexpr uint32_t _BobsleighBlockBrakeImages[NumOrthogonalDirections][2] = { +static constexpr uint32_t _BobsleighBlockBrakeImages[kNumOrthogonalDirections][2] = { { BOBSLEIGH_BLOCK_BRAKE_SW_NE_OPEN, BOBSLEIGH_BLOCK_BRAKE_SW_NE_CLOSED }, { BOBSLEIGH_BLOCK_BRAKE_NW_SE_OPEN, BOBSLEIGH_BLOCK_BRAKE_NW_SE_CLOSED }, { BOBSLEIGH_BLOCK_BRAKE_SW_NE_OPEN, BOBSLEIGH_BLOCK_BRAKE_SW_NE_CLOSED }, @@ -60,8 +65,7 @@ static void BobsleighRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else @@ -89,17 +93,12 @@ static void BobsleighRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void BobsleighRCTrackStation( @@ -119,11 +118,11 @@ static void BobsleighRCTrackStation( PaintAddImageAsParentRotated( session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006FE5C4 */ @@ -170,8 +169,7 @@ static void BobsleighRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else @@ -213,24 +211,19 @@ static void BobsleighRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x006FE5D4 */ @@ -277,8 +270,7 @@ static void BobsleighRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else @@ -320,24 +312,19 @@ static void BobsleighRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x006FE5E4 */ @@ -384,8 +371,7 @@ static void BobsleighRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } else @@ -427,24 +413,19 @@ static void BobsleighRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x006FE5F4 */ @@ -514,11 +495,10 @@ static void BobsleighRCTrackLeftQuarterTurn5( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -528,10 +508,10 @@ static void BobsleighRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -577,7 +557,7 @@ static void BobsleighRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -623,10 +603,10 @@ static void BobsleighRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -672,7 +652,7 @@ static void BobsleighRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -710,15 +690,14 @@ static void BobsleighRCTrackLeftQuarterTurn5( { { 6, 0, height + 27 }, { 30, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -729,7 +708,7 @@ static void BobsleighRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -739,7 +718,7 @@ static void BobsleighRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BobsleighRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -785,16 +764,11 @@ static void BobsleighRCTrackFlatToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006FE654 */ @@ -839,16 +813,11 @@ static void BobsleighRCTrackFlatToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006FE664 */ @@ -893,16 +862,11 @@ static void BobsleighRCTrackLeftBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006FE674 */ @@ -947,16 +911,11 @@ static void BobsleighRCTrackRightBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006FE684 */ @@ -1002,11 +961,10 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1016,10 +974,10 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1065,7 +1023,7 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1111,10 +1069,10 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1160,7 +1118,7 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1198,15 +1156,14 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1217,7 +1174,7 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1227,7 +1184,7 @@ static void BobsleighRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BobsleighRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1273,23 +1230,18 @@ static void BobsleighRCTrackLeftBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x006FE6B4 */ @@ -1334,23 +1286,18 @@ static void BobsleighRCTrackRightBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x006FE6C4 */ @@ -1395,23 +1342,18 @@ static void BobsleighRCTrack25DegUpToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x006FE6D4 */ @@ -1456,23 +1398,18 @@ static void BobsleighRCTrack25DegUpToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x006FE6E4 */ @@ -1549,16 +1486,11 @@ static void BobsleighRCTrackLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006FE734 */ @@ -1612,11 +1544,10 @@ static void BobsleighRCTrackSBendLeft( { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1626,7 +1557,7 @@ static void BobsleighRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1639,7 +1570,7 @@ static void BobsleighRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(14843), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1649,7 +1580,7 @@ static void BobsleighRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(14847), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1676,7 +1607,7 @@ static void BobsleighRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1705,7 +1636,7 @@ static void BobsleighRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(14843), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1715,7 +1646,7 @@ static void BobsleighRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(14847), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1726,7 +1657,7 @@ static void BobsleighRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1764,15 +1695,14 @@ static void BobsleighRCTrackSBendLeft( { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1783,7 +1713,7 @@ static void BobsleighRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1831,11 +1761,10 @@ static void BobsleighRCTrackSBendRight( { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1845,7 +1774,7 @@ static void BobsleighRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1858,8 +1787,7 @@ static void BobsleighRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(14851), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1869,7 +1797,7 @@ static void BobsleighRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(14855), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1896,7 +1824,7 @@ static void BobsleighRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1925,8 +1853,7 @@ static void BobsleighRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(14851), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1936,7 +1863,7 @@ static void BobsleighRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(14855), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1947,7 +1874,7 @@ static void BobsleighRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1985,15 +1912,14 @@ static void BobsleighRCTrackSBendRight( { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2004,7 +1930,7 @@ static void BobsleighRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2052,11 +1978,10 @@ static void BobsleighRCTrackLeftQuarterTurn3( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2066,10 +1991,10 @@ static void BobsleighRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2115,7 +2040,7 @@ static void BobsleighRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2153,15 +2078,14 @@ static void BobsleighRCTrackLeftQuarterTurn3( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2172,7 +2096,7 @@ static void BobsleighRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2182,7 +2106,7 @@ static void BobsleighRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BobsleighRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2229,11 +2153,10 @@ static void BobsleighRCTrackLeftQuarterTurn3Bank( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2243,10 +2166,10 @@ static void BobsleighRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2292,7 +2215,7 @@ static void BobsleighRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2330,15 +2253,14 @@ static void BobsleighRCTrackLeftQuarterTurn3Bank( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2349,7 +2271,7 @@ static void BobsleighRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2359,7 +2281,7 @@ static void BobsleighRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BobsleighRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2406,11 +2328,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2420,10 +2341,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2469,7 +2390,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2507,15 +2428,14 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2526,7 +2446,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -2564,15 +2484,14 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2583,10 +2502,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -2632,7 +2551,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -2670,11 +2589,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2684,7 +2602,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2732,11 +2650,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2746,10 +2663,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2795,7 +2712,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2833,15 +2750,14 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2852,7 +2768,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -2890,15 +2806,14 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2909,10 +2824,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -2958,7 +2873,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -2996,11 +2911,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3010,7 +2924,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3025,7 +2939,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BobsleighRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3039,7 +2953,7 @@ static void BobsleighRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BobsleighRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3086,11 +3000,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3100,10 +3013,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3149,7 +3062,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3195,10 +3108,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -3244,7 +3157,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3282,15 +3195,14 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3301,7 +3213,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3339,15 +3251,14 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3358,10 +3269,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -3407,7 +3318,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -3452,10 +3363,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -3501,7 +3412,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -3539,11 +3450,10 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3553,7 +3463,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3601,11 +3511,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3615,10 +3524,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3664,7 +3573,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3709,10 +3618,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -3758,7 +3667,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3796,15 +3705,14 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3815,7 +3723,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3853,15 +3761,14 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3872,10 +3779,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -3921,7 +3828,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -3967,10 +3874,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4016,7 +3923,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4054,11 +3961,10 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4068,7 +3974,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4083,7 +3989,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BobsleighRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4097,7 +4003,7 @@ static void BobsleighRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BobsleighRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4129,16 +4035,11 @@ static void BobsleighRCTrackBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006FE864 */ @@ -4170,23 +4071,18 @@ static void BobsleighRCTrackBlockBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void BobsleighRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -4226,9 +4122,9 @@ static void BobsleighRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionBobsleighRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp index 92b48332bf..d6b539b666 100644 --- a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp +++ b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp @@ -14,6 +14,9 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" @@ -25,21 +28,21 @@ static constexpr uint32_t BM_BLOCK_BRAKE_NW_SE_OPEN = 17151; static constexpr uint32_t BM_BLOCK_BRAKE_SW_NE_CLOSED = 17152; static constexpr uint32_t BM_BLOCK_BRAKE_NW_SE_CLOSED = 17153; -static constexpr uint32_t _BolligerMabillardBlockBrakeImages[NumOrthogonalDirections][2] = { +static constexpr uint32_t _BolligerMabillardBlockBrakeImages[kNumOrthogonalDirections][2] = { { BM_BLOCK_BRAKE_SW_NE_OPEN, BM_BLOCK_BRAKE_SW_NE_CLOSED }, { BM_BLOCK_BRAKE_NW_SE_OPEN, BM_BLOCK_BRAKE_NW_SE_CLOSED }, { BM_BLOCK_BRAKE_SW_NE_OPEN, BM_BLOCK_BRAKE_SW_NE_CLOSED }, { BM_BLOCK_BRAKE_NW_SE_OPEN, BM_BLOCK_BRAKE_NW_SE_CLOSED }, }; -static constexpr const uint32_t BolligerMabillardDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr const uint32_t BolligerMabillardDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_BM_DIAG_BRAKES, SPR_G2_BM_DIAG_BRAKES + 1, SPR_G2_BM_DIAG_BRAKES, SPR_G2_BM_DIAG_BRAKES + 1, }; -static constexpr const uint32_t BolligerMabillardDiagBlockBrakeImages[2][NumOrthogonalDirections] = { +static constexpr const uint32_t BolligerMabillardDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_BM_DIAG_BRAKES + 3, SPR_G2_BM_DIAG_BRAKES + 5, @@ -94,13 +97,9 @@ static void BolligerMabillardTrackFlat( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -135,9 +134,9 @@ static void BolligerMabillardTrackStation( TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 9, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -207,18 +206,14 @@ static void BolligerMabillardTrack25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -288,18 +283,14 @@ static void BolligerMabillardTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } template @@ -369,18 +360,14 @@ static void BolligerMabillardTrackFlatTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -462,18 +449,14 @@ static void BolligerMabillardTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } template @@ -555,18 +538,14 @@ static void BolligerMabillardTrack60DegUpTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } template @@ -636,18 +615,14 @@ static void BolligerMabillardTrack25DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } template @@ -734,7 +709,7 @@ static void BolligerMabillardTrackLeftQuarterTurn5( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -744,10 +719,10 @@ static void BolligerMabillardTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -781,7 +756,7 @@ static void BolligerMabillardTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -815,10 +790,10 @@ static void BolligerMabillardTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -852,7 +827,7 @@ static void BolligerMabillardTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -882,10 +857,10 @@ static void BolligerMabillardTrackLeftQuarterTurn5( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -896,7 +871,7 @@ static void BolligerMabillardTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -906,7 +881,7 @@ static void BolligerMabillardTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BolligerMabillardTrackLeftQuarterTurn5( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -949,13 +924,9 @@ static void BolligerMabillardTrackFlatToLeftBank( { MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -996,13 +967,9 @@ static void BolligerMabillardTrackFlatToRightBank( { MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -1043,13 +1010,9 @@ static void BolligerMabillardTrackLeftBankToFlat( { MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -1090,13 +1053,9 @@ static void BolligerMabillardTrackRightBankToFlat( { MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -1143,7 +1102,7 @@ static void BolligerMabillardTrackBankedLeftQuarterTurn5( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1153,10 +1112,10 @@ static void BolligerMabillardTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1190,7 +1149,7 @@ static void BolligerMabillardTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1224,10 +1183,10 @@ static void BolligerMabillardTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1261,7 +1220,7 @@ static void BolligerMabillardTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1294,10 +1253,10 @@ static void BolligerMabillardTrackBankedLeftQuarterTurn5( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1308,7 +1267,7 @@ static void BolligerMabillardTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1318,7 +1277,7 @@ static void BolligerMabillardTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BolligerMabillardTrackBankedLeftQuarterTurn5( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1363,18 +1322,14 @@ static void BolligerMabillardTrackLeftBankTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -1417,18 +1372,14 @@ static void BolligerMabillardTrackRightBankTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -1471,18 +1422,14 @@ static void BolligerMabillardTrack25DegUpToLeftBank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } template @@ -1525,18 +1472,14 @@ static void BolligerMabillardTrack25DegUpToRightBank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } template @@ -1607,13 +1550,9 @@ static void BolligerMabillardTrackLeftBank( { MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -1658,7 +1597,7 @@ static void BolligerMabillardTrackLeftQuarterTurn525DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1668,10 +1607,10 @@ static void BolligerMabillardTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1703,7 +1642,7 @@ static void BolligerMabillardTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1736,10 +1675,10 @@ static void BolligerMabillardTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1771,7 +1710,7 @@ static void BolligerMabillardTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1801,10 +1740,10 @@ static void BolligerMabillardTrackLeftQuarterTurn525DegUp( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -1815,7 +1754,7 @@ static void BolligerMabillardTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1854,7 +1793,7 @@ static void BolligerMabillardTrackRightQuarterTurn525DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1864,10 +1803,10 @@ static void BolligerMabillardTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1899,7 +1838,7 @@ static void BolligerMabillardTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1931,10 +1870,10 @@ static void BolligerMabillardTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1966,7 +1905,7 @@ static void BolligerMabillardTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1996,10 +1935,10 @@ static void BolligerMabillardTrackRightQuarterTurn525DegUp( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -2010,7 +1949,7 @@ static void BolligerMabillardTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2020,7 +1959,7 @@ static void BolligerMabillardTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BolligerMabillardTrackRightQuarterTurn525DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2030,7 +1969,7 @@ static void BolligerMabillardTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BolligerMabillardTrackLeftQuarterTurn525DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2069,7 +2008,7 @@ static void BolligerMabillardTrackSBendLeft( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2079,7 +2018,7 @@ static void BolligerMabillardTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2115,7 +2054,7 @@ static void BolligerMabillardTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2151,7 +2090,7 @@ static void BolligerMabillardTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2181,10 +2120,10 @@ static void BolligerMabillardTrackSBendLeft( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2195,7 +2134,7 @@ static void BolligerMabillardTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2234,7 +2173,7 @@ static void BolligerMabillardTrackSBendRight( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2244,7 +2183,7 @@ static void BolligerMabillardTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2280,7 +2219,7 @@ static void BolligerMabillardTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2316,7 +2255,7 @@ static void BolligerMabillardTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2346,10 +2285,10 @@ static void BolligerMabillardTrackSBendRight( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2360,7 +2299,7 @@ static void BolligerMabillardTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2402,7 +2341,7 @@ static void BolligerMabillardTrackLeftVerticalLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2412,7 +2351,7 @@ static void BolligerMabillardTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2450,7 +2389,7 @@ static void BolligerMabillardTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2484,7 +2423,7 @@ static void BolligerMabillardTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2514,13 +2453,13 @@ static void BolligerMabillardTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2550,7 +2489,7 @@ static void BolligerMabillardTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -2584,7 +2523,7 @@ static void BolligerMabillardTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2622,7 +2561,7 @@ static void BolligerMabillardTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -2655,10 +2594,10 @@ static void BolligerMabillardTrackLeftVerticalLoop( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; } PaintUtilSetSegmentSupportHeight( @@ -2669,7 +2608,7 @@ static void BolligerMabillardTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2704,9 +2643,9 @@ static void BolligerMabillardTrackRightVerticalLoop( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2736,7 +2675,7 @@ static void BolligerMabillardTrackRightVerticalLoop( session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2762,7 +2701,7 @@ static void BolligerMabillardTrackRightVerticalLoop( { { 16, 0, height }, { 2, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2784,13 +2723,13 @@ static void BolligerMabillardTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(17613), { 0, 0, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2812,7 +2751,7 @@ static void BolligerMabillardTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(17614), { 0, 16, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -2838,7 +2777,7 @@ static void BolligerMabillardTrackRightVerticalLoop( { { 10, 16, height }, { 4, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2868,7 +2807,7 @@ static void BolligerMabillardTrackRightVerticalLoop( session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -2894,13 +2833,13 @@ static void BolligerMabillardTrackRightVerticalLoop( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } @@ -2941,7 +2880,7 @@ static void BolligerMabillardTrackLeftQuarterTurn3( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2951,10 +2890,10 @@ static void BolligerMabillardTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2988,7 +2927,7 @@ static void BolligerMabillardTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3018,10 +2957,10 @@ static void BolligerMabillardTrackLeftQuarterTurn3( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3032,7 +2971,7 @@ static void BolligerMabillardTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3042,7 +2981,7 @@ static void BolligerMabillardTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BolligerMabillardTrackLeftQuarterTurn3( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3084,7 +3023,7 @@ static void BolligerMabillardTrackLeftQuarterTurn3Bank( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3094,10 +3033,10 @@ static void BolligerMabillardTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3131,7 +3070,7 @@ static void BolligerMabillardTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3164,10 +3103,10 @@ static void BolligerMabillardTrackLeftQuarterTurn3Bank( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3178,7 +3117,7 @@ static void BolligerMabillardTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3188,7 +3127,7 @@ static void BolligerMabillardTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BolligerMabillardTrackLeftQuarterTurn3Bank( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3223,7 +3162,7 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3233,13 +3172,13 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -3265,10 +3204,10 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegUp( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3279,7 +3218,7 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3314,7 +3253,7 @@ static void BolligerMabillardTrackRightQuarterTurn325DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3324,13 +3263,13 @@ static void BolligerMabillardTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -3363,10 +3302,10 @@ static void BolligerMabillardTrackRightQuarterTurn325DegUp( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3377,7 +3316,7 @@ static void BolligerMabillardTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3387,7 +3326,7 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BolligerMabillardTrackRightQuarterTurn325DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3397,7 +3336,7 @@ static void BolligerMabillardTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BolligerMabillardTrackLeftQuarterTurn325DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3439,7 +3378,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3449,10 +3388,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3486,7 +3425,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3519,10 +3458,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3533,7 +3472,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3566,10 +3505,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3580,10 +3519,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3617,7 +3556,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3649,7 +3588,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3659,7 +3598,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3701,7 +3640,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3711,10 +3650,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3748,7 +3687,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3781,10 +3720,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3795,7 +3734,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3828,10 +3767,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3842,10 +3781,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3879,7 +3818,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3911,7 +3850,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3921,7 +3860,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3936,7 +3875,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BolligerMabillardTrackRightHalfBankedHelixUpSmall( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3951,7 +3890,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BolligerMabillardTrackLeftHalfBankedHelixUpSmall( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3993,7 +3932,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4003,10 +3942,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4040,7 +3979,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4074,10 +4013,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4111,7 +4050,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4144,10 +4083,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4158,7 +4097,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4191,10 +4130,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4205,10 +4144,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4242,7 +4181,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4275,10 +4214,10 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4312,7 +4251,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4344,7 +4283,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4354,7 +4293,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4396,7 +4335,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4406,10 +4345,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4443,7 +4382,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4476,10 +4415,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4513,7 +4452,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4553,10 +4492,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4567,7 +4506,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4600,10 +4539,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4614,10 +4553,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4651,7 +4590,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4685,10 +4624,10 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4722,7 +4661,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4761,7 +4700,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4771,7 +4710,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4786,7 +4725,7 @@ static void BolligerMabillardTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BolligerMabillardTrackRightHalfBankedHelixUpLarge( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4801,7 +4740,7 @@ static void BolligerMabillardTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BolligerMabillardTrackLeftHalfBankedHelixUpLarge( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4846,9 +4785,10 @@ static void BolligerMabillardTrackLeftQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } template @@ -4891,9 +4831,10 @@ static void BolligerMabillardTrackRightQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } template @@ -4938,13 +4879,9 @@ static void BolligerMabillardTrackBrakes( { MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -4981,18 +4918,14 @@ static void BolligerMabillardTrack25DegUpLeftBanked( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -5029,18 +4962,14 @@ static void BolligerMabillardTrack25DegUpRightBanked( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -5074,9 +5003,9 @@ static void BolligerMabillardTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -5130,11 +5059,8 @@ static void BolligerMabillardTrack90DegUp( } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -5182,15 +5108,12 @@ static void BolligerMabillardTrack60DegUpTo90DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: break; @@ -5237,18 +5160,14 @@ static void BolligerMabillardTrack90DegUpTo60DegUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); } template @@ -5284,14 +5203,11 @@ static void BolligerMabillardTrack60DegDownTo90DegDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: break; @@ -5332,14 +5248,11 @@ static void BolligerMabillardTrackLeftEighthToDiag( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5373,7 +5286,7 @@ static void BolligerMabillardTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5407,7 +5320,7 @@ static void BolligerMabillardTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5418,7 +5331,7 @@ static void BolligerMabillardTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5460,7 +5373,7 @@ static void BolligerMabillardTrackLeftEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5499,14 +5412,11 @@ static void BolligerMabillardTrackRightEighthToDiag( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5540,7 +5450,7 @@ static void BolligerMabillardTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5574,7 +5484,7 @@ static void BolligerMabillardTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5585,7 +5495,7 @@ static void BolligerMabillardTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5627,7 +5537,7 @@ static void BolligerMabillardTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5686,14 +5596,11 @@ static void BolligerMabillardTrackLeftEighthBankToDiag( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5727,7 +5634,7 @@ static void BolligerMabillardTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5761,7 +5668,7 @@ static void BolligerMabillardTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5772,7 +5679,7 @@ static void BolligerMabillardTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5814,7 +5721,7 @@ static void BolligerMabillardTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5853,14 +5760,11 @@ static void BolligerMabillardTrackRightEighthBankToDiag( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5894,7 +5798,7 @@ static void BolligerMabillardTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5928,7 +5832,7 @@ static void BolligerMabillardTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5939,7 +5843,7 @@ static void BolligerMabillardTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5981,7 +5885,7 @@ static void BolligerMabillardTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6011,168 +5915,13 @@ static void BolligerMabillardTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(17861), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(17791), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(17858), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(17788), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(17860), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(17790), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(17859), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(17789), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { 17788, 17789, 17790, 17791 }, + { 17858, 17859, 17860, 17861 }, + }; + + TrackPaintUtilDiagTilesPaintExtra( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], supportType); } template @@ -6213,7 +5962,7 @@ static void BolligerMabillardTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -6245,7 +5994,7 @@ static void BolligerMabillardTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -6278,7 +6027,7 @@ static void BolligerMabillardTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -6339,7 +6088,7 @@ static void BolligerMabillardTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6382,7 +6131,7 @@ static void BolligerMabillardTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -6414,7 +6163,7 @@ static void BolligerMabillardTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -6447,7 +6196,7 @@ static void BolligerMabillardTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -6508,7 +6257,7 @@ static void BolligerMabillardTrackDiag60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -6551,7 +6300,7 @@ static void BolligerMabillardTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -6583,7 +6332,7 @@ static void BolligerMabillardTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -6616,7 +6365,7 @@ static void BolligerMabillardTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -6677,7 +6426,7 @@ static void BolligerMabillardTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6720,7 +6469,7 @@ static void BolligerMabillardTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -6752,7 +6501,7 @@ static void BolligerMabillardTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -6785,7 +6534,7 @@ static void BolligerMabillardTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -6846,7 +6595,7 @@ static void BolligerMabillardTrackDiag25DegUpTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6889,7 +6638,7 @@ static void BolligerMabillardTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -6921,7 +6670,7 @@ static void BolligerMabillardTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -6954,7 +6703,7 @@ static void BolligerMabillardTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7015,7 +6764,7 @@ static void BolligerMabillardTrackDiag60DegUpTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7058,7 +6807,7 @@ static void BolligerMabillardTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7090,7 +6839,7 @@ static void BolligerMabillardTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7123,7 +6872,7 @@ static void BolligerMabillardTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7184,7 +6933,7 @@ static void BolligerMabillardTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7227,7 +6976,7 @@ static void BolligerMabillardTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7259,7 +7008,7 @@ static void BolligerMabillardTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7292,7 +7041,7 @@ static void BolligerMabillardTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7353,7 +7102,7 @@ static void BolligerMabillardTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7396,7 +7145,7 @@ static void BolligerMabillardTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -7428,7 +7177,7 @@ static void BolligerMabillardTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -7461,7 +7210,7 @@ static void BolligerMabillardTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -7522,7 +7271,7 @@ static void BolligerMabillardTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -7691,7 +7440,7 @@ static void BolligerMabillardTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -7732,7 +7481,7 @@ static void BolligerMabillardTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7764,7 +7513,7 @@ static void BolligerMabillardTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7797,7 +7546,7 @@ static void BolligerMabillardTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7858,7 +7607,7 @@ static void BolligerMabillardTrackDiag25DegDownTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7901,7 +7650,7 @@ static void BolligerMabillardTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7933,7 +7682,7 @@ static void BolligerMabillardTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7966,7 +7715,7 @@ static void BolligerMabillardTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -8027,7 +7776,7 @@ static void BolligerMabillardTrackDiag60DegDownTo25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8070,7 +7819,7 @@ static void BolligerMabillardTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -8102,7 +7851,7 @@ static void BolligerMabillardTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -8135,7 +7884,7 @@ static void BolligerMabillardTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -8196,7 +7945,7 @@ static void BolligerMabillardTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8239,7 +7988,7 @@ static void BolligerMabillardTrackDiagFlatTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -8271,7 +8020,7 @@ static void BolligerMabillardTrackDiagFlatTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -8304,7 +8053,7 @@ static void BolligerMabillardTrackDiagFlatTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -8365,7 +8114,7 @@ static void BolligerMabillardTrackDiagFlatTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -8408,7 +8157,7 @@ static void BolligerMabillardTrackDiag60DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -8440,7 +8189,7 @@ static void BolligerMabillardTrackDiag60DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -8473,7 +8222,7 @@ static void BolligerMabillardTrackDiag60DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -8534,7 +8283,7 @@ static void BolligerMabillardTrackDiag60DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8577,7 +8326,7 @@ static void BolligerMabillardTrackDiagFlatTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -8609,7 +8358,7 @@ static void BolligerMabillardTrackDiagFlatTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -8642,7 +8391,7 @@ static void BolligerMabillardTrackDiagFlatTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -8703,7 +8452,7 @@ static void BolligerMabillardTrackDiagFlatTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8746,7 +8495,7 @@ static void BolligerMabillardTrackDiag60DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -8778,7 +8527,7 @@ static void BolligerMabillardTrackDiag60DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -8811,7 +8560,7 @@ static void BolligerMabillardTrackDiag60DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -8872,7 +8621,7 @@ static void BolligerMabillardTrackDiag60DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -8901,7 +8650,7 @@ static void BolligerMabillardTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8922,7 +8671,7 @@ static void BolligerMabillardTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8941,7 +8690,7 @@ static void BolligerMabillardTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -8974,7 +8723,7 @@ static void BolligerMabillardTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9003,7 +8752,7 @@ static void BolligerMabillardTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9021,7 +8770,7 @@ static void BolligerMabillardTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9043,7 +8792,7 @@ static void BolligerMabillardTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -9076,7 +8825,7 @@ static void BolligerMabillardTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9105,7 +8854,7 @@ static void BolligerMabillardTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9126,7 +8875,7 @@ static void BolligerMabillardTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9145,7 +8894,7 @@ static void BolligerMabillardTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -9178,7 +8927,7 @@ static void BolligerMabillardTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9207,7 +8956,7 @@ static void BolligerMabillardTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9225,7 +8974,7 @@ static void BolligerMabillardTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9247,7 +8996,7 @@ static void BolligerMabillardTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -9280,7 +9029,7 @@ static void BolligerMabillardTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9309,7 +9058,7 @@ static void BolligerMabillardTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9330,7 +9079,7 @@ static void BolligerMabillardTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9349,7 +9098,7 @@ static void BolligerMabillardTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -9382,7 +9131,7 @@ static void BolligerMabillardTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9411,7 +9160,7 @@ static void BolligerMabillardTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9429,7 +9178,7 @@ static void BolligerMabillardTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9451,7 +9200,7 @@ static void BolligerMabillardTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -9484,7 +9233,7 @@ static void BolligerMabillardTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9513,7 +9262,7 @@ static void BolligerMabillardTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -9534,7 +9283,7 @@ static void BolligerMabillardTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -9553,7 +9302,7 @@ static void BolligerMabillardTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9586,7 +9335,7 @@ static void BolligerMabillardTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9615,7 +9364,7 @@ static void BolligerMabillardTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -9633,7 +9382,7 @@ static void BolligerMabillardTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -9655,7 +9404,7 @@ static void BolligerMabillardTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9688,7 +9437,7 @@ static void BolligerMabillardTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9790,7 +9539,7 @@ static void BolligerMabillardTrackDiagLeftBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -9890,7 +9639,7 @@ static void BolligerMabillardTrackDiagRightBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -9917,7 +9666,7 @@ static void BolligerMabillardTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9938,7 +9687,7 @@ static void BolligerMabillardTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9957,7 +9706,7 @@ static void BolligerMabillardTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -9990,7 +9739,7 @@ static void BolligerMabillardTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10019,7 +9768,7 @@ static void BolligerMabillardTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -10037,7 +9786,7 @@ static void BolligerMabillardTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -10059,7 +9808,7 @@ static void BolligerMabillardTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -10092,7 +9841,7 @@ static void BolligerMabillardTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10121,7 +9870,7 @@ static void BolligerMabillardTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10139,7 +9888,7 @@ static void BolligerMabillardTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10158,7 +9907,7 @@ static void BolligerMabillardTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -10191,7 +9940,7 @@ static void BolligerMabillardTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -10220,7 +9969,7 @@ static void BolligerMabillardTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10238,7 +9987,7 @@ static void BolligerMabillardTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10257,7 +10006,7 @@ static void BolligerMabillardTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -10290,7 +10039,7 @@ static void BolligerMabillardTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -10328,7 +10077,7 @@ static void BolligerMabillardTrackLeftBankToLeftQuarterTurn325DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10338,13 +10087,13 @@ static void BolligerMabillardTrackLeftBankToLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -10370,10 +10119,10 @@ static void BolligerMabillardTrackLeftBankToLeftQuarterTurn325DegUp( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -10384,7 +10133,7 @@ static void BolligerMabillardTrackLeftBankToLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -10422,7 +10171,7 @@ static void BolligerMabillardTrackRightBankToRightQuarterTurn325DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10432,13 +10181,13 @@ static void BolligerMabillardTrackRightBankToRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -10471,10 +10220,10 @@ static void BolligerMabillardTrackRightBankToRightQuarterTurn325DegUp( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -10485,7 +10234,7 @@ static void BolligerMabillardTrackRightBankToRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -10527,7 +10276,7 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegDownToLeftBank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -10537,13 +10286,13 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -10572,10 +10321,10 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegDownToLeftBank( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10586,7 +10335,7 @@ static void BolligerMabillardTrackLeftQuarterTurn325DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -10621,7 +10370,7 @@ static void BolligerMabillardTrackRightQuarterTurn325DegDownToRightBank( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -10631,13 +10380,13 @@ static void BolligerMabillardTrackRightQuarterTurn325DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -10666,10 +10415,10 @@ static void BolligerMabillardTrackRightQuarterTurn325DegDownToRightBank( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10680,7 +10429,7 @@ static void BolligerMabillardTrackRightQuarterTurn325DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -10710,13 +10459,9 @@ static void BolligerMabillardTrackBlockBrakes( { MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -10750,7 +10495,7 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn325DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -10760,13 +10505,13 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -10794,10 +10539,10 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn325DegUp( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -10808,7 +10553,7 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10844,7 +10589,7 @@ static void BolligerMabillardTrackRightBankedQuarterTurn325DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -10854,13 +10599,13 @@ static void BolligerMabillardTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -10895,10 +10640,10 @@ static void BolligerMabillardTrackRightBankedQuarterTurn325DegUp( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -10909,7 +10654,7 @@ static void BolligerMabillardTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10919,7 +10664,7 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BolligerMabillardTrackRightBankedQuarterTurn325DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -10929,7 +10674,7 @@ static void BolligerMabillardTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; BolligerMabillardTrackLeftBankedQuarterTurn325DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -10968,7 +10713,7 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -10978,10 +10723,10 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11014,7 +10759,7 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -11047,10 +10792,10 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -11084,7 +10829,7 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -11114,10 +10859,10 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -11128,7 +10873,7 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -11167,7 +10912,7 @@ static void BolligerMabillardTrackRightBankedQuarterTurn525DegUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -11177,10 +10922,10 @@ static void BolligerMabillardTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11213,7 +10958,7 @@ static void BolligerMabillardTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -11245,10 +10990,10 @@ static void BolligerMabillardTrackRightBankedQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -11282,7 +11027,7 @@ static void BolligerMabillardTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -11312,10 +11057,10 @@ static void BolligerMabillardTrackRightBankedQuarterTurn525DegUp( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -11326,7 +11071,7 @@ static void BolligerMabillardTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -11336,7 +11081,7 @@ static void BolligerMabillardTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BolligerMabillardTrackRightBankedQuarterTurn525DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -11346,7 +11091,7 @@ static void BolligerMabillardTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -11388,18 +11133,14 @@ static void BolligerMabillardTrack25DegUpToLeftBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -11439,18 +11180,14 @@ static void BolligerMabillardTrack25DegUpToRightBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -11490,18 +11227,14 @@ static void BolligerMabillardTrackLeftBanked25DegUpTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -11541,18 +11274,14 @@ static void BolligerMabillardTrackRightBanked25DegUpTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -11625,18 +11354,14 @@ static void BolligerMabillardTrackLeftBankedFlatToLeftBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -11673,18 +11398,14 @@ static void BolligerMabillardTrackRightBankedFlatToRightBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -11721,18 +11442,14 @@ static void BolligerMabillardTrackLeftBanked25DegUpToLeftBankedFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } template @@ -11769,18 +11486,14 @@ static void BolligerMabillardTrackRightBanked25DegUpToRightBankedFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } template @@ -11856,18 +11569,14 @@ static void BolligerMabillardTrackFlatToLeftBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -11907,18 +11616,14 @@ static void BolligerMabillardTrackFlatToRightBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -11958,18 +11663,14 @@ static void BolligerMabillardTrackLeftBanked25DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } template @@ -12009,18 +11710,14 @@ static void BolligerMabillardTrackRightBanked25DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } template @@ -12098,11 +11795,8 @@ static void BolligerMabillardTrackLeftQuarterTurn190DegUp( } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -12148,11 +11842,8 @@ static void BolligerMabillardTrackRightQuarterTurn190DegUp( } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -12251,18 +11942,14 @@ static void BolligerMabillardTrackFlatTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); } template @@ -12338,18 +12025,14 @@ static void BolligerMabillardTrack60DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareFlat); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } template @@ -12405,18 +12088,14 @@ static void BolligerMabillardTrackBrakeForDrop( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /* The following track elements used to be specific to the Steel Twister */ @@ -12450,14 +12129,11 @@ static void BolligerMabillardTrackHalfLoopUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12491,7 +12167,7 @@ static void BolligerMabillardTrackHalfLoopUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12523,7 +12199,7 @@ static void BolligerMabillardTrackHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -12547,14 +12223,11 @@ static void BolligerMabillardTrackHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12603,9 +12276,9 @@ static void BolligerMabillardTrackLeftCorkscrewUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12632,7 +12305,7 @@ static void BolligerMabillardTrackLeftCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12672,13 +12345,13 @@ static void BolligerMabillardTrackLeftCorkscrewUp( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12717,7 +12390,7 @@ static void BolligerMabillardTrackRightCorkscrewUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12727,7 +12400,7 @@ static void BolligerMabillardTrackRightCorkscrewUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12754,7 +12427,7 @@ static void BolligerMabillardTrackRightCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12794,13 +12467,13 @@ static void BolligerMabillardTrackRightCorkscrewUp( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12860,14 +12533,11 @@ static void BolligerMabillardTrackFlatTo60DegUpLongBase( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12898,11 +12568,8 @@ static void BolligerMabillardTrackFlatTo60DegUpLongBase( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -12933,11 +12600,8 @@ static void BolligerMabillardTrackFlatTo60DegUpLongBase( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -12970,18 +12634,15 @@ static void BolligerMabillardTrackFlatTo60DegUpLongBase( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; } } @@ -13024,14 +12685,11 @@ static void BolligerMabillardTrack60DegUpToFlatLongBase( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: switch (direction) @@ -13062,11 +12720,8 @@ static void BolligerMabillardTrack60DegUpToFlatLongBase( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 2: switch (direction) @@ -13097,11 +12752,8 @@ static void BolligerMabillardTrack60DegUpToFlatLongBase( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -13134,18 +12786,15 @@ static void BolligerMabillardTrack60DegUpToFlatLongBase( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13221,7 +12870,7 @@ static void BolligerMabillardTrackLeftBarrelRollUpToDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -13231,7 +12880,7 @@ static void BolligerMabillardTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13277,7 +12926,7 @@ static void BolligerMabillardTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13318,10 +12967,10 @@ static void BolligerMabillardTrackLeftBarrelRollUpToDown( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } PaintUtilSetSegmentSupportHeight( @@ -13332,7 +12981,7 @@ static void BolligerMabillardTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13390,7 +13039,7 @@ static void BolligerMabillardTrackRightBarrelRollUpToDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -13400,7 +13049,7 @@ static void BolligerMabillardTrackRightBarrelRollUpToDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13446,7 +13095,7 @@ static void BolligerMabillardTrackRightBarrelRollUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13487,10 +13136,10 @@ static void BolligerMabillardTrackRightBarrelRollUpToDown( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } PaintUtilSetSegmentSupportHeight( @@ -13501,7 +13150,7 @@ static void BolligerMabillardTrackRightBarrelRollUpToDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13555,18 +13204,14 @@ static void BolligerMabillardTrackPoweredLift( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -13603,14 +13248,11 @@ static void BolligerMabillardTrackLeftLargeHalfLoopUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -13638,11 +13280,8 @@ static void BolligerMabillardTrackLeftLargeHalfLoopUp( } MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13676,7 +13315,7 @@ static void BolligerMabillardTrackLeftLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -13718,7 +13357,7 @@ static void BolligerMabillardTrackLeftLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -13752,7 +13391,7 @@ static void BolligerMabillardTrackLeftLargeHalfLoopUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -13786,7 +13425,7 @@ static void BolligerMabillardTrackLeftLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -13814,7 +13453,7 @@ static void BolligerMabillardTrackLeftLargeHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -13824,7 +13463,7 @@ static void BolligerMabillardTrackLeftLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13863,14 +13502,11 @@ static void BolligerMabillardTrackRightLargeHalfLoopUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -13898,11 +13534,8 @@ static void BolligerMabillardTrackRightLargeHalfLoopUp( } MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13936,7 +13569,7 @@ static void BolligerMabillardTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -13978,7 +13611,7 @@ static void BolligerMabillardTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -14012,7 +13645,7 @@ static void BolligerMabillardTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -14046,7 +13679,7 @@ static void BolligerMabillardTrackRightLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -14074,7 +13707,7 @@ static void BolligerMabillardTrackRightLargeHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14084,7 +13717,7 @@ static void BolligerMabillardTrackRightLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -14141,7 +13774,7 @@ static void BolligerMabillardTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -14172,7 +13805,7 @@ static void BolligerMabillardTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -14200,14 +13833,14 @@ static void BolligerMabillardTrack90DegToInvertedFlatQuarterLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -14245,13 +13878,9 @@ void BolligerMabillardTrackBooster( { MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -14288,7 +13917,7 @@ static void BolligerMabillardTrackLeftTwistDownToUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14298,7 +13927,7 @@ static void BolligerMabillardTrackLeftTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14328,7 +13957,7 @@ static void BolligerMabillardTrackLeftTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14363,13 +13992,13 @@ static void BolligerMabillardTrackLeftTwistDownToUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 32, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height - 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 32, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14408,7 +14037,7 @@ static void BolligerMabillardTrackRightTwistDownToUp( MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14418,7 +14047,7 @@ static void BolligerMabillardTrackRightTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14448,7 +14077,7 @@ static void BolligerMabillardTrackRightTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14483,13 +14112,13 @@ static void BolligerMabillardTrackRightTwistDownToUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 16, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height - 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 16, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14533,9 +14162,9 @@ static void BolligerMabillardTrackLeftTwistUpToDown( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 24, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 24, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14565,7 +14194,7 @@ static void BolligerMabillardTrackLeftTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14595,10 +14224,10 @@ static void BolligerMabillardTrackLeftTwistUpToDown( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -14609,7 +14238,7 @@ static void BolligerMabillardTrackLeftTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14653,9 +14282,9 @@ static void BolligerMabillardTrackRightTwistUpToDown( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14685,7 +14314,7 @@ static void BolligerMabillardTrackRightTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14715,10 +14344,10 @@ static void BolligerMabillardTrackRightTwistUpToDown( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 16, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height - 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 16, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -14729,7 +14358,7 @@ static void BolligerMabillardTrackRightTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14740,17 +14369,17 @@ static void BolligerMabillardTrackDiagBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, BolligerMabillardDiagBrakeImages, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 3, height, direction, trackSequence, BolligerMabillardDiagBrakeImages, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalASupportsPaintSetup(session, supportType, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -14759,18 +14388,17 @@ static void BolligerMabillardTrackDiagBlockBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, - BolligerMabillardDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 3, height, direction, trackSequence, BolligerMabillardDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalASupportsPaintSetup(session, supportType, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template TRACK_PAINT_FUNCTION GetTrackPaintFunctionBolligerMabillard(int32_t trackType) diff --git a/src/openrct2/ride/coaster/ClassicStandUpRollerCoaster.cpp b/src/openrct2/ride/coaster/ClassicStandUpRollerCoaster.cpp index 46ab987077..ab520e5f20 100644 --- a/src/openrct2/ride/coaster/ClassicStandUpRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/ClassicStandUpRollerCoaster.cpp @@ -7,12 +7,17 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../Track.h" #include "../TrackPaint.h" #include +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + static constexpr ImageIndex kClassicStandUpRcFlatToRightBank0 = SPR_CSG_BEGIN + 67009; static constexpr ImageIndex kClassicStandUpRcFlatToLeftBank2 = SPR_CSG_BEGIN + 67010; static constexpr ImageIndex kClassicStandUpRcFlatToLeftBank0 = SPR_CSG_BEGIN + 67011; @@ -142,7 +147,7 @@ static void classicStandUpRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[NumOrthogonalDirections] = { + static constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRcFlatToLeftBank0, kClassicStandUpRcFlatToLeftBank1, kClassicStandUpRcFlatToLeftBank2, @@ -154,24 +159,19 @@ static void classicStandUpRCTrackFlatToLeftBank( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void classicStandUpRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[NumOrthogonalDirections] = { + static constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRcFlatToRightBank0, kClassicStandUpRcFlatToRightBank1, kClassicStandUpRcFlatToRightBank2, @@ -183,17 +183,12 @@ static void classicStandUpRCTrackFlatToRightBank( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void classicStandUpRCTrackLeftBankToFlat( @@ -201,7 +196,7 @@ static void classicStandUpRCTrackLeftBankToFlat( const TrackElement& trackElement) { return classicStandUpRCTrackFlatToRightBank( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrackRightBankToFlat( @@ -209,7 +204,7 @@ static void classicStandUpRCTrackRightBankToFlat( const TrackElement& trackElement) { return classicStandUpRCTrackFlatToLeftBank( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrackBankedRightQuarterTurn5( @@ -220,7 +215,7 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( { case 0: { - constexpr ImageIndex map[NumOrthogonalDirections] = { + constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRcRightTurn5TilesBanked0_0, kClassicStandUpRcRightTurn5TilesBanked1_0, kClassicStandUpRcRightTurn5TilesBanked2_0, @@ -230,15 +225,14 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(map[direction]), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -360,7 +354,7 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( case 6: { - constexpr ImageIndex map[NumOrthogonalDirections] = { + constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRcRightTurn5TilesBanked0_4, kClassicStandUpRcRightTurn5TilesBanked1_4, kClassicStandUpRcRightTurn5TilesBanked2_4, @@ -370,11 +364,10 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(map[direction]), { 6, 0, height }, { 20, 32, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 1 || direction == 0) { - PaintUtilPushTunnelRotated(session, direction ^ 1, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction ^ 1, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -388,15 +381,15 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void classicStandUpRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - direction = (direction + 1) % NumOrthogonalDirections; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + direction = (direction + 1) % kNumOrthogonalDirections; return classicStandUpRCTrackBankedRightQuarterTurn5(session, ride, trackSequence, direction, height, trackElement); } @@ -404,7 +397,7 @@ static void classicStandUpRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[NumOrthogonalDirections] = { + static constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRcLeftBankedTo25DegUp0, kClassicStandUpRcLeftBankedTo25DegUp1, kClassicStandUpRcLeftBankedTo25DegUp2, @@ -416,31 +409,26 @@ static void classicStandUpRCTrackLeftBankTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void classicStandUpRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[NumOrthogonalDirections] = { + static constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRcRightBankedTo25DegUp0, kClassicStandUpRcRightBankedTo25DegUp1, kClassicStandUpRcRightBankedTo25DegUp2, @@ -452,31 +440,26 @@ static void classicStandUpRCTrackRightBankTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void classicStandUpRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[NumOrthogonalDirections] = { + static constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRc25DegUpToFlatLeftBanked0, kClassicStandUpRc25DegUpToFlatLeftBanked1, kClassicStandUpRc25DegUpToFlatLeftBanked2, @@ -488,31 +471,26 @@ static void classicStandUpRCTrack25DegUpToLeftBank( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void classicStandUpRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[NumOrthogonalDirections] = { + static constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRc25DegUpToFlatRightBanked0, kClassicStandUpRc25DegUpToFlatRightBanked1, kClassicStandUpRc25DegUpToFlatRightBanked2, @@ -524,24 +502,19 @@ static void classicStandUpRCTrack25DegUpToRightBank( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void classicStandUpRCTrackLeftBankTo25DegDown( @@ -549,7 +522,7 @@ static void classicStandUpRCTrackLeftBankTo25DegDown( const TrackElement& trackElement) { classicStandUpRCTrack25DegUpToRightBank( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrackRightBankTo25DegDown( @@ -557,7 +530,7 @@ static void classicStandUpRCTrackRightBankTo25DegDown( const TrackElement& trackElement) { classicStandUpRCTrack25DegUpToLeftBank( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrack25DegDownToLeftBank( @@ -565,7 +538,7 @@ static void classicStandUpRCTrack25DegDownToLeftBank( const TrackElement& trackElement) { classicStandUpRCTrackRightBankTo25DegUp( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrack25DegDownToRightBank( @@ -573,14 +546,14 @@ static void classicStandUpRCTrack25DegDownToRightBank( const TrackElement& trackElement) { classicStandUpRCTrackLeftBankTo25DegUp( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[NumOrthogonalDirections] = { + static constexpr ImageIndex map[kNumOrthogonalDirections] = { kClassicStandUpRcLeftBanked0, kClassicStandUpRcLeftBanked1, kClassicStandUpRcLeftBanked2, @@ -592,17 +565,12 @@ static void classicStandUpRCTrackLeftBank( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void classicStandUpRCTrackRightBank( @@ -610,14 +578,14 @@ static void classicStandUpRCTrackRightBank( const TrackElement& trackElement) { return classicStandUpRCTrackLeftBank( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[5][NumOrthogonalDirections] = { + static constexpr ImageIndex map[5][kNumOrthogonalDirections] = { { kClassicStandUpRcLeftBankedOrthogonalToDiag0_0, kClassicStandUpRcLeftBankedOrthogonalToDiag1_0, kClassicStandUpRcLeftBankedOrthogonalToDiag2_0, kClassicStandUpRcLeftBankedOrthogonalToDiag3_0 }, { kClassicStandUpRcLeftBankedOrthogonalToDiag0_1, kClassicStandUpRcLeftBankedOrthogonalToDiag1_1, @@ -638,18 +606,14 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -683,7 +647,7 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -717,7 +681,7 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -728,7 +692,7 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -755,8 +719,7 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( break; } MetalASupportsPaintSetupRotated( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, direction, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, direction, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -766,7 +729,7 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -775,7 +738,7 @@ static void classicStandUpRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[5][NumOrthogonalDirections] = { + static constexpr ImageIndex map[5][kNumOrthogonalDirections] = { { kClassicStandUpRcRightBankedOrthogonalToDiag0_0, kClassicStandUpRcRightBankedOrthogonalToDiag1_0, kClassicStandUpRcRightBankedOrthogonalToDiag2_0, kClassicStandUpRcRightBankedOrthogonalToDiag3_0 }, { kClassicStandUpRcRightBankedOrthogonalToDiag0_1, kClassicStandUpRcRightBankedOrthogonalToDiag1_1, @@ -796,18 +759,14 @@ static void classicStandUpRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -841,7 +800,7 @@ static void classicStandUpRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -875,7 +834,7 @@ static void classicStandUpRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -886,7 +845,7 @@ static void classicStandUpRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -913,7 +872,7 @@ static void classicStandUpRCTrackRightEighthBankToDiag( break; } MetalASupportsPaintSetupRotated( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, direction, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -923,7 +882,7 @@ static void classicStandUpRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -933,7 +892,7 @@ static void classicStandUpRCTrackLeftEighthDiagBankToOrthogonal( const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - direction = (direction + 2) % NumOrthogonalDirections; + direction = (direction + 2) % kNumOrthogonalDirections; classicStandUpRCTrackRightEighthBankToDiag(session, ride, trackSequence, direction, height, trackElement); } @@ -942,7 +901,7 @@ static void classicStandUpRCTrackRightEighthDiagBankToOrthogonal( const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - direction = (direction + 3) % NumOrthogonalDirections; + direction = (direction + 3) % kNumOrthogonalDirections; classicStandUpRCTrackLeftEighthBankToDiag(session, ride, trackSequence, direction, height, trackElement); } @@ -950,7 +909,7 @@ static void classicStandUpRCTrackRightBankedQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr ImageIndex map[4][NumOrthogonalDirections] = { + static constexpr ImageIndex map[4][kNumOrthogonalDirections] = { { kClassicStandUpRcRightTurn3TilesBanked0_0, kClassicStandUpRcRightTurn3TilesBanked1_0, kClassicStandUpRcRightTurn3TilesBanked2_0, kClassicStandUpRcRightTurn3TilesBanked3_0 }, { ImageIndexUndefined, ImageIndexUndefined, ImageIndexUndefined, ImageIndexUndefined }, @@ -969,15 +928,14 @@ static void classicStandUpRCTrackRightBankedQuarterTurn3( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageId), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1024,11 +982,10 @@ static void classicStandUpRCTrackRightBankedQuarterTurn3( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageId), { 6, 0, height }, { 20, 32, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction ^ 1, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction ^ 1, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1041,15 +998,15 @@ static void classicStandUpRCTrackRightBankedQuarterTurn3( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void classicStandUpRCTrackLeftBankedQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - direction = (direction + 1) % NumOrthogonalDirections; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + direction = (direction + 1) % kNumOrthogonalDirections; classicStandUpRCTrackRightBankedQuarterTurn3(session, ride, trackSequence, direction, height, trackElement); } @@ -1068,14 +1025,7 @@ static inline void classicStandUpRCTrackDiagFlatWithBank( { { -16, -16, height }, { 32, 32, 3 } }); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); + break; case 1: switch (direction) @@ -1086,13 +1036,7 @@ static inline void classicStandUpRCTrackDiagFlatWithBank( { { -16, -16, height }, { 32, 32, 3 } }); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); + break; case 2: switch (direction) @@ -1103,14 +1047,7 @@ static inline void classicStandUpRCTrackDiagFlatWithBank( { { -16, -16, height }, { 32, 32, 3 } }); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); + break; case 3: switch (direction) @@ -1122,20 +1059,14 @@ static inline void classicStandUpRCTrackDiagFlatWithBank( break; } MetalASupportsPaintSetupRotated( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, direction, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 0, height, session.SupportColours); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void classicStandUpRCTrackDiagFlatToLeftBank( @@ -1160,18 +1091,18 @@ static void classicStandUpRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapReversedDiagonalStraight[trackSequence]; + trackSequence = kMapReversedDiagonalStraight[trackSequence]; return classicStandUpRCTrackDiagFlatToRightBank( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapReversedDiagonalStraight[trackSequence]; + trackSequence = kMapReversedDiagonalStraight[trackSequence]; return classicStandUpRCTrackDiagFlatToLeftBank( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } static void classicStandUpRCTrackDiagLeftBank( @@ -1188,9 +1119,9 @@ static void classicStandUpRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapReversedDiagonalStraight[trackSequence]; + trackSequence = kMapReversedDiagonalStraight[trackSequence]; return classicStandUpRCTrackDiagLeftBank( - session, ride, trackSequence, (direction + 2) % NumOrthogonalDirections, height, trackElement); + session, ride, trackSequence, (direction + 2) % kNumOrthogonalDirections, height, trackElement); } template @@ -1262,7 +1193,7 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked( break; } MetalBSupportsPaintSetupRotated( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, direction, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 4, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -1275,7 +1206,7 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked( break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void classicStandUpRCTrackDiagLeftBankTo25DegUp( @@ -1302,8 +1233,8 @@ static void classicStandUpRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapReversedDiagonalStraight[trackSequence]; - direction = (direction + 2) % NumOrthogonalDirections; + trackSequence = kMapReversedDiagonalStraight[trackSequence]; + direction = (direction + 2) % kNumOrthogonalDirections; classicStandUpRCTrackDiagRightBankTo25DegUp(session, ride, trackSequence, direction, height, trackElement); } @@ -1311,8 +1242,8 @@ static void classicStandUpRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapReversedDiagonalStraight[trackSequence]; - direction = (direction + 2) % NumOrthogonalDirections; + trackSequence = kMapReversedDiagonalStraight[trackSequence]; + direction = (direction + 2) % kNumOrthogonalDirections; classicStandUpRCTrackDiagLeftBankTo25DegUp(session, ride, trackSequence, direction, height, trackElement); } @@ -1385,7 +1316,7 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked( break; } MetalBSupportsPaintSetupRotated( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, direction, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 8, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -1398,7 +1329,7 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void classicStandUpRCTrackDiag25DegUpToLeftBank( @@ -1425,8 +1356,8 @@ static void classicStandUpRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapReversedDiagonalStraight[trackSequence]; - direction = (direction + 2) % NumOrthogonalDirections; + trackSequence = kMapReversedDiagonalStraight[trackSequence]; + direction = (direction + 2) % kNumOrthogonalDirections; classicStandUpRCTrackDiag25DegUpToRightBank(session, ride, trackSequence, direction, height, trackElement); } @@ -1434,8 +1365,8 @@ static void classicStandUpRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapReversedDiagonalStraight[trackSequence]; - direction = (direction + 2) % NumOrthogonalDirections; + trackSequence = kMapReversedDiagonalStraight[trackSequence]; + direction = (direction + 2) % kNumOrthogonalDirections; classicStandUpRCTrackDiag25DegUpToLeftBank(session, ride, trackSequence, direction, height, trackElement); } diff --git a/src/openrct2/ride/coaster/ClassicWoodenRollerCoaster.cpp b/src/openrct2/ride/coaster/ClassicWoodenRollerCoaster.cpp index abeb498630..4f71375323 100644 --- a/src/openrct2/ride/coaster/ClassicWoodenRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/ClassicWoodenRollerCoaster.cpp @@ -12,6 +12,9 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" @@ -19,6 +22,8 @@ #include "../TrackPaint.h" #include "WoodenRollerCoaster.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + enum { SPR_CLASSIC_WOODEN_RC_BRAKE_0 = SPR_CSG_BEGIN + 64985, @@ -253,10 +258,10 @@ static void ClassicWoodenRCTrackFlatToLeftBank( WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackFlatToRightBank( @@ -287,10 +292,10 @@ static void ClassicWoodenRCTrackFlatToRightBank( WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackLeftBankToFlat( @@ -334,10 +339,10 @@ static void ClassicWoodenRCTrackLeftBank( }; WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackRightBank( @@ -375,18 +380,18 @@ static void ClassicWoodenRCTrackLeftBankTo25DegUp( WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void ClassicWoodenRCTrackRightBankTo25DegUp( @@ -418,18 +423,18 @@ static void ClassicWoodenRCTrackRightBankTo25DegUp( WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void ClassicWoodenRCTrack25DegUpToLeftBank( @@ -461,18 +466,18 @@ static void ClassicWoodenRCTrack25DegUpToLeftBank( WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void ClassicWoodenRCTrack25DegUpToRightBank( @@ -504,18 +509,18 @@ static void ClassicWoodenRCTrack25DegUpToRightBank( WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void ClassicWoodenRCTrackLeftBankTo25DegDown( @@ -762,7 +767,7 @@ static void ClassicWoodenRCTrackBankedRightQuarterTurn5( }, }, }; - static constexpr WoodenSupportSubType supportType[NumOrthogonalDirections][7] = { + static constexpr WoodenSupportSubType supportType[kNumOrthogonalDirections][7] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::Null, WoodenSupportSubType::Corner3, WoodenSupportSubType::Corner1, @@ -791,22 +796,21 @@ static void ClassicWoodenRCTrackBankedRightQuarterTurn5( WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); - TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TunnelType::SquareFlat); if (supportType[direction][trackSequence] != WoodenSupportSubType::Null) { - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType[direction][trackSequence], height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, supportType[direction][trackSequence], height, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments[trackSequence], direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; ClassicWoodenRCTrackBankedRightQuarterTurn5(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -954,23 +958,23 @@ static void ClassicWoodenRCTrackRightQuarterTurn3Bank( WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::SquareFlat); if (trackSequence == 0 || trackSequence == 3) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments[trackSequence], direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; ClassicWoodenRCTrackRightQuarterTurn3Bank(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -1141,7 +1145,7 @@ static void ClassicWoodenRCTrackLeftEighthBankToDiag( }, }; - static constexpr WoodenSupportSubType supportType[NumOrthogonalDirections][5] = { + static constexpr WoodenSupportSubType supportType[kNumOrthogonalDirections][5] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::NeSw, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner3, WoodenSupportSubType::Null }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::NwSe, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, @@ -1158,19 +1162,18 @@ static void ClassicWoodenRCTrackLeftEighthBankToDiag( if (trackSequence == 0 && (direction == 0 || direction == 3)) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } if (supportType[direction][trackSequence] != WoodenSupportSubType::Null) { - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType[direction][trackSequence], height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, supportType[direction][trackSequence], height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments[trackSequence], direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackRightEighthBankToDiag( @@ -1340,7 +1343,7 @@ static void ClassicWoodenRCTrackRightEighthBankToDiag( }, }; - static constexpr WoodenSupportSubType supportType[NumOrthogonalDirections][5] = { + static constexpr WoodenSupportSubType supportType[kNumOrthogonalDirections][5] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::NeSw, WoodenSupportSubType::Corner0, WoodenSupportSubType::Corner2, WoodenSupportSubType::Null }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::NwSe, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner3, @@ -1357,19 +1360,18 @@ static void ClassicWoodenRCTrackRightEighthBankToDiag( if (trackSequence == 0 && (direction == 0 || direction == 3)) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } if (supportType[direction][trackSequence] != WoodenSupportSubType::Null) { - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType[direction][trackSequence], height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, supportType[direction][trackSequence], height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments[trackSequence], direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackLeftEighthBankToOrthogonal( @@ -1488,18 +1490,18 @@ static void ClassicWoodenRCTrackDiagFlatToLeftBank( if (trackSequence == 1) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); } else if (trackSequence == 2) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackDiagFlatToRightBank( @@ -1602,18 +1604,18 @@ static void ClassicWoodenRCTrackDiagFlatToRightBank( if (trackSequence == 1) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); } else if (trackSequence == 2) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackDiagLeftBankToFlat( @@ -1718,18 +1720,18 @@ static void ClassicWoodenRCTrackDiagLeftBank( if (trackSequence == 1) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); } else if (trackSequence == 2) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ClassicWoodenRCTrackDiagRightBank( @@ -1839,18 +1841,18 @@ static void ClassicWoodenRCTrackDiagLeftBankTo25DegUp( if (trackSequence == 1) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); } else if (trackSequence == 2) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void ClassicWoodenRCTrackDiagRightBankTo25DegUp( @@ -1953,18 +1955,18 @@ static void ClassicWoodenRCTrackDiagRightBankTo25DegUp( if (trackSequence == 1) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); } else if (trackSequence == 2) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void ClassicWoodenRCTrackDiag25DegUpToLeftBank( @@ -2067,18 +2069,18 @@ static void ClassicWoodenRCTrackDiag25DegUpToLeftBank( if (trackSequence == 1) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); } else if (trackSequence == 2) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void ClassicWoodenRCTrackDiag25DegUpToRightBank( @@ -2181,18 +2183,18 @@ static void ClassicWoodenRCTrackDiag25DegUpToRightBank( if (trackSequence == 1) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); } else if (trackSequence == 2) { WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void ClassicWoodenRCTrackDiagLeftBankTo25DegDown( diff --git a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp index 6572e88483..f788ba22c6 100644 --- a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp @@ -12,20 +12,30 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" -static constexpr const uint32_t CompactInvertedDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr MetalSupportType kSupportType = MetalSupportType::TubesInverted; + +static constexpr ImageIndex kCompactInvertedDiagFlatImages[2][kNumOrthogonalDirections] = { + { 26781, 26782, 26783, 26784 }, + { 26809, 26810, 26811, 26812 }, +}; + +static constexpr ImageIndex kCompactInvertedDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_SLC_DIAG_BRAKES, SPR_G2_SLC_DIAG_BRAKES + 1, SPR_G2_SLC_DIAG_BRAKES, SPR_G2_SLC_DIAG_BRAKES + 1, }; -static constexpr const uint32_t CompactInvertedDiagBlockBrakeImages[2][NumOrthogonalDirections] = { +static constexpr ImageIndex kCompactInvertedDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_SLC_DIAG_BRAKES, SPR_G2_SLC_DIAG_BRAKES + 1, @@ -82,19 +92,14 @@ static void CompactInvertedRCTrackFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE950, 0x008AE960, 0x008AE970 */ @@ -118,11 +123,11 @@ static void CompactInvertedRCTrackStation( 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, MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE6F0 */ @@ -183,47 +188,39 @@ static void CompactInvertedRCTrack25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 56, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 56, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 56, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 56, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AE700 */ @@ -285,18 +282,14 @@ static void CompactInvertedRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 120); } /** rct2: 0x008AE710 */ @@ -357,47 +350,39 @@ static void CompactInvertedRCTrackFlatTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 48, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008AE720 */ @@ -471,18 +456,14 @@ static void CompactInvertedRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); } /** rct2: 0x008AE730 */ @@ -555,47 +536,39 @@ static void CompactInvertedRCTrack60DegUpTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 70, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 70, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 70, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 70, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 70, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 70, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 70, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 70, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); } /** rct2: 0x008AE740 */ @@ -656,47 +629,39 @@ static void CompactInvertedRCTrack25DegUpToFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 46, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 46, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 46, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 46, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AE750 */ @@ -787,17 +752,16 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -829,7 +793,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -862,10 +826,10 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -897,7 +861,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -932,19 +896,18 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -954,7 +917,7 @@ static void CompactInvertedRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; CompactInvertedRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -997,12 +960,11 @@ static void CompactInvertedRCTrackFlatToLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE7E0 */ @@ -1044,12 +1006,11 @@ static void CompactInvertedRCTrackFlatToRightBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE7F0 */ @@ -1091,12 +1052,11 @@ static void CompactInvertedRCTrackLeftBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE800 */ @@ -1138,12 +1098,11 @@ static void CompactInvertedRCTrackRightBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE810 */ @@ -1186,17 +1145,16 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1228,7 +1186,7 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -1261,10 +1219,10 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -1296,7 +1254,7 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -1331,19 +1289,18 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1353,7 +1310,7 @@ static void CompactInvertedRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; CompactInvertedRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1400,36 +1357,32 @@ static void CompactInvertedRCTrackLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 46, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 46, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 46, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 46, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008AE840 */ @@ -1475,36 +1428,32 @@ static void CompactInvertedRCTrackRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 46, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 46, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 46, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 46, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008AE850 */ @@ -1550,36 +1499,32 @@ static void CompactInvertedRCTrack25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 46, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 46, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 46, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 46, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AE860 */ @@ -1625,36 +1570,32 @@ static void CompactInvertedRCTrack25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 46, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 46, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 46, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 46, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AE870 */ @@ -1728,12 +1669,11 @@ static void CompactInvertedRCTrackLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE8C0 */ @@ -1780,17 +1720,16 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 48, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 48, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -1820,7 +1759,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -1850,10 +1789,10 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -1883,7 +1822,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -1914,19 +1853,18 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 48, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 48, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -1967,17 +1905,16 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 48, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 48, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -2007,7 +1944,7 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -2036,10 +1973,10 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -2069,7 +2006,7 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -2100,19 +2037,18 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 48, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 48, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -2122,7 +2058,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; CompactInvertedRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2131,7 +2067,7 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; CompactInvertedRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2175,14 +2111,13 @@ static void CompactInvertedRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -2219,17 +2154,15 @@ static void CompactInvertedRCTrackSBendLeft( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2266,17 +2199,15 @@ static void CompactInvertedRCTrackSBendLeft( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -2311,19 +2242,18 @@ static void CompactInvertedRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2368,14 +2298,13 @@ static void CompactInvertedRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -2412,17 +2341,15 @@ static void CompactInvertedRCTrackSBendRight( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2459,17 +2386,15 @@ static void CompactInvertedRCTrackSBendRight( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -2504,19 +2429,18 @@ static void CompactInvertedRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2566,31 +2490,27 @@ static void CompactInvertedRCTrackLeftVerticalLoop( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -2617,7 +2537,7 @@ static void CompactInvertedRCTrackLeftVerticalLoop( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -2651,7 +2571,7 @@ static void CompactInvertedRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2685,13 +2605,13 @@ static void CompactInvertedRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 6: switch (direction) @@ -2725,7 +2645,7 @@ static void CompactInvertedRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 7: switch (direction) @@ -2759,7 +2679,7 @@ static void CompactInvertedRCTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2786,7 +2706,7 @@ static void CompactInvertedRCTrackLeftVerticalLoop( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 9: switch (direction) @@ -2826,36 +2746,32 @@ static void CompactInvertedRCTrackLeftVerticalLoop( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::InvertedSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::InvertedSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2905,31 +2821,27 @@ static void CompactInvertedRCTrackRightVerticalLoop( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -2956,7 +2868,7 @@ static void CompactInvertedRCTrackRightVerticalLoop( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -2990,7 +2902,7 @@ static void CompactInvertedRCTrackRightVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -3024,13 +2936,13 @@ static void CompactInvertedRCTrackRightVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 6: switch (direction) @@ -3064,7 +2976,7 @@ static void CompactInvertedRCTrackRightVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 7: switch (direction) @@ -3097,7 +3009,7 @@ static void CompactInvertedRCTrackRightVerticalLoop( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -3124,7 +3036,7 @@ static void CompactInvertedRCTrackRightVerticalLoop( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 9: switch (direction) @@ -3164,36 +3076,32 @@ static void CompactInvertedRCTrackRightVerticalLoop( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::InvertedSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::InvertedSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3238,17 +3146,16 @@ static void CompactInvertedRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3281,7 +3188,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -3316,19 +3223,18 @@ static void CompactInvertedRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3338,7 +3244,7 @@ static void CompactInvertedRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; CompactInvertedRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3382,17 +3288,16 @@ static void CompactInvertedRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3426,7 +3331,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -3461,19 +3366,18 @@ static void CompactInvertedRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3483,7 +3387,7 @@ static void CompactInvertedRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; CompactInvertedRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3523,20 +3427,19 @@ static void CompactInvertedRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -3567,19 +3470,18 @@ static void CompactInvertedRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -3620,20 +3522,19 @@ static void CompactInvertedRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -3664,19 +3565,18 @@ static void CompactInvertedRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -3686,7 +3586,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; CompactInvertedRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3695,7 +3595,7 @@ static void CompactInvertedRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; CompactInvertedRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3735,14 +3635,13 @@ static void CompactInvertedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3772,7 +3671,7 @@ static void CompactInvertedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3794,15 +3693,14 @@ static void CompactInvertedRCTrackLeftTwistDownToUp( session, direction, session.TrackColours.WithIndex(27002), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3813,7 +3711,7 @@ static void CompactInvertedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3854,14 +3752,13 @@ static void CompactInvertedRCTrackRightTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3891,7 +3788,7 @@ static void CompactInvertedRCTrackRightTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3913,15 +3810,14 @@ static void CompactInvertedRCTrackRightTwistDownToUp( session, direction, session.TrackColours.WithIndex(27014), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3932,7 +3828,7 @@ static void CompactInvertedRCTrackRightTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3964,11 +3860,10 @@ static void CompactInvertedRCTrackLeftTwistUpToDown( session, direction, session.TrackColours.WithIndex(27001), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3978,7 +3873,7 @@ static void CompactInvertedRCTrackLeftTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -4008,7 +3903,7 @@ static void CompactInvertedRCTrackLeftTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4039,19 +3934,18 @@ static void CompactInvertedRCTrackLeftTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4083,11 +3977,10 @@ static void CompactInvertedRCTrackRightTwistUpToDown( session, direction, session.TrackColours.WithIndex(27013), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4097,7 +3990,7 @@ static void CompactInvertedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -4127,7 +4020,7 @@ static void CompactInvertedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4158,19 +4051,18 @@ static void CompactInvertedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4208,39 +4100,32 @@ static void CompactInvertedRCTrackHalfLoopUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 56, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 56, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 56, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 56, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -4267,7 +4152,7 @@ static void CompactInvertedRCTrackHalfLoopUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4301,7 +4186,7 @@ static void CompactInvertedRCTrackHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -4329,14 +4214,11 @@ static void CompactInvertedRCTrackHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::InvertedFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4389,14 +4271,13 @@ static void CompactInvertedRCTrackLeftCorkscrewUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -4423,7 +4304,7 @@ static void CompactInvertedRCTrackLeftCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4449,15 +4330,14 @@ static void CompactInvertedRCTrackLeftCorkscrewUp( { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 28, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 28, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 40, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 40, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 40, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 40, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4468,7 +4348,7 @@ static void CompactInvertedRCTrackLeftCorkscrewUp( PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4513,14 +4393,13 @@ static void CompactInvertedRCTrackRightCorkscrewUp( PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -4547,7 +4426,7 @@ static void CompactInvertedRCTrackRightCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4573,15 +4452,14 @@ static void CompactInvertedRCTrackRightCorkscrewUp( { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 28, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 28, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 40, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 40, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 40, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 40, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4592,7 +4470,7 @@ static void CompactInvertedRCTrackRightCorkscrewUp( PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4653,9 +4531,10 @@ static void CompactInvertedRCTrackLeftQuarterTurn160DegUp( { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::InvertedSlopeStart, +56, TunnelType::InvertedSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008AEAB0 */ @@ -4698,9 +4577,10 @@ static void CompactInvertedRCTrackRightQuarterTurn160DegUp( { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::InvertedSlopeStart, +56, TunnelType::InvertedSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008AEAC0 */ @@ -4740,19 +4620,14 @@ static void CompactInvertedRCTrackBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AEAF0 */ @@ -4795,17 +4670,16 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4839,7 +4713,7 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4873,10 +4747,10 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -4910,7 +4784,7 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -4945,19 +4819,18 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 56, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 56, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5002,17 +4875,16 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5046,7 +4918,7 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -5079,10 +4951,10 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -5116,7 +4988,7 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -5151,19 +5023,18 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 56, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 56, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5208,17 +5079,16 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 56, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 56, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5252,7 +5122,7 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -5286,10 +5156,10 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -5323,7 +5193,7 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -5358,19 +5228,18 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5415,17 +5284,16 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 56, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 56, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5459,7 +5327,7 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -5492,10 +5360,10 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -5529,7 +5397,7 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -5564,19 +5432,18 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5586,7 +5453,7 @@ static void CompactInvertedRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -5612,9 +5479,9 @@ static void CompactInvertedRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008AEDB0 */ @@ -5679,11 +5546,8 @@ static void CompactInvertedRCTrack90DegUp( } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -5760,15 +5624,12 @@ static void CompactInvertedRCTrack60DegUpTo90DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: break; @@ -5843,18 +5704,14 @@ static void CompactInvertedRCTrack90DegUpTo60DegUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::InvertedSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); } /** rct2: 0x008AEDA0 */ @@ -5919,14 +5776,11 @@ static void CompactInvertedRCTrack60DegDownTo90DegDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::InvertedSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -5966,18 +5820,14 @@ static void CompactInvertedRCTrackLeftEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6011,7 +5861,7 @@ static void CompactInvertedRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6045,7 +5895,7 @@ static void CompactInvertedRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6056,7 +5906,7 @@ static void CompactInvertedRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -6095,27 +5945,23 @@ static void CompactInvertedRCTrackLeftEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6153,18 +5999,14 @@ static void CompactInvertedRCTrackRightEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6198,7 +6040,7 @@ static void CompactInvertedRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6232,7 +6074,7 @@ static void CompactInvertedRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6243,7 +6085,7 @@ static void CompactInvertedRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -6282,27 +6124,23 @@ static void CompactInvertedRCTrackRightEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6365,14 +6203,13 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6406,7 +6243,7 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6440,7 +6277,7 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6451,7 +6288,7 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -6490,27 +6327,23 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6555,14 +6388,13 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6596,7 +6428,7 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6630,7 +6462,7 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6641,7 +6473,7 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -6680,27 +6512,23 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6723,209 +6551,45 @@ static void CompactInvertedRCTrackRightEighthBankToOrthogonal( CompactInvertedRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } +inline void CompactInvertedRCTrackDiagFlatBase( + PaintSession& session, uint8_t trackSequence, const ImageIndex* images, uint8_t direction, int32_t height) +{ + TrackPaintUtilDiagTilesPaint( + session, 3, height + 29, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); + + if (trackSequence == 3) + { + MetalASupportsPaintSetup( + session, kSupportType, kDiagSupportPlacement[direction], 0, height + 38, session.SupportColours); + } + PaintUtilSetGeneralSupportHeight(session, height + 48); +} + /** rct2: 0x008AEB80 */ static void CompactInvertedRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26812), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26784), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26809), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26781), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26811), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26783), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26810), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26782), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } + const auto* images = kCompactInvertedDiagFlatImages[trackElement.HasChain()]; + CompactInvertedRCTrackDiagFlatBase(session, trackSequence, images, direction, height); } static void CompactInvertedRCTrackDiagBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilDiagTilesPaint( - session, 3, height + 29, direction, trackSequence, session.TrackColours, CompactInvertedDiagBrakeImages, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); - - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 38, session.SupportColours); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + CompactInvertedRCTrackDiagFlatBase(session, trackSequence, kCompactInvertedDiagBrakeImages, direction, height); } static void CompactInvertedRCTrackDiagBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilDiagTilesPaint( - session, 3, height + 29, direction, trackSequence, session.TrackColours, - CompactInvertedDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); - - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 38, session.SupportColours); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + const auto* images = kCompactInvertedDiagBlockBrakeImages[trackElement.IsBrakeClosed()]; + CompactInvertedRCTrackDiagFlatBase(session, trackSequence, images, direction, height); } /** rct2: 0x008AEBB0 */ @@ -6966,7 +6630,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -6998,7 +6662,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7031,7 +6695,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7069,27 +6733,23 @@ static void CompactInvertedRCTrackDiag25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7118,7 +6778,7 @@ static void CompactInvertedRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 1: switch (direction) @@ -7136,7 +6796,7 @@ static void CompactInvertedRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 2: switch (direction) @@ -7155,7 +6815,7 @@ static void CompactInvertedRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 3: switch (direction) @@ -7179,27 +6839,23 @@ static void CompactInvertedRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height + 38, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height + 38, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height + 38, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; } } @@ -7242,7 +6898,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -7274,7 +6930,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -7307,7 +6963,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -7345,27 +7001,23 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -7394,7 +7046,7 @@ static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -7412,7 +7064,7 @@ static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -7431,7 +7083,7 @@ static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -7455,27 +7107,23 @@ static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height + 38, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height + 38, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height + 38, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -7504,7 +7152,7 @@ static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -7522,7 +7170,7 @@ static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -7541,7 +7189,7 @@ static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -7565,27 +7213,23 @@ static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height + 38, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height + 38, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height + 38, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -7628,7 +7272,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7660,7 +7304,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7693,7 +7337,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7731,27 +7375,23 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7794,7 +7434,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7826,7 +7466,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7859,7 +7499,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7897,27 +7537,23 @@ static void CompactInvertedRCTrackDiag25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7946,7 +7582,7 @@ static void CompactInvertedRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 1: switch (direction) @@ -7964,7 +7600,7 @@ static void CompactInvertedRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 2: switch (direction) @@ -7983,7 +7619,7 @@ static void CompactInvertedRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 3: switch (direction) @@ -8007,27 +7643,23 @@ static void CompactInvertedRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height + 38, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height + 38, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height + 38, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; } } @@ -8170,29 +7802,25 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AEC20 */ @@ -8219,7 +7847,7 @@ static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -8237,7 +7865,7 @@ static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -8256,7 +7884,7 @@ static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -8280,27 +7908,23 @@ static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height + 38, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height + 38, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height + 38, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -8329,7 +7953,7 @@ static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -8347,7 +7971,7 @@ static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -8366,7 +7990,7 @@ static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -8390,27 +8014,23 @@ static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height + 38, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height + 38, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height + 38, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -8453,7 +8073,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -8485,7 +8105,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -8518,7 +8138,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -8556,27 +8176,23 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -8605,7 +8221,7 @@ static void CompactInvertedRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8623,7 +8239,7 @@ static void CompactInvertedRCTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8642,7 +8258,7 @@ static void CompactInvertedRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8666,27 +8282,23 @@ static void CompactInvertedRCTrackDiagFlatToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8715,7 +8327,7 @@ static void CompactInvertedRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8733,7 +8345,7 @@ static void CompactInvertedRCTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8752,7 +8364,7 @@ static void CompactInvertedRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8776,27 +8388,23 @@ static void CompactInvertedRCTrackDiagFlatToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8825,7 +8433,7 @@ static void CompactInvertedRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8843,7 +8451,7 @@ static void CompactInvertedRCTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8862,7 +8470,7 @@ static void CompactInvertedRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8886,27 +8494,23 @@ static void CompactInvertedRCTrackDiagLeftBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8935,7 +8539,7 @@ static void CompactInvertedRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8953,7 +8557,7 @@ static void CompactInvertedRCTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8972,7 +8576,7 @@ static void CompactInvertedRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8996,27 +8600,23 @@ static void CompactInvertedRCTrackDiagRightBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9045,7 +8645,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -9063,7 +8663,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -9082,7 +8682,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -9106,27 +8706,23 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -9155,7 +8751,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -9173,7 +8769,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -9192,7 +8788,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -9216,27 +8812,23 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -9265,7 +8857,7 @@ static void CompactInvertedRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -9283,7 +8875,7 @@ static void CompactInvertedRCTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9302,7 +8894,7 @@ static void CompactInvertedRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9326,27 +8918,23 @@ static void CompactInvertedRCTrackDiag25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9375,7 +8963,7 @@ static void CompactInvertedRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -9393,7 +8981,7 @@ static void CompactInvertedRCTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9412,7 +9000,7 @@ static void CompactInvertedRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9436,27 +9024,23 @@ static void CompactInvertedRCTrackDiag25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9543,29 +9127,25 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AED00 */ @@ -9650,29 +9230,25 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AED10 */ @@ -9699,7 +9275,7 @@ static void CompactInvertedRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -9717,7 +9293,7 @@ static void CompactInvertedRCTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -9736,7 +9312,7 @@ static void CompactInvertedRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -9760,27 +9336,23 @@ static void CompactInvertedRCTrackDiag25DegDownToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -9809,7 +9381,7 @@ static void CompactInvertedRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -9827,7 +9399,7 @@ static void CompactInvertedRCTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -9846,7 +9418,7 @@ static void CompactInvertedRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -9870,27 +9442,23 @@ static void CompactInvertedRCTrackDiag25DegDownToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -9919,7 +9487,7 @@ static void CompactInvertedRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9937,7 +9505,7 @@ static void CompactInvertedRCTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9956,7 +9524,7 @@ static void CompactInvertedRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -9980,27 +9548,23 @@ static void CompactInvertedRCTrackDiagLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10029,7 +9593,7 @@ static void CompactInvertedRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -10047,7 +9611,7 @@ static void CompactInvertedRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -10066,7 +9630,7 @@ static void CompactInvertedRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -10090,27 +9654,23 @@ static void CompactInvertedRCTrackDiagRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 38, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10136,19 +9696,14 @@ static void CompactInvertedRCTrackBlockBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionCompactInvertedRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.hpp similarity index 82% rename from src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp rename to src/openrct2/ride/coaster/CorkscrewRollerCoaster.hpp index 066b775b81..351a90320e 100644 --- a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.hpp @@ -7,37 +7,42 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#pragma once + #include "../../drawing/Drawing.h" #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" -static constexpr uint32_t CORKSCREW_RC_BLOCK_BRAKE_SW_NE_OPEN = 16232; -static constexpr uint32_t CORKSCREW_RC_BLOCK_BRAKE_NW_SE_OPEN = 16233; -static constexpr uint32_t CORKSCREW_RC_BLOCK_BRAKE_SW_NE_CLOSED = 16234; -static constexpr uint32_t CORKSCREW_RC_BLOCK_BRAKE_NW_SE_CLOSED = 16235; +static constexpr uint32_t kCorkscrewRcBlockBrakeSwNeOpen = 16232; +static constexpr uint32_t kCorkscrewRcBlockBrakeNwSeOpen = 16233; +static constexpr uint32_t kCorkscrewRcBlockBrakeSwNeClosed = 16234; +static constexpr uint32_t kCorkscrewRcBlockBrakeNwSeClosed = 16235; -static constexpr uint32_t _CorkscrewRCBlockBrakeImages[NumOrthogonalDirections][2] = { - { CORKSCREW_RC_BLOCK_BRAKE_SW_NE_OPEN, CORKSCREW_RC_BLOCK_BRAKE_SW_NE_CLOSED }, - { CORKSCREW_RC_BLOCK_BRAKE_NW_SE_OPEN, CORKSCREW_RC_BLOCK_BRAKE_NW_SE_CLOSED }, - { CORKSCREW_RC_BLOCK_BRAKE_SW_NE_OPEN, CORKSCREW_RC_BLOCK_BRAKE_SW_NE_CLOSED }, - { CORKSCREW_RC_BLOCK_BRAKE_NW_SE_OPEN, CORKSCREW_RC_BLOCK_BRAKE_NW_SE_CLOSED }, +static constexpr uint32_t kCorkscrewRcBlockBrakeImages[kNumOrthogonalDirections][2] = { + { kCorkscrewRcBlockBrakeSwNeOpen, kCorkscrewRcBlockBrakeSwNeClosed }, + { kCorkscrewRcBlockBrakeNwSeOpen, kCorkscrewRcBlockBrakeNwSeClosed }, + { kCorkscrewRcBlockBrakeSwNeOpen, kCorkscrewRcBlockBrakeSwNeClosed }, + { kCorkscrewRcBlockBrakeNwSeOpen, kCorkscrewRcBlockBrakeNwSeClosed }, }; -static constexpr const uint32_t CorkscrewRCDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr const uint32_t kCorkscrewRcDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_CORKSCREW_DIAG_BRAKES, SPR_G2_CORKSCREW_DIAG_BRAKES + 1, SPR_G2_CORKSCREW_DIAG_BRAKES, SPR_G2_CORKSCREW_DIAG_BRAKES + 1, }; -static constexpr const uint32_t CorkscrewRCDiagBlockBrakeImages[2][NumOrthogonalDirections] = { +static constexpr const uint32_t kCorkscrewRcDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_CORKSCREW_DIAG_BRAKES + 3, SPR_G2_CORKSCREW_DIAG_BRAKES + 5, @@ -53,6 +58,7 @@ static constexpr const uint32_t CorkscrewRCDiagBlockBrakeImages[2][NumOrthogonal }; /** rct2: 0x008A7AF8 */ +template static void CorkscrewRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -84,8 +90,7 @@ static void CorkscrewRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else @@ -107,25 +112,21 @@ static void CorkscrewRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7D68, 0x008A7D78, 0x008A7D88 */ +template static void CorkscrewRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr uint32_t imageIds[4][2] = { + 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 }, @@ -136,26 +137,27 @@ static void CorkscrewRCTrackStation( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_CorkscrewRCBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kCorkscrewRcBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(kImageIds[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 }, + session, direction, GetStationColourScheme(session, trackElement).WithIndex(kImageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7B08 */ +template static void CorkscrewRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -187,8 +189,7 @@ static void CorkscrewRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else @@ -218,27 +219,23 @@ static void CorkscrewRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A7B18 */ +template static void CorkscrewRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -270,8 +267,7 @@ static void CorkscrewRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } else @@ -301,27 +297,23 @@ static void CorkscrewRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A7B28 */ +template static void CorkscrewRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -353,8 +345,7 @@ static void CorkscrewRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else @@ -384,27 +375,23 @@ static void CorkscrewRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A7B38 */ +template static void CorkscrewRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -442,8 +429,7 @@ static void CorkscrewRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } else @@ -479,27 +465,23 @@ static void CorkscrewRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A7B48 */ +template static void CorkscrewRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -537,8 +519,7 @@ static void CorkscrewRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } else @@ -574,27 +555,23 @@ static void CorkscrewRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A7B58 */ +template static void CorkscrewRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -626,8 +603,7 @@ static void CorkscrewRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } else @@ -657,75 +633,77 @@ static void CorkscrewRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A7B68 */ +template static void CorkscrewRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7B78 */ +template static void CorkscrewRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7B88 */ +template static void CorkscrewRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7B98 */ +template static void CorkscrewRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7BA8 */ +template static void CorkscrewRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7BB8 */ +template static void CorkscrewRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7BC8 */ +template static void CorkscrewRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -756,11 +734,10 @@ static void CorkscrewRCTrackLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -770,10 +747,10 @@ static void CorkscrewRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -807,7 +784,7 @@ static void CorkscrewRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -841,10 +818,10 @@ static void CorkscrewRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -878,7 +855,7 @@ static void CorkscrewRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -904,15 +881,14 @@ static void CorkscrewRCTrackLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -923,21 +899,23 @@ static void CorkscrewRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7BD8 */ +template static void CorkscrewRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - CorkscrewRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + CorkscrewRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7BE8 */ +template static void CorkscrewRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -973,19 +951,15 @@ static void CorkscrewRCTrackFlatToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7BF8 */ +template static void CorkscrewRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1021,19 +995,15 @@ static void CorkscrewRCTrackFlatToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7C08 */ +template static void CorkscrewRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1069,19 +1039,15 @@ static void CorkscrewRCTrackLeftBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7C18 */ +template static void CorkscrewRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1117,19 +1083,15 @@ static void CorkscrewRCTrackRightBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7C28 */ +template static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1163,11 +1125,10 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1177,10 +1138,10 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1214,7 +1175,7 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1248,10 +1209,10 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1285,7 +1246,7 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1314,15 +1275,14 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1333,21 +1293,24 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7C38 */ +template static void CorkscrewRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - CorkscrewRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + CorkscrewRCTrackBankedLeftQuarterTurn5( + session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7C48 */ +template static void CorkscrewRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1383,26 +1346,22 @@ static void CorkscrewRCTrackLeftBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A7C58 */ +template static void CorkscrewRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1438,26 +1397,22 @@ static void CorkscrewRCTrackRightBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A7C68 */ +template static void CorkscrewRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1493,26 +1448,22 @@ static void CorkscrewRCTrack25DegUpToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A7C78 */ +template static void CorkscrewRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1548,58 +1499,58 @@ static void CorkscrewRCTrack25DegUpToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A7C88 */ +template static void CorkscrewRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7C98 */ +template static void CorkscrewRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7CA8 */ +template static void CorkscrewRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7CB8 */ +template static void CorkscrewRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7CC8 */ +template static void CorkscrewRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1629,27 +1580,24 @@ static void CorkscrewRCTrackLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7CD8 */ +template static void CorkscrewRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7CE8 */ +template static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1680,11 +1628,10 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1694,10 +1641,10 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1729,7 +1676,7 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1762,10 +1709,10 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1797,7 +1744,7 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1823,15 +1770,14 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -1842,12 +1788,13 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } /** rct2: 0x008A7CF8 */ +template static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -1878,11 +1825,10 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1892,10 +1838,10 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1927,7 +1873,7 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1959,10 +1905,10 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1994,7 +1940,7 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -2020,15 +1966,14 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -2039,30 +1984,35 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } /** rct2: 0x008A7D08 */ +template static void CorkscrewRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - CorkscrewRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + CorkscrewRCTrackRightQuarterTurn525DegUp( + session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7D18 */ +template static void CorkscrewRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - CorkscrewRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + CorkscrewRCTrackLeftQuarterTurn525DegUp( + session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7D28 */ +template static void CorkscrewRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -2093,11 +2043,10 @@ static void CorkscrewRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2107,7 +2056,7 @@ static void CorkscrewRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2116,13 +2065,13 @@ static void CorkscrewRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16403), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16407), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2143,7 +2092,7 @@ static void CorkscrewRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2162,13 +2111,13 @@ static void CorkscrewRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16403), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16407), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2179,7 +2128,7 @@ static void CorkscrewRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2205,15 +2154,14 @@ static void CorkscrewRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2224,12 +2172,13 @@ static void CorkscrewRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7D38 */ +template static void CorkscrewRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -2260,11 +2209,10 @@ static void CorkscrewRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2274,7 +2222,7 @@ static void CorkscrewRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2284,15 +2232,14 @@ static void CorkscrewRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(16411), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16415), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2311,7 +2258,7 @@ static void CorkscrewRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2329,15 +2276,14 @@ static void CorkscrewRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(16411), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16415), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2348,7 +2294,7 @@ static void CorkscrewRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2374,15 +2320,14 @@ static void CorkscrewRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2393,12 +2338,13 @@ static void CorkscrewRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7D48 */ +template static void CorkscrewRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -2412,30 +2358,30 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16562), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16570), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16569), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16577), { 0, 6, height }, { 32, 20, 7 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2445,7 +2391,7 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2454,25 +2400,25 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16563), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16571), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16568), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16576), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2483,7 +2429,7 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2517,7 +2463,7 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2547,13 +2493,13 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2583,7 +2529,7 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -2617,7 +2563,7 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2626,25 +2572,25 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16568), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16576), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16563), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16571), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2655,7 +2601,7 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -2664,34 +2610,34 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16569), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16577), { 0, 6, height }, { 32, 20, 7 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16562), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16570), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } PaintUtilSetSegmentSupportHeight( @@ -2702,12 +2648,13 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } /** rct2: 0x008A7D58 */ +template static void CorkscrewRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -2734,13 +2681,12 @@ static void CorkscrewRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(16578), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2749,28 +2695,28 @@ static void CorkscrewRCTrackRightVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16592), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16584), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16587), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16579), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2796,7 +2742,7 @@ static void CorkscrewRCTrackRightVerticalLoop( { { 16, 0, height }, { 2, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2818,13 +2764,13 @@ static void CorkscrewRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(16581), { 0, 0, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2846,7 +2792,7 @@ static void CorkscrewRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(16582), { 0, 16, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -2872,7 +2818,7 @@ static void CorkscrewRCTrackRightVerticalLoop( { { 10, 16, height }, { 4, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2881,28 +2827,28 @@ static void CorkscrewRCTrackRightVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16587), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16579), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16592), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16584), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -2924,18 +2870,17 @@ static void CorkscrewRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(16585), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } @@ -2943,6 +2888,7 @@ static void CorkscrewRCTrackRightVerticalLoop( } /** rct2: 0x008A7D98 */ +template static void CorkscrewRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -2973,11 +2919,10 @@ static void CorkscrewRCTrackLeftQuarterTurn3( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2987,10 +2932,10 @@ static void CorkscrewRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3024,7 +2969,7 @@ static void CorkscrewRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3050,15 +2995,14 @@ static void CorkscrewRCTrackLeftQuarterTurn3( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3069,21 +3013,23 @@ static void CorkscrewRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7DA8 */ +template static void CorkscrewRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - CorkscrewRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + CorkscrewRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7DB8 */ +template static void CorkscrewRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -3117,11 +3063,10 @@ static void CorkscrewRCTrackLeftQuarterTurn3Bank( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3131,10 +3076,10 @@ static void CorkscrewRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3168,7 +3113,7 @@ static void CorkscrewRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3197,15 +3142,14 @@ static void CorkscrewRCTrackLeftQuarterTurn3Bank( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3216,21 +3160,23 @@ static void CorkscrewRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7DC8 */ +template static void CorkscrewRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - CorkscrewRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + CorkscrewRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7DD8 */ +template static void CorkscrewRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -3257,11 +3203,10 @@ static void CorkscrewRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(16539), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3271,13 +3216,13 @@ static void CorkscrewRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -3299,15 +3244,14 @@ static void CorkscrewRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(16538), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3318,12 +3262,13 @@ static void CorkscrewRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } /** rct2: 0x008A7DE8 */ +template static void CorkscrewRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -3350,11 +3295,10 @@ static void CorkscrewRCTrackRightQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(16536), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3364,13 +3308,13 @@ static void CorkscrewRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -3379,34 +3323,34 @@ static void CorkscrewRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16531), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16533), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16535), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16537), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3417,30 +3361,35 @@ static void CorkscrewRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } /** rct2: 0x008A7DF8 */ +template static void CorkscrewRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - CorkscrewRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + CorkscrewRCTrackRightQuarterTurn325DegUp( + session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7E08 */ +template static void CorkscrewRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - CorkscrewRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + CorkscrewRCTrackLeftQuarterTurn325DegUp( + session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7E18 */ +template static void CorkscrewRCTrackHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -3467,18 +3416,14 @@ static void CorkscrewRCTrackHalfLoopUp( session, direction, session.TrackColours.WithIndex(16609), { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -3488,31 +3433,31 @@ static void CorkscrewRCTrackHalfLoopUp( session, direction, session.TrackColours.WithIndex(16595), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16603), { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16600), { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16608), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3544,7 +3489,7 @@ static void CorkscrewRCTrackHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -3568,27 +3513,26 @@ static void CorkscrewRCTrackHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A7E28 */ +template static void CorkscrewRCTrackHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); + CorkscrewRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); } /** rct2: 0x008A7E38 */ +template static void CorkscrewRCTrackLeftCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -3624,9 +3568,9 @@ static void CorkscrewRCTrackLeftCorkscrewUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3653,7 +3597,7 @@ static void CorkscrewRCTrackLeftCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3688,24 +3632,24 @@ static void CorkscrewRCTrackLeftCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A7E48 */ +template static void CorkscrewRCTrackRightCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -3736,11 +3680,10 @@ static void CorkscrewRCTrackRightCorkscrewUp( { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3750,7 +3693,7 @@ static void CorkscrewRCTrackRightCorkscrewUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3777,7 +3720,7 @@ static void CorkscrewRCTrackRightCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3812,40 +3755,42 @@ static void CorkscrewRCTrackRightCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A7E58 */ +template static void CorkscrewRCTrackLeftCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); + CorkscrewRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7E68 */ +template static void CorkscrewRCTrackRightCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7E78 */ +template static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -3879,11 +3824,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3893,10 +3837,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3930,7 +3874,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3959,15 +3903,14 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3978,7 +3921,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4007,15 +3950,14 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4026,10 +3968,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4063,7 +4005,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4092,11 +4034,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4106,12 +4047,13 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7E88 */ +template static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -4145,11 +4087,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4159,10 +4100,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4196,7 +4137,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4225,15 +4166,14 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4244,7 +4184,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4273,15 +4213,14 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4292,10 +4231,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4329,7 +4268,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4358,11 +4297,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4372,12 +4310,13 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7E98 */ +template static void CorkscrewRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -4387,11 +4326,13 @@ static void CorkscrewRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - CorkscrewRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + CorkscrewRCTrackRightHalfBankedHelixUpSmall( + session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7EA8 */ +template static void CorkscrewRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -4401,11 +4342,13 @@ static void CorkscrewRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - CorkscrewRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + CorkscrewRCTrackLeftHalfBankedHelixUpSmall( + session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7EB8 */ +template static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -4439,11 +4382,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4453,10 +4395,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4490,7 +4432,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4524,10 +4466,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4561,7 +4503,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4590,15 +4532,14 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4609,7 +4550,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4638,15 +4579,14 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4657,10 +4597,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4694,7 +4634,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4727,10 +4667,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4764,7 +4704,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4793,11 +4733,10 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4807,12 +4746,13 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7EC8 */ +template static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -4846,11 +4786,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4860,10 +4799,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4897,7 +4836,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4930,10 +4869,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4967,7 +4906,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4996,15 +4935,14 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5015,7 +4953,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -5044,15 +4982,14 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5063,10 +5000,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -5100,7 +5037,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -5134,10 +5071,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -5171,7 +5108,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -5200,11 +5137,10 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5214,12 +5150,13 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7ED8 */ +template static void CorkscrewRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5229,11 +5166,13 @@ static void CorkscrewRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - CorkscrewRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + CorkscrewRCTrackRightHalfBankedHelixUpLarge( + session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7EE8 */ +template static void CorkscrewRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5243,11 +5182,13 @@ static void CorkscrewRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - CorkscrewRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + CorkscrewRCTrackLeftHalfBankedHelixUpLarge( + session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7F18 */ +template static void CorkscrewRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5287,12 +5228,14 @@ static void CorkscrewRCTrackLeftQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::StandardSlopeStart, +56, TunnelType::StandardSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A7EF8 */ +template static void CorkscrewRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5332,28 +5275,34 @@ static void CorkscrewRCTrackRightQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::StandardSlopeStart, +56, TunnelType::StandardSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A7F08 */ +template static void CorkscrewRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CorkscrewRCTrackRightQuarterTurn160DegUp( + session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7F28 */ +template static void CorkscrewRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftQuarterTurn160DegUp( + session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7F38 */ +template static void CorkscrewRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5375,24 +5324,20 @@ static void CorkscrewRCTrackBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7F48 */ +template static void CorkscrewRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, supportType); switch (direction) { @@ -5418,12 +5363,13 @@ static void CorkscrewRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A8198 */ +template static void CorkscrewRCTrackFlatTo60DegUpLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5456,19 +5402,15 @@ static void CorkscrewRCTrackFlatTo60DegUpLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5496,15 +5438,11 @@ static void CorkscrewRCTrackFlatTo60DegUpLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5532,15 +5470,11 @@ static void CorkscrewRCTrackFlatTo60DegUpLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -5568,29 +5502,26 @@ static void CorkscrewRCTrackFlatTo60DegUpLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 18, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 18, height, session.SupportColours); } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; } } /** rct2: 0x008A81A8 */ +template static void CorkscrewRCTrack60DegUpToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5623,19 +5554,15 @@ static void CorkscrewRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: switch (direction) @@ -5663,15 +5590,11 @@ static void CorkscrewRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 2: switch (direction) @@ -5699,15 +5622,11 @@ static void CorkscrewRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 13, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5735,45 +5654,46 @@ static void CorkscrewRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } /** rct2: 0x008A81B8 */ +template static void CorkscrewRCTrack60DegDownToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrackFlatTo60DegUpLongBase(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackFlatTo60DegUpLongBase( + session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A81C8 */ +template static void CorkscrewRCTrackFlatTo60DegDownLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - CorkscrewRCTrack60DegUpToFlatLongBase(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack60DegUpToFlatLongBase( + session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7F68 */ +template static void CorkscrewRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5804,18 +5724,14 @@ static void CorkscrewRCTrackLeftEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5849,7 +5765,7 @@ static void CorkscrewRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5883,7 +5799,7 @@ static void CorkscrewRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5894,7 +5810,7 @@ static void CorkscrewRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5904,28 +5820,28 @@ static void CorkscrewRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(16743), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16747), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16751), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16755), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5936,12 +5852,13 @@ static void CorkscrewRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7F78 */ +template static void CorkscrewRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -5972,18 +5889,14 @@ static void CorkscrewRCTrackRightEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6017,7 +5930,7 @@ static void CorkscrewRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6051,7 +5964,7 @@ static void CorkscrewRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6062,7 +5975,7 @@ static void CorkscrewRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6072,28 +5985,28 @@ static void CorkscrewRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(16727), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16731), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16735), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16739), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6104,30 +6017,33 @@ static void CorkscrewRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7F88 */ +template static void CorkscrewRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - CorkscrewRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7F98 */ +template static void CorkscrewRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - CorkscrewRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + CorkscrewRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A7FA8 */ +template static void CorkscrewRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -6158,18 +6074,14 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6203,7 +6115,7 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6237,7 +6149,7 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6248,7 +6160,7 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6258,28 +6170,28 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(16775), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16779), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16783), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16787), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6290,12 +6202,13 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7FB8 */ +template static void CorkscrewRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -6326,18 +6239,14 @@ static void CorkscrewRCTrackRightEighthBankToDiag( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6371,7 +6280,7 @@ static void CorkscrewRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6405,7 +6314,7 @@ static void CorkscrewRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6416,7 +6325,7 @@ static void CorkscrewRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6426,28 +6335,28 @@ static void CorkscrewRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(16759), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16763), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16767), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16771), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6458,242 +6367,86 @@ static void CorkscrewRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A7FC8 */ +template static void CorkscrewRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - CorkscrewRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7FD8 */ +template static void CorkscrewRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - CorkscrewRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + CorkscrewRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A7F58 */ +template static void CorkscrewRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16699), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16637), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16696), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16634), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16698), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16636), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16697), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16635), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex kImages[2][kNumOrthogonalDirections] = { + { 16634, 16635, 16636, 16637 }, + { 16696, 16697, 16698, 16699 }, + }; + + TrackPaintUtilDiagTilesPaintExtra( + session, 3, height, direction, trackSequence, kImages[trackElement.HasChain()], supportType); } +template static void CorkscrewRCTrackDiagBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, CorkscrewRCDiagBrakeImages, defaultDiagTileOffsets, + session, 3, height, direction, trackSequence, kCorkscrewRcDiagBrakeImages, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } +template static void CorkscrewRCTrackDiagBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, - CorkscrewRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 3, height, direction, trackSequence, kCorkscrewRcDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A8008 */ +template static void CorkscrewRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -6731,7 +6484,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -6763,7 +6516,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -6796,7 +6549,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -6805,24 +6558,22 @@ static void CorkscrewRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16709), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -6832,24 +6583,22 @@ static void CorkscrewRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16647), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -6861,12 +6610,13 @@ static void CorkscrewRCTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } /** rct2: 0x008A8068 */ +template static void CorkscrewRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -6904,7 +6654,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -6936,7 +6686,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -6969,7 +6719,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -6978,25 +6728,22 @@ static void CorkscrewRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 32, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16721), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 32, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -7006,25 +6753,22 @@ static void CorkscrewRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 32, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16659), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 32, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -7036,12 +6780,13 @@ static void CorkscrewRCTrackDiag60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } /** rct2: 0x008A7FE8 */ +template static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -7079,7 +6824,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -7111,7 +6856,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -7144,7 +6889,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -7153,24 +6898,22 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16701), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -7180,24 +6923,22 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16639), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -7209,12 +6950,13 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A8048 */ +template static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -7252,7 +6994,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7284,7 +7026,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7317,7 +7059,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7326,25 +7068,22 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16713), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -7354,25 +7093,22 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16651), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -7384,12 +7120,13 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } /** rct2: 0x008A8058 */ +template static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -7427,7 +7164,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7459,7 +7196,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7492,7 +7229,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7501,25 +7238,22 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16717), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -7529,25 +7263,22 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16655), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -7559,12 +7290,13 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } /** rct2: 0x008A7FF8 */ +template static void CorkscrewRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -7602,7 +7334,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7634,7 +7366,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7667,7 +7399,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7676,24 +7408,22 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16705), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7703,24 +7433,22 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16643), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7732,12 +7460,13 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } /** rct2: 0x008A8038 */ +template static void CorkscrewRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -7775,7 +7504,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7807,7 +7536,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7840,7 +7569,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7849,24 +7578,22 @@ static void CorkscrewRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16711), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7876,24 +7603,22 @@ static void CorkscrewRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16649), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7905,12 +7630,13 @@ static void CorkscrewRCTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } /** rct2: 0x008A8098 */ +template static void CorkscrewRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -7948,7 +7674,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -7980,7 +7706,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -8013,7 +7739,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -8022,25 +7748,22 @@ static void CorkscrewRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16723), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -8050,25 +7773,22 @@ static void CorkscrewRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16661), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -8080,12 +7800,13 @@ static void CorkscrewRCTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } /** rct2: 0x008A8018 */ +template static void CorkscrewRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -8194,24 +7915,22 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16707), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -8221,24 +7940,22 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16645), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -8253,10 +7970,11 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A8078 */ +template static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -8294,7 +8012,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -8326,7 +8044,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -8359,7 +8077,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -8368,25 +8086,22 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16719), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -8396,25 +8111,22 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16657), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -8426,12 +8138,13 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } /** rct2: 0x008A8088 */ +template static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -8469,7 +8182,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -8501,7 +8214,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -8534,7 +8247,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -8543,24 +8256,22 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16715), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -8570,24 +8281,22 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16653), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -8599,12 +8308,13 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } /** rct2: 0x008A8028 */ +template static void CorkscrewRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -8642,7 +8352,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -8674,7 +8384,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -8707,7 +8417,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -8716,24 +8426,22 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16703), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -8743,24 +8451,22 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16641), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -8772,12 +8478,13 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A80C8 */ +template static void CorkscrewRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -8801,7 +8508,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8822,7 +8529,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8841,29 +8548,29 @@ static void CorkscrewRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16667), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8874,12 +8581,13 @@ static void CorkscrewRCTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A80D8 */ +template static void CorkscrewRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -8903,7 +8611,7 @@ static void CorkscrewRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8921,7 +8629,7 @@ static void CorkscrewRCTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8943,29 +8651,29 @@ static void CorkscrewRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16672), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8976,12 +8684,13 @@ static void CorkscrewRCTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A80E8 */ +template static void CorkscrewRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9005,7 +8714,7 @@ static void CorkscrewRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9026,7 +8735,7 @@ static void CorkscrewRCTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9045,29 +8754,29 @@ static void CorkscrewRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16674), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9078,12 +8787,13 @@ static void CorkscrewRCTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A80F8 */ +template static void CorkscrewRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9107,7 +8817,7 @@ static void CorkscrewRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9125,7 +8835,7 @@ static void CorkscrewRCTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9147,29 +8857,29 @@ static void CorkscrewRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16669), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9180,12 +8890,13 @@ static void CorkscrewRCTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A8128 */ +template static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9209,7 +8920,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9230,7 +8941,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9249,29 +8960,29 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16687), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9282,12 +8993,13 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A8138 */ +template static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9311,7 +9023,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9329,7 +9041,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9351,29 +9063,29 @@ static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16692), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9384,12 +9096,13 @@ static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A8108 */ +template static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9413,7 +9126,7 @@ static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -9434,7 +9147,7 @@ static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -9453,29 +9166,29 @@ static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16677), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9486,12 +9199,13 @@ static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } /** rct2: 0x008A8118 */ +template static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9515,7 +9229,7 @@ static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -9533,7 +9247,7 @@ static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -9555,29 +9269,29 @@ static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16682), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9588,12 +9302,13 @@ static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } /** rct2: 0x008A8148 */ +template static void CorkscrewRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9661,22 +9376,22 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16684), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9690,10 +9405,11 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A8158 */ +template static void CorkscrewRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9761,22 +9477,22 @@ static void CorkscrewRCTrackDiagRightBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16679), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9790,10 +9506,11 @@ static void CorkscrewRCTrackDiagRightBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A8168 */ +template static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9817,7 +9534,7 @@ static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9838,7 +9555,7 @@ static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9857,29 +9574,29 @@ static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16694), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9890,12 +9607,13 @@ static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A8178 */ +template static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -9919,7 +9637,7 @@ static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9937,7 +9655,7 @@ static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9959,29 +9677,29 @@ static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16689), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9992,12 +9710,13 @@ static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x008A80A8 */ +template static void CorkscrewRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10021,7 +9740,7 @@ static void CorkscrewRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10039,7 +9758,7 @@ static void CorkscrewRCTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10058,29 +9777,29 @@ static void CorkscrewRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16663), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -10091,12 +9810,13 @@ static void CorkscrewRCTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A80B8 */ +template static void CorkscrewRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10120,7 +9840,7 @@ static void CorkscrewRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10138,7 +9858,7 @@ static void CorkscrewRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10157,29 +9877,29 @@ static void CorkscrewRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16665), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, supportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -10190,37 +9910,35 @@ static void CorkscrewRCTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x008A8188 */ +template static void CorkscrewRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_CorkscrewRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(kCorkscrewRcBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } +template static void CorkscrewRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (!IsCsgLoaded()) { - CorkscrewRCTrackBrakes(session, ride, trackSequence, direction, height, trackElement); + CorkscrewRCTrackBrakes(session, ride, trackSequence, direction, height, trackElement); return; } @@ -10252,18 +9970,14 @@ static void CorkscrewRCTrackBooster( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } +template static void CorkscrewRCTrackLeftTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10290,11 +10004,10 @@ static void CorkscrewRCTrackLeftTwistDownToUp( session, direction, session.TrackColours.WithIndex(26977), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10304,7 +10017,7 @@ static void CorkscrewRCTrackLeftTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10334,7 +10047,7 @@ static void CorkscrewRCTrackLeftTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10364,23 +10077,23 @@ static void CorkscrewRCTrackLeftTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 26, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 26, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height - 26, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 26, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } +template static void CorkscrewRCTrackRightTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10407,11 +10120,10 @@ static void CorkscrewRCTrackRightTwistDownToUp( session, direction, session.TrackColours.WithIndex(26989), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10421,7 +10133,7 @@ static void CorkscrewRCTrackRightTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10451,7 +10163,7 @@ static void CorkscrewRCTrackRightTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10481,23 +10193,23 @@ static void CorkscrewRCTrackRightTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 26, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 26, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height - 26, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 26, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } +template static void CorkscrewRCTrackLeftTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10532,14 +10244,13 @@ static void CorkscrewRCTrackLeftTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10569,7 +10280,7 @@ static void CorkscrewRCTrackLeftTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10591,15 +10302,14 @@ static void CorkscrewRCTrackLeftTwistUpToDown( session, direction, session.TrackColours.WithIndex(26978), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 26, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 26, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height - 26, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 26, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10610,11 +10320,12 @@ static void CorkscrewRCTrackLeftTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } +template static void CorkscrewRCTrackRightTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10649,14 +10360,13 @@ static void CorkscrewRCTrackRightTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10686,7 +10396,7 @@ static void CorkscrewRCTrackRightTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10708,15 +10418,14 @@ static void CorkscrewRCTrackRightTwistUpToDown( session, direction, session.TrackColours.WithIndex(26990), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 26, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 26, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height - 26, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 26, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10727,12 +10436,13 @@ static void CorkscrewRCTrackRightTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x00824FAC */ +template static void LayDownRCTrackLeftFlyerTwistUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10759,11 +10469,10 @@ static void LayDownRCTrackLeftFlyerTwistUp( session, direction, session.TrackColours.WithIndex(26977), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10773,7 +10482,7 @@ static void LayDownRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10804,7 +10513,7 @@ static void LayDownRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10836,24 +10545,24 @@ static void LayDownRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x00824FBC */ +template static void LayDownRCTrackRightFlyerTwistUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10880,11 +10589,10 @@ static void LayDownRCTrackRightFlyerTwistUp( session, direction, session.TrackColours.WithIndex(26989), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10894,7 +10602,7 @@ static void LayDownRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10924,7 +10632,7 @@ static void LayDownRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10955,24 +10663,24 @@ static void LayDownRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } /** rct2: 0x00824C3C */ +template static void LayDownRCTrackFlyerHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10999,18 +10707,14 @@ static void LayDownRCTrackFlyerHalfLoopUp( session, direction, session.TrackColours.WithIndex(16609), { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -11020,35 +10724,31 @@ static void LayDownRCTrackFlyerHalfLoopUp( session, direction, session.TrackColours.WithIndex(16595), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 20, height, - session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16603), { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 15, height, - session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16600), { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16608), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); + session, supportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11080,7 +10780,7 @@ static void LayDownRCTrackFlyerHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -11104,19 +10804,17 @@ static void LayDownRCTrackFlyerHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x00824C5C */ +template static void LayDownRCTrackLeftFlyerCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -11159,8 +10857,7 @@ static void LayDownRCTrackLeftFlyerCorkscrewUp( direction), 0xFFFF, 0); } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction != 2) { PaintUtilSetSegmentSupportHeight( @@ -11175,9 +10872,9 @@ static void LayDownRCTrackLeftFlyerCorkscrewUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -11204,7 +10901,7 @@ static void LayDownRCTrackLeftFlyerCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11239,24 +10936,24 @@ static void LayDownRCTrackLeftFlyerCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } /** rct2: 0x00824C6C */ +template static void LayDownRCTrackRightFlyerCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -11287,11 +10984,10 @@ static void LayDownRCTrackRightFlyerCorkscrewUp( { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -11301,7 +10997,7 @@ static void LayDownRCTrackRightFlyerCorkscrewUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -11328,7 +11024,7 @@ static void LayDownRCTrackRightFlyerCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11363,23 +11059,23 @@ static void LayDownRCTrackRightFlyerCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } +template static void LayDownRCTrackHalfLoopUninvertedDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -11389,257 +11085,257 @@ static void LayDownRCTrackHalfLoopUninvertedDown( return; } -TRACK_PAINT_FUNCTION GetTrackPaintFunctionCorkscrewRC(int32_t trackType) +template TRACK_PAINT_FUNCTION GetTrackPaintFunctionCorkscrewRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return CorkscrewRCTrackFlat; + return CorkscrewRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return CorkscrewRCTrackStation; + return CorkscrewRCTrackStation; case TrackElemType::Up25: - return CorkscrewRCTrack25DegUp; + return CorkscrewRCTrack25DegUp; case TrackElemType::Up60: - return CorkscrewRCTrack60DegUp; + return CorkscrewRCTrack60DegUp; case TrackElemType::FlatToUp25: - return CorkscrewRCTrackFlatTo25DegUp; + return CorkscrewRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return CorkscrewRCTrack25DegUpTo60DegUp; + return CorkscrewRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return CorkscrewRCTrack60DegUpTo25DegUp; + return CorkscrewRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return CorkscrewRCTrack25DegUpToFlat; + return CorkscrewRCTrack25DegUpToFlat; case TrackElemType::Down25: - return CorkscrewRCTrack25DegDown; + return CorkscrewRCTrack25DegDown; case TrackElemType::Down60: - return CorkscrewRCTrack60DegDown; + return CorkscrewRCTrack60DegDown; case TrackElemType::FlatToDown25: - return CorkscrewRCTrackFlatTo25DegDown; + return CorkscrewRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return CorkscrewRCTrack25DegDownTo60DegDown; + return CorkscrewRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return CorkscrewRCTrack60DegDownTo25DegDown; + return CorkscrewRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return CorkscrewRCTrack25DegDownToFlat; + return CorkscrewRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return CorkscrewRCTrackLeftQuarterTurn5; + return CorkscrewRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return CorkscrewRCTrackRightQuarterTurn5; + return CorkscrewRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return CorkscrewRCTrackFlatToLeftBank; + return CorkscrewRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return CorkscrewRCTrackFlatToRightBank; + return CorkscrewRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return CorkscrewRCTrackLeftBankToFlat; + return CorkscrewRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return CorkscrewRCTrackRightBankToFlat; + return CorkscrewRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return CorkscrewRCTrackBankedLeftQuarterTurn5; + return CorkscrewRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return CorkscrewRCTrackBankedRightQuarterTurn5; + return CorkscrewRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return CorkscrewRCTrackLeftBankTo25DegUp; + return CorkscrewRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return CorkscrewRCTrackRightBankTo25DegUp; + return CorkscrewRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return CorkscrewRCTrack25DegUpToLeftBank; + return CorkscrewRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return CorkscrewRCTrack25DegUpToRightBank; + return CorkscrewRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return CorkscrewRCTrackLeftBankTo25DegDown; + return CorkscrewRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return CorkscrewRCTrackRightBankTo25DegDown; + return CorkscrewRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return CorkscrewRCTrack25DegDownToLeftBank; + return CorkscrewRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return CorkscrewRCTrack25DegDownToRightBank; + return CorkscrewRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return CorkscrewRCTrackLeftBank; + return CorkscrewRCTrackLeftBank; case TrackElemType::RightBank: - return CorkscrewRCTrackRightBank; + return CorkscrewRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return CorkscrewRCTrackLeftQuarterTurn525DegUp; + return CorkscrewRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return CorkscrewRCTrackRightQuarterTurn525DegUp; + return CorkscrewRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return CorkscrewRCTrackLeftQuarterTurn525DegDown; + return CorkscrewRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return CorkscrewRCTrackRightQuarterTurn525DegDown; + return CorkscrewRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return CorkscrewRCTrackSBendLeft; + return CorkscrewRCTrackSBendLeft; case TrackElemType::SBendRight: - return CorkscrewRCTrackSBendRight; + return CorkscrewRCTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return CorkscrewRCTrackLeftVerticalLoop; + return CorkscrewRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return CorkscrewRCTrackRightVerticalLoop; + return CorkscrewRCTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return CorkscrewRCTrackLeftQuarterTurn3; + return CorkscrewRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return CorkscrewRCTrackRightQuarterTurn3; + return CorkscrewRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return CorkscrewRCTrackLeftQuarterTurn3Bank; + return CorkscrewRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return CorkscrewRCTrackRightQuarterTurn3Bank; + return CorkscrewRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return CorkscrewRCTrackLeftQuarterTurn325DegUp; + return CorkscrewRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return CorkscrewRCTrackRightQuarterTurn325DegUp; + return CorkscrewRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return CorkscrewRCTrackLeftQuarterTurn325DegDown; + return CorkscrewRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return CorkscrewRCTrackRightQuarterTurn325DegDown; + return CorkscrewRCTrackRightQuarterTurn325DegDown; case TrackElemType::HalfLoopUp: - return CorkscrewRCTrackHalfLoopUp; + return CorkscrewRCTrackHalfLoopUp; case TrackElemType::HalfLoopDown: - return CorkscrewRCTrackHalfLoopDown; + return CorkscrewRCTrackHalfLoopDown; case TrackElemType::LeftCorkscrewUp: - return CorkscrewRCTrackLeftCorkscrewUp; + return CorkscrewRCTrackLeftCorkscrewUp; case TrackElemType::RightCorkscrewUp: - return CorkscrewRCTrackRightCorkscrewUp; + return CorkscrewRCTrackRightCorkscrewUp; case TrackElemType::LeftCorkscrewDown: - return CorkscrewRCTrackLeftCorkscrewDown; + return CorkscrewRCTrackLeftCorkscrewDown; case TrackElemType::RightCorkscrewDown: - return CorkscrewRCTrackRightCorkscrewDown; + return CorkscrewRCTrackRightCorkscrewDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return CorkscrewRCTrackLeftHalfBankedHelixUpSmall; + return CorkscrewRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return CorkscrewRCTrackRightHalfBankedHelixUpSmall; + return CorkscrewRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return CorkscrewRCTrackLeftHalfBankedHelixDownSmall; + return CorkscrewRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return CorkscrewRCTrackRightHalfBankedHelixDownSmall; + return CorkscrewRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return CorkscrewRCTrackLeftHalfBankedHelixUpLarge; + return CorkscrewRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return CorkscrewRCTrackRightHalfBankedHelixUpLarge; + return CorkscrewRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return CorkscrewRCTrackLeftHalfBankedHelixDownLarge; + return CorkscrewRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return CorkscrewRCTrackRightHalfBankedHelixDownLarge; + return CorkscrewRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return CorkscrewRCTrackLeftQuarterTurn160DegUp; + return CorkscrewRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return CorkscrewRCTrackRightQuarterTurn160DegUp; + return CorkscrewRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return CorkscrewRCTrackLeftQuarterTurn160DegDown; + return CorkscrewRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return CorkscrewRCTrackRightQuarterTurn160DegDown; + return CorkscrewRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return CorkscrewRCTrackBrakes; + return CorkscrewRCTrackBrakes; case TrackElemType::OnRidePhoto: - return CorkscrewRCTrackOnRidePhoto; + return CorkscrewRCTrackOnRidePhoto; case TrackElemType::FlatToUp60LongBase: - return CorkscrewRCTrackFlatTo60DegUpLongBase; + return CorkscrewRCTrackFlatTo60DegUpLongBase; case TrackElemType::Up60ToFlatLongBase: - return CorkscrewRCTrack60DegUpToFlatLongBase; + return CorkscrewRCTrack60DegUpToFlatLongBase; case TrackElemType::Down60ToFlatLongBase: - return CorkscrewRCTrack60DegDownToFlatLongBase; + return CorkscrewRCTrack60DegDownToFlatLongBase; case TrackElemType::FlatToDown60LongBase: - return CorkscrewRCTrackFlatTo60DegDownLongBase; + return CorkscrewRCTrackFlatTo60DegDownLongBase; case TrackElemType::LeftEighthToDiag: - return CorkscrewRCTrackLeftEighthToDiag; + return CorkscrewRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return CorkscrewRCTrackRightEighthToDiag; + return CorkscrewRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return CorkscrewRCTrackLeftEighthToOrthogonal; + return CorkscrewRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return CorkscrewRCTrackRightEighthToOrthogonal; + return CorkscrewRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return CorkscrewRCTrackLeftEighthBankToDiag; + return CorkscrewRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return CorkscrewRCTrackRightEighthBankToDiag; + return CorkscrewRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return CorkscrewRCTrackLeftEighthBankToOrthogonal; + return CorkscrewRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return CorkscrewRCTrackRightEighthBankToOrthogonal; + return CorkscrewRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return CorkscrewRCTrackDiagFlat; + return CorkscrewRCTrackDiagFlat; case TrackElemType::DiagUp25: - return CorkscrewRCTrackDiag25DegUp; + return CorkscrewRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return CorkscrewRCTrackDiag60DegUp; + return CorkscrewRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return CorkscrewRCTrackDiagFlatTo25DegUp; + return CorkscrewRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return CorkscrewRCTrackDiag25DegUpTo60DegUp; + return CorkscrewRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return CorkscrewRCTrackDiag60DegUpTo25DegUp; + return CorkscrewRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return CorkscrewRCTrackDiag25DegUpToFlat; + return CorkscrewRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return CorkscrewRCTrackDiag25DegDown; + return CorkscrewRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return CorkscrewRCTrackDiag60DegDown; + return CorkscrewRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return CorkscrewRCTrackDiagFlatTo25DegDown; + return CorkscrewRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return CorkscrewRCTrackDiag25DegDownTo60DegDown; + return CorkscrewRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return CorkscrewRCTrackDiag60DegDownTo25DegDown; + return CorkscrewRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return CorkscrewRCTrackDiag25DegDownToFlat; + return CorkscrewRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return CorkscrewRCTrackDiagFlatToLeftBank; + return CorkscrewRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return CorkscrewRCTrackDiagFlatToRightBank; + return CorkscrewRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return CorkscrewRCTrackDiagLeftBankToFlat; + return CorkscrewRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return CorkscrewRCTrackDiagRightBankToFlat; + return CorkscrewRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return CorkscrewRCTrackDiagLeftBankTo25DegUp; + return CorkscrewRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return CorkscrewRCTrackDiagRightBankTo25DegUp; + return CorkscrewRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return CorkscrewRCTrackDiag25DegUpToLeftBank; + return CorkscrewRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return CorkscrewRCTrackDiag25DegUpToRightBank; + return CorkscrewRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return CorkscrewRCTrackDiagLeftBankTo25DegDown; + return CorkscrewRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return CorkscrewRCTrackDiagRightBankTo25DegDown; + return CorkscrewRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return CorkscrewRCTrackDiag25DegDownToLeftBank; + return CorkscrewRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return CorkscrewRCTrackDiag25DegDownToRightBank; + return CorkscrewRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return CorkscrewRCTrackDiagLeftBank; + return CorkscrewRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return CorkscrewRCTrackDiagRightBank; + return CorkscrewRCTrackDiagRightBank; case TrackElemType::BlockBrakes: - return CorkscrewRCTrackBlockBrakes; + return CorkscrewRCTrackBlockBrakes; case TrackElemType::DiagBrakes: - return CorkscrewRCTrackDiagBrakes; + return CorkscrewRCTrackDiagBrakes; case TrackElemType::DiagBlockBrakes: - return CorkscrewRCTrackDiagBlockBrakes; + return CorkscrewRCTrackDiagBlockBrakes; case TrackElemType::Booster: - return CorkscrewRCTrackBooster; + return CorkscrewRCTrackBooster; case TrackElemType::LeftTwistDownToUp: - return CorkscrewRCTrackLeftTwistDownToUp; + return CorkscrewRCTrackLeftTwistDownToUp; case TrackElemType::RightTwistDownToUp: - return CorkscrewRCTrackRightTwistDownToUp; + return CorkscrewRCTrackRightTwistDownToUp; case TrackElemType::LeftTwistUpToDown: - return CorkscrewRCTrackLeftTwistUpToDown; + return CorkscrewRCTrackLeftTwistUpToDown; case TrackElemType::RightTwistUpToDown: - return CorkscrewRCTrackRightTwistUpToDown; + return CorkscrewRCTrackRightTwistUpToDown; // From Lay-down case TrackElemType::LeftFlyerTwistUp: - return LayDownRCTrackLeftFlyerTwistUp; + return LayDownRCTrackLeftFlyerTwistUp; case TrackElemType::RightFlyerTwistUp: - return LayDownRCTrackRightFlyerTwistUp; + return LayDownRCTrackRightFlyerTwistUp; case TrackElemType::FlyerHalfLoopUninvertedUp: - return LayDownRCTrackFlyerHalfLoopUp; + return LayDownRCTrackFlyerHalfLoopUp; case TrackElemType::LeftFlyerCorkscrewUp: - return LayDownRCTrackLeftFlyerCorkscrewUp; + return LayDownRCTrackLeftFlyerCorkscrewUp; case TrackElemType::RightFlyerCorkscrewUp: - return LayDownRCTrackRightFlyerCorkscrewUp; + return LayDownRCTrackRightFlyerCorkscrewUp; case TrackElemType::FlyerHalfLoopUninvertedDown: - return LayDownRCTrackHalfLoopUninvertedDown; + return LayDownRCTrackHalfLoopUninvertedDown; } return nullptr; } diff --git a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp index ce04af730f..ce49693290 100644 --- a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp @@ -12,6 +12,9 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" @@ -19,7 +22,9 @@ #include "../TrackPaint.h" #include "BolligerMabillardTrack.hpp" -static constexpr const uint32_t InvertedRCDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr MetalSupportType kSupportType = MetalSupportType::TubesInverted; + +static constexpr const uint32_t InvertedRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_BM_INVERT_DIAG_BRAKES, SPR_G2_BM_INVERT_DIAG_BRAKES + 1, SPR_G2_BM_INVERT_DIAG_BRAKES, @@ -60,8 +65,7 @@ static void FlyingRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else @@ -83,17 +87,13 @@ static void FlyingRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -135,18 +135,14 @@ static void FlyingRCTrackFlat( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -172,7 +168,7 @@ static void FlyingRCTrackStation( 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, MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); } else @@ -199,13 +195,13 @@ static void FlyingRCTrackStation( PaintAddImageAsParentRotated( session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][2]), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x007C7004 */ @@ -269,23 +265,19 @@ static void FlyingRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } else { @@ -343,46 +335,39 @@ static void FlyingRCTrack25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 57, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 57, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 57, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 57, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } } @@ -418,23 +403,19 @@ static void FlyingRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } else { @@ -463,18 +444,15 @@ static void FlyingRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } } @@ -539,23 +517,19 @@ static void FlyingRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -613,46 +587,39 @@ static void FlyingRCTrackFlatTo25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } } @@ -694,23 +661,19 @@ static void FlyingRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } else { @@ -745,18 +708,15 @@ static void FlyingRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -798,23 +758,19 @@ static void FlyingRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } else { @@ -849,46 +805,39 @@ static void FlyingRCTrack60DegUpTo25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 71, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 71, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 71, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 71, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 71, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 71, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 71, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 71, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -953,23 +902,19 @@ static void FlyingRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -1027,46 +972,39 @@ static void FlyingRCTrack25DegUpToFlat( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } } @@ -1151,11 +1089,10 @@ static void FlyingRCTrackLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1165,10 +1102,10 @@ static void FlyingRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1202,7 +1139,7 @@ static void FlyingRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1236,10 +1173,10 @@ static void FlyingRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1273,7 +1210,7 @@ static void FlyingRCTrackLeftQuarterTurn5( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1299,15 +1236,14 @@ static void FlyingRCTrackLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1318,7 +1254,7 @@ static void FlyingRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1360,17 +1296,16 @@ static void FlyingRCTrackLeftQuarterTurn5( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1404,7 +1339,7 @@ static void FlyingRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1438,10 +1373,10 @@ static void FlyingRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1475,7 +1410,7 @@ static void FlyingRCTrackLeftQuarterTurn5( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1511,19 +1446,18 @@ static void FlyingRCTrackLeftQuarterTurn5( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1534,7 +1468,7 @@ static void FlyingRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; FlyingRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1576,16 +1510,12 @@ static void FlyingRCTrackFlatToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -1623,12 +1553,11 @@ static void FlyingRCTrackFlatToLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -1670,16 +1599,12 @@ static void FlyingRCTrackFlatToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -1717,12 +1642,11 @@ static void FlyingRCTrackFlatToRightBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -1764,16 +1688,12 @@ static void FlyingRCTrackLeftBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -1811,12 +1731,11 @@ static void FlyingRCTrackLeftBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -1858,16 +1777,12 @@ static void FlyingRCTrackRightBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -1905,12 +1820,11 @@ static void FlyingRCTrackRightBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -1950,11 +1864,10 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1964,10 +1877,10 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2001,7 +1914,7 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2035,10 +1948,10 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -2072,7 +1985,7 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -2101,15 +2014,14 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2120,7 +2032,7 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2162,17 +2074,16 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2204,7 +2115,7 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2237,10 +2148,10 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -2272,7 +2183,7 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -2308,19 +2219,18 @@ static void FlyingRCTrackBankedLeftQuarterTurn5( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2331,7 +2241,7 @@ static void FlyingRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; FlyingRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2373,23 +2283,19 @@ static void FlyingRCTrackLeftBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -2431,36 +2337,32 @@ static void FlyingRCTrackLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } } @@ -2502,23 +2404,19 @@ static void FlyingRCTrackRightBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -2560,36 +2458,32 @@ static void FlyingRCTrackRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } } @@ -2631,23 +2525,19 @@ static void FlyingRCTrack25DegUpToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -2689,36 +2579,32 @@ static void FlyingRCTrack25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } } @@ -2760,23 +2646,19 @@ static void FlyingRCTrack25DegUpToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -2818,36 +2700,32 @@ static void FlyingRCTrack25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } } @@ -2915,16 +2793,12 @@ static void FlyingRCTrackLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -2962,12 +2836,11 @@ static void FlyingRCTrackLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -3012,11 +2885,10 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3026,10 +2898,10 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3061,7 +2933,7 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -3094,10 +2966,10 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -3129,7 +3001,7 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -3155,15 +3027,14 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3174,7 +3045,7 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3212,17 +3083,16 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 49, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3252,7 +3122,7 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -3282,10 +3152,10 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -3315,7 +3185,7 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -3347,19 +3217,18 @@ static void FlyingRCTrackLeftQuarterTurn525DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 49, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3398,11 +3267,10 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3412,10 +3280,10 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3447,7 +3315,7 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -3480,10 +3348,10 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -3515,7 +3383,7 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -3541,15 +3409,14 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3560,7 +3427,7 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3598,17 +3465,16 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 49, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3638,7 +3504,7 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -3668,10 +3534,10 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -3701,7 +3567,7 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -3733,19 +3599,18 @@ static void FlyingRCTrackRightQuarterTurn525DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 49, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3756,7 +3621,7 @@ static void FlyingRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; FlyingRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3765,7 +3630,7 @@ static void FlyingRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; FlyingRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3802,11 +3667,10 @@ static void FlyingRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3816,7 +3680,7 @@ static void FlyingRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3825,15 +3689,13 @@ static void FlyingRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17309), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17313), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 1, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3854,7 +3716,7 @@ static void FlyingRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3873,15 +3735,13 @@ static void FlyingRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17309), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17313), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 1, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3892,7 +3752,7 @@ static void FlyingRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3918,15 +3778,14 @@ static void FlyingRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3937,7 +3796,7 @@ static void FlyingRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3979,14 +3838,13 @@ static void FlyingRCTrackSBendLeft( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4025,17 +3883,15 @@ static void FlyingRCTrackSBendLeft( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4074,17 +3930,15 @@ static void FlyingRCTrackSBendLeft( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4120,19 +3974,18 @@ static void FlyingRCTrackSBendLeft( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4171,11 +4024,10 @@ static void FlyingRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4185,7 +4037,7 @@ static void FlyingRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4195,16 +4047,14 @@ static void FlyingRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(17317), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17321), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4223,7 +4073,7 @@ static void FlyingRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4241,16 +4091,14 @@ static void FlyingRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(17317), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17321), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4261,7 +4109,7 @@ static void FlyingRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4287,15 +4135,14 @@ static void FlyingRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4306,7 +4153,7 @@ static void FlyingRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4348,14 +4195,13 @@ static void FlyingRCTrackSBendRight( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4394,17 +4240,15 @@ static void FlyingRCTrackSBendRight( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4443,17 +4287,15 @@ static void FlyingRCTrackSBendRight( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4489,19 +4331,18 @@ static void FlyingRCTrackSBendRight( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4540,11 +4381,10 @@ static void FlyingRCTrackLeftQuarterTurn3( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4554,10 +4394,10 @@ static void FlyingRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4591,7 +4431,7 @@ static void FlyingRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4617,15 +4457,14 @@ static void FlyingRCTrackLeftQuarterTurn3( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4636,7 +4475,7 @@ static void FlyingRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4678,17 +4517,16 @@ static void FlyingRCTrackLeftQuarterTurn3( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4722,7 +4560,7 @@ static void FlyingRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4758,19 +4596,18 @@ static void FlyingRCTrackLeftQuarterTurn3( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4781,7 +4618,7 @@ static void FlyingRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; FlyingRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4821,11 +4658,10 @@ static void FlyingRCTrackLeftQuarterTurn3Bank( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4835,10 +4671,10 @@ static void FlyingRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4872,7 +4708,7 @@ static void FlyingRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4901,15 +4737,14 @@ static void FlyingRCTrackLeftQuarterTurn3Bank( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4920,7 +4755,7 @@ static void FlyingRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4962,17 +4797,16 @@ static void FlyingRCTrackLeftQuarterTurn3Bank( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5006,7 +4840,7 @@ static void FlyingRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5042,19 +4876,18 @@ static void FlyingRCTrackLeftQuarterTurn3Bank( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5065,7 +4898,7 @@ static void FlyingRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; FlyingRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -5098,11 +4931,10 @@ static void FlyingRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(17373), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -5112,13 +4944,13 @@ static void FlyingRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5140,15 +4972,14 @@ static void FlyingRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(17372), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -5159,7 +4990,7 @@ static void FlyingRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5197,20 +5028,19 @@ static void FlyingRCTrackLeftQuarterTurn325DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 47, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5242,19 +5072,18 @@ static void FlyingRCTrackLeftQuarterTurn325DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 47, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5289,11 +5118,10 @@ static void FlyingRCTrackRightQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(17370), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -5303,13 +5131,13 @@ static void FlyingRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5318,38 +5146,34 @@ static void FlyingRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17365), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17367), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17369), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 10, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17371), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -5360,7 +5184,7 @@ static void FlyingRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5398,20 +5222,19 @@ static void FlyingRCTrackRightQuarterTurn325DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 47, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5443,19 +5266,18 @@ static void FlyingRCTrackRightQuarterTurn325DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 47, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5466,7 +5288,7 @@ static void FlyingRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; FlyingRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -5475,7 +5297,7 @@ static void FlyingRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; FlyingRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -5513,11 +5335,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5527,10 +5348,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5564,7 +5385,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5593,15 +5414,14 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5612,7 +5432,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5641,15 +5461,14 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5660,10 +5479,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -5697,7 +5516,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -5726,11 +5545,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5740,7 +5558,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5779,11 +5597,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5793,10 +5610,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5830,7 +5647,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5859,15 +5676,14 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5878,7 +5694,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5907,15 +5723,14 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5926,10 +5741,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -5963,7 +5778,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -5992,11 +5807,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6006,7 +5820,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6021,7 +5835,7 @@ static void FlyingRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; FlyingRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -6035,7 +5849,7 @@ static void FlyingRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; FlyingRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -6073,11 +5887,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6087,10 +5900,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6124,7 +5937,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6158,10 +5971,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -6195,7 +6008,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -6224,15 +6037,14 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6243,7 +6055,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -6272,15 +6084,14 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6291,10 +6102,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -6328,7 +6139,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -6361,10 +6172,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -6398,7 +6209,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -6427,11 +6238,10 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6441,7 +6251,7 @@ static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6480,11 +6290,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6494,10 +6303,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6531,7 +6340,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6564,10 +6373,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -6601,7 +6410,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -6630,15 +6439,14 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6649,7 +6457,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -6678,15 +6486,14 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6697,10 +6504,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -6734,7 +6541,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -6768,10 +6575,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -6805,7 +6612,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -6834,11 +6641,10 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6848,7 +6654,7 @@ static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6863,7 +6669,7 @@ static void FlyingRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; FlyingRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -6877,7 +6683,7 @@ static void FlyingRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; FlyingRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -6963,9 +6769,10 @@ static void FlyingRCTrackLeftQuarterTurn160DegUp( } } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x007C7394 */ @@ -7049,9 +6856,10 @@ static void FlyingRCTrackRightQuarterTurn160DegUp( break; } } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x007C73A4 */ @@ -7094,16 +6902,12 @@ static void FlyingRCTrackBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -7124,18 +6928,14 @@ static void FlyingRCTrackBrakes( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -7145,8 +6945,7 @@ static void FlyingRCTrackBooster( { if (!trackElement.IsInverted()) { - BolligerMabillardTrackBooster( - session, ride, trackSequence, direction, height, trackElement); + BolligerMabillardTrackBooster(session, ride, trackSequence, direction, height, trackElement); } else { @@ -7156,18 +6955,14 @@ static void FlyingRCTrackBooster( { { 0, 6, height + 22 }, { 32, 20, 1 } }); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -7211,17 +7006,16 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -7255,7 +7049,7 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7289,10 +7083,10 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -7326,7 +7120,7 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -7361,19 +7155,18 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 53, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 53, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedSquare); break; case 3: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedSquare); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7418,17 +7211,16 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -7462,7 +7254,7 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7495,10 +7287,10 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -7532,7 +7324,7 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -7567,19 +7359,18 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 53, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 53, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedSquare); break; case 1: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedSquare); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7624,17 +7415,16 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 53, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 53, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -7668,7 +7458,7 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7702,10 +7492,10 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -7739,7 +7529,7 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -7774,19 +7564,18 @@ static void FlyingRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7831,17 +7620,16 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 53, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 53, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -7875,7 +7663,7 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7908,10 +7696,10 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -7945,7 +7733,7 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -7980,19 +7768,18 @@ static void FlyingRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8029,23 +7816,19 @@ static void FlyingRCTrack25DegUpLeftBanked( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } else { @@ -8074,46 +7857,39 @@ static void FlyingRCTrack25DegUpLeftBanked( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 57, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 57, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 57, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 57, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -8149,23 +7925,19 @@ static void FlyingRCTrack25DegUpRightBanked( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } else { @@ -8194,46 +7966,39 @@ static void FlyingRCTrack25DegUpRightBanked( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 57, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 57, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 57, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 57, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -8244,7 +8009,7 @@ static void FlyingRCTrackOnRidePhoto( { if (!trackElement.IsInverted()) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -8270,13 +8035,13 @@ static void FlyingRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -8302,9 +8067,9 @@ static void FlyingRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } } @@ -8357,19 +8122,14 @@ static void FlyingRCTrackLeftEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8403,7 +8163,7 @@ static void FlyingRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8437,7 +8197,7 @@ static void FlyingRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -8448,7 +8208,7 @@ static void FlyingRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -8458,32 +8218,28 @@ static void FlyingRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(17549), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17553), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17557), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17561), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8494,7 +8250,7 @@ static void FlyingRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8528,20 +8284,15 @@ static void FlyingRCTrackLeftEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8575,7 +8326,7 @@ static void FlyingRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8609,7 +8360,7 @@ static void FlyingRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -8620,7 +8371,7 @@ static void FlyingRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -8659,27 +8410,23 @@ static void FlyingRCTrackLeftEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8718,19 +8465,14 @@ static void FlyingRCTrackRightEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8764,7 +8506,7 @@ static void FlyingRCTrackRightEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8798,7 +8540,7 @@ static void FlyingRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -8809,7 +8551,7 @@ static void FlyingRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -8819,32 +8561,28 @@ static void FlyingRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(17533), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17537), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17541), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17545), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8855,7 +8593,7 @@ static void FlyingRCTrackRightEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8889,20 +8627,15 @@ static void FlyingRCTrackRightEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8936,7 +8669,7 @@ static void FlyingRCTrackRightEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8970,7 +8703,7 @@ static void FlyingRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -8981,7 +8714,7 @@ static void FlyingRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9020,27 +8753,23 @@ static void FlyingRCTrackRightEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9097,19 +8826,14 @@ static void FlyingRCTrackLeftEighthBankToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9143,7 +8867,7 @@ static void FlyingRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9177,7 +8901,7 @@ static void FlyingRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -9188,7 +8912,7 @@ static void FlyingRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9198,32 +8922,28 @@ static void FlyingRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(17581), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17585), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17589), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17593), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9234,7 +8954,7 @@ static void FlyingRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9276,14 +8996,13 @@ static void FlyingRCTrackLeftEighthBankToDiag( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9317,7 +9036,7 @@ static void FlyingRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9351,7 +9070,7 @@ static void FlyingRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -9362,7 +9081,7 @@ static void FlyingRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9402,27 +9121,23 @@ static void FlyingRCTrackLeftEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9461,19 +9176,14 @@ static void FlyingRCTrackRightEighthBankToDiag( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9507,7 +9217,7 @@ static void FlyingRCTrackRightEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9541,7 +9251,7 @@ static void FlyingRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -9552,7 +9262,7 @@ static void FlyingRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9562,32 +9272,28 @@ static void FlyingRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(17565), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17569), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17573), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17577), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9598,7 +9304,7 @@ static void FlyingRCTrackRightEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9640,14 +9346,13 @@ static void FlyingRCTrackRightEighthBankToDiag( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9681,7 +9386,7 @@ static void FlyingRCTrackRightEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9715,7 +9420,7 @@ static void FlyingRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -9726,7 +9431,7 @@ static void FlyingRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9765,27 +9470,23 @@ static void FlyingRCTrackRightEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9849,7 +9550,7 @@ static void FlyingRCTrackDiagFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (trackElement.HasChain()) @@ -9882,7 +9583,7 @@ static void FlyingRCTrackDiagFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (trackElement.HasChain()) @@ -9915,7 +9616,7 @@ static void FlyingRCTrackDiagFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (trackElement.HasChain()) @@ -9924,26 +9625,22 @@ static void FlyingRCTrackDiagFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17859), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -9953,26 +9650,22 @@ static void FlyingRCTrackDiagFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17789), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -9984,7 +9677,7 @@ static void FlyingRCTrackDiagFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -10023,7 +9716,7 @@ static void FlyingRCTrackDiagFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (trackElement.HasChain()) @@ -10056,7 +9749,7 @@ static void FlyingRCTrackDiagFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (trackElement.HasChain()) @@ -10089,7 +9782,7 @@ static void FlyingRCTrackDiagFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (trackElement.HasChain()) @@ -10127,27 +9820,23 @@ static void FlyingRCTrackDiagFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -10158,18 +9847,18 @@ static void FlyingRCTrackDiagBrakesInverted( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height + 24, direction, trackSequence, session.TrackColours, InvertedRCDiagBrakeImages, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height + 24, direction, trackSequence, InvertedRCDiagBrakeImages, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 0, height + 39, session.SupportColours); + session, MetalSupportType::Boxed, kDiagSupportPlacement[direction], 0, height + 39, session.SupportColours); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void FlyingRCTrackDiagBrakes( @@ -10237,7 +9926,7 @@ static void FlyingRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -10270,7 +9959,7 @@ static void FlyingRCTrackDiag25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -10303,7 +9992,7 @@ static void FlyingRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -10312,26 +10001,22 @@ static void FlyingRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17871), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -10341,26 +10026,22 @@ static void FlyingRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17801), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -10372,7 +10053,7 @@ static void FlyingRCTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -10411,7 +10092,7 @@ static void FlyingRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -10444,7 +10125,7 @@ static void FlyingRCTrackDiag25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -10477,7 +10158,7 @@ static void FlyingRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -10515,27 +10196,23 @@ static void FlyingRCTrackDiag25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 51, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 51, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 51, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 51, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -10581,7 +10258,7 @@ static void FlyingRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -10614,7 +10291,7 @@ static void FlyingRCTrackDiag60DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -10647,7 +10324,7 @@ static void FlyingRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -10656,26 +10333,22 @@ static void FlyingRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17883), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -10685,26 +10358,22 @@ static void FlyingRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17813), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -10716,7 +10385,7 @@ static void FlyingRCTrackDiag60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -10741,7 +10410,7 @@ static void FlyingRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -10760,7 +10429,7 @@ static void FlyingRCTrackDiag60DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -10779,7 +10448,7 @@ static void FlyingRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -10803,27 +10472,23 @@ static void FlyingRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height + 39, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height + 39, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height + 39, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -10869,7 +10534,7 @@ static void FlyingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -10902,7 +10567,7 @@ static void FlyingRCTrackDiagFlatTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -10935,7 +10600,7 @@ static void FlyingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -10944,26 +10609,22 @@ static void FlyingRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17863), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -10973,26 +10634,22 @@ static void FlyingRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17793), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -11004,7 +10661,7 @@ static void FlyingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11043,7 +10700,7 @@ static void FlyingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -11076,7 +10733,7 @@ static void FlyingRCTrackDiagFlatTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -11109,7 +10766,7 @@ static void FlyingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -11147,27 +10804,23 @@ static void FlyingRCTrackDiagFlatTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 43, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 43, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 43, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 43, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11213,7 +10866,7 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -11246,7 +10899,7 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -11279,7 +10932,7 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -11288,26 +10941,22 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17875), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -11317,26 +10966,22 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17805), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -11348,7 +10993,7 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -11373,7 +11018,7 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -11392,7 +11037,7 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11411,7 +11056,7 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -11435,27 +11080,23 @@ static void FlyingRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height + 39, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height + 39, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height + 39, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -11501,7 +11142,7 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -11534,7 +11175,7 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -11567,7 +11208,7 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -11576,26 +11217,22 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17879), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -11605,26 +11242,22 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17809), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -11636,7 +11269,7 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -11661,7 +11294,7 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -11680,7 +11313,7 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11699,7 +11332,7 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -11723,27 +11356,23 @@ static void FlyingRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height + 39, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height + 39, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height + 39, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -11789,7 +11418,7 @@ static void FlyingRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -11822,7 +11451,7 @@ static void FlyingRCTrackDiag25DegUpToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -11855,7 +11484,7 @@ static void FlyingRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -11864,26 +11493,22 @@ static void FlyingRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17867), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -11893,26 +11518,22 @@ static void FlyingRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17797), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -11924,7 +11545,7 @@ static void FlyingRCTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -11963,7 +11584,7 @@ static void FlyingRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -11996,7 +11617,7 @@ static void FlyingRCTrackDiag25DegUpToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -12029,7 +11650,7 @@ static void FlyingRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -12067,27 +11688,23 @@ static void FlyingRCTrackDiag25DegUpToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 45, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 45, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 45, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 45, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12133,7 +11750,7 @@ static void FlyingRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -12166,7 +11783,7 @@ static void FlyingRCTrackDiag25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -12199,7 +11816,7 @@ static void FlyingRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -12208,26 +11825,22 @@ static void FlyingRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17873), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -12237,26 +11850,22 @@ static void FlyingRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17803), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -12268,7 +11877,7 @@ static void FlyingRCTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12293,7 +11902,7 @@ static void FlyingRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12312,7 +11921,7 @@ static void FlyingRCTrackDiag25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12331,7 +11940,7 @@ static void FlyingRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -12355,27 +11964,23 @@ static void FlyingRCTrackDiag25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 51, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 51, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 51, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 51, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12421,7 +12026,7 @@ static void FlyingRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -12454,7 +12059,7 @@ static void FlyingRCTrackDiag60DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -12487,7 +12092,7 @@ static void FlyingRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -12496,26 +12101,22 @@ static void FlyingRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17885), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -12525,26 +12126,22 @@ static void FlyingRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17815), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -12556,7 +12153,7 @@ static void FlyingRCTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -12581,7 +12178,7 @@ static void FlyingRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -12600,7 +12197,7 @@ static void FlyingRCTrackDiag60DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -12619,7 +12216,7 @@ static void FlyingRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -12643,27 +12240,23 @@ static void FlyingRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height + 39, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height + 39, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height + 39, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -12781,26 +12374,22 @@ static void FlyingRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17869), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -12810,26 +12399,22 @@ static void FlyingRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17799), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -12924,30 +12509,26 @@ static void FlyingRCTrackDiagFlatTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 45, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 45, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 45, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 45, session.SupportColours); break; } break; } } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x007C7514 */ @@ -12990,7 +12571,7 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -13023,7 +12604,7 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -13056,7 +12637,7 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -13065,26 +12646,22 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17881), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -13094,26 +12671,22 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17811), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -13125,7 +12698,7 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -13150,7 +12723,7 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -13169,7 +12742,7 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13188,7 +12761,7 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -13212,27 +12785,23 @@ static void FlyingRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height + 39, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height + 39, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height + 39, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -13278,7 +12847,7 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -13311,7 +12880,7 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -13344,7 +12913,7 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -13353,26 +12922,22 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17877), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -13382,26 +12947,22 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17807), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -13413,7 +12974,7 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -13438,7 +12999,7 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -13457,7 +13018,7 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13476,7 +13037,7 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -13500,27 +13061,23 @@ static void FlyingRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height + 39, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height + 39, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height + 39, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -13566,7 +13123,7 @@ static void FlyingRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -13599,7 +13156,7 @@ static void FlyingRCTrackDiag25DegDownToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -13632,7 +13189,7 @@ static void FlyingRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -13641,26 +13198,22 @@ static void FlyingRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17865), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -13670,26 +13223,22 @@ static void FlyingRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17795), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -13701,7 +13250,7 @@ static void FlyingRCTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13726,7 +13275,7 @@ static void FlyingRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13745,7 +13294,7 @@ static void FlyingRCTrackDiag25DegDownToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13764,7 +13313,7 @@ static void FlyingRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13788,27 +13337,23 @@ static void FlyingRCTrackDiag25DegDownToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 43, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 43, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 43, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 43, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13840,7 +13385,7 @@ static void FlyingRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13862,7 +13407,7 @@ static void FlyingRCTrackDiagFlatToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -13881,33 +13426,29 @@ static void FlyingRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17829), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13918,7 +13459,7 @@ static void FlyingRCTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -13943,7 +13484,7 @@ static void FlyingRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13962,7 +13503,7 @@ static void FlyingRCTrackDiagFlatToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -13981,7 +13522,7 @@ static void FlyingRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -14005,27 +13546,23 @@ static void FlyingRCTrackDiagFlatToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14057,7 +13594,7 @@ static void FlyingRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14076,7 +13613,7 @@ static void FlyingRCTrackDiagFlatToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14098,33 +13635,29 @@ static void FlyingRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17834), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14135,7 +13668,7 @@ static void FlyingRCTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14160,7 +13693,7 @@ static void FlyingRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14179,7 +13712,7 @@ static void FlyingRCTrackDiagFlatToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14198,7 +13731,7 @@ static void FlyingRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -14222,27 +13755,23 @@ static void FlyingRCTrackDiagFlatToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14274,7 +13803,7 @@ static void FlyingRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14296,7 +13825,7 @@ static void FlyingRCTrackDiagLeftBankToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14315,33 +13844,29 @@ static void FlyingRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17836), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14352,7 +13877,7 @@ static void FlyingRCTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14377,7 +13902,7 @@ static void FlyingRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14396,7 +13921,7 @@ static void FlyingRCTrackDiagLeftBankToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14415,7 +13940,7 @@ static void FlyingRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -14439,27 +13964,23 @@ static void FlyingRCTrackDiagLeftBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14491,7 +14012,7 @@ static void FlyingRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14510,7 +14031,7 @@ static void FlyingRCTrackDiagRightBankToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14532,33 +14053,29 @@ static void FlyingRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17831), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14569,7 +14086,7 @@ static void FlyingRCTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14594,7 +14111,7 @@ static void FlyingRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14613,7 +14130,7 @@ static void FlyingRCTrackDiagRightBankToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14632,7 +14149,7 @@ static void FlyingRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -14656,27 +14173,23 @@ static void FlyingRCTrackDiagRightBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14708,7 +14221,7 @@ static void FlyingRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -14730,7 +14243,7 @@ static void FlyingRCTrackDiagLeftBankTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -14749,33 +14262,29 @@ static void FlyingRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17849), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14786,7 +14295,7 @@ static void FlyingRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -14811,7 +14320,7 @@ static void FlyingRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -14830,7 +14339,7 @@ static void FlyingRCTrackDiagLeftBankTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -14849,7 +14358,7 @@ static void FlyingRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14873,27 +14382,23 @@ static void FlyingRCTrackDiagLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 43, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 43, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 43, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 43, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -14925,7 +14430,7 @@ static void FlyingRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -14944,7 +14449,7 @@ static void FlyingRCTrackDiagRightBankTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -14966,33 +14471,29 @@ static void FlyingRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17854), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15003,7 +14504,7 @@ static void FlyingRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -15028,7 +14529,7 @@ static void FlyingRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -15047,7 +14548,7 @@ static void FlyingRCTrackDiagRightBankTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -15066,7 +14567,7 @@ static void FlyingRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -15090,27 +14591,23 @@ static void FlyingRCTrackDiagRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 43, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 43, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 43, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 43, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -15142,7 +14639,7 @@ static void FlyingRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -15164,7 +14661,7 @@ static void FlyingRCTrackDiag25DegUpToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -15183,33 +14680,29 @@ static void FlyingRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17839), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15220,7 +14713,7 @@ static void FlyingRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -15245,7 +14738,7 @@ static void FlyingRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -15264,7 +14757,7 @@ static void FlyingRCTrackDiag25DegUpToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -15283,7 +14776,7 @@ static void FlyingRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -15307,27 +14800,23 @@ static void FlyingRCTrackDiag25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 45, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 45, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 45, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 45, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -15359,7 +14848,7 @@ static void FlyingRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -15378,7 +14867,7 @@ static void FlyingRCTrackDiag25DegUpToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -15400,33 +14889,29 @@ static void FlyingRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17844), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15437,7 +14922,7 @@ static void FlyingRCTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -15462,7 +14947,7 @@ static void FlyingRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -15481,7 +14966,7 @@ static void FlyingRCTrackDiag25DegUpToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -15500,7 +14985,7 @@ static void FlyingRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -15524,27 +15009,23 @@ static void FlyingRCTrackDiag25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 45, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 45, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 45, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 45, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -15621,26 +15102,22 @@ static void FlyingRCTrackDiagLeftBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17846), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15734,30 +15211,26 @@ static void FlyingRCTrackDiagLeftBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 45, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 45, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 45, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 45, session.SupportColours); break; } break; } } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x007C75F4 */ @@ -15831,26 +15304,22 @@ static void FlyingRCTrackDiagRightBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17841), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15944,30 +15413,26 @@ static void FlyingRCTrackDiagRightBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 45, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 45, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 45, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 45, session.SupportColours); break; } break; } } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x007C7604 */ @@ -15996,7 +15461,7 @@ static void FlyingRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -16018,7 +15483,7 @@ static void FlyingRCTrackDiag25DegDownToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -16037,33 +15502,29 @@ static void FlyingRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17856), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16074,7 +15535,7 @@ static void FlyingRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -16099,7 +15560,7 @@ static void FlyingRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -16118,7 +15579,7 @@ static void FlyingRCTrackDiag25DegDownToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -16137,7 +15598,7 @@ static void FlyingRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -16161,27 +15622,23 @@ static void FlyingRCTrackDiag25DegDownToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 43, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 43, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 43, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 43, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -16213,7 +15670,7 @@ static void FlyingRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -16232,7 +15689,7 @@ static void FlyingRCTrackDiag25DegDownToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -16254,33 +15711,29 @@ static void FlyingRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17851), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16291,7 +15744,7 @@ static void FlyingRCTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -16316,7 +15769,7 @@ static void FlyingRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -16335,7 +15788,7 @@ static void FlyingRCTrackDiag25DegDownToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -16354,7 +15807,7 @@ static void FlyingRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -16378,27 +15831,23 @@ static void FlyingRCTrackDiag25DegDownToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 43, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 43, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 43, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 43, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -16430,7 +15879,7 @@ static void FlyingRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -16449,7 +15898,7 @@ static void FlyingRCTrackDiagLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -16468,33 +15917,29 @@ static void FlyingRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17825), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16505,7 +15950,7 @@ static void FlyingRCTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -16530,7 +15975,7 @@ static void FlyingRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -16549,7 +15994,7 @@ static void FlyingRCTrackDiagLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -16568,7 +16013,7 @@ static void FlyingRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -16592,27 +16037,23 @@ static void FlyingRCTrackDiagLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -16644,7 +16085,7 @@ static void FlyingRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -16663,7 +16104,7 @@ static void FlyingRCTrackDiagRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -16682,33 +16123,29 @@ static void FlyingRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17827), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16719,7 +16156,7 @@ static void FlyingRCTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -16744,7 +16181,7 @@ static void FlyingRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -16763,7 +16200,7 @@ static void FlyingRCTrackDiagRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -16782,7 +16219,7 @@ static void FlyingRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -16806,27 +16243,23 @@ static void FlyingRCTrackDiagRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -16863,11 +16296,10 @@ static void FlyingRCTrackLeftFlyerTwistUp( { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -16877,7 +16309,7 @@ static void FlyingRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -16908,7 +16340,7 @@ static void FlyingRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -16940,19 +16372,18 @@ static void FlyingRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -16988,11 +16419,10 @@ static void FlyingRCTrackRightFlyerTwistUp( { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -17002,7 +16432,7 @@ static void FlyingRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -17032,7 +16462,7 @@ static void FlyingRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -17063,19 +16493,18 @@ static void FlyingRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -17117,14 +16546,13 @@ static void FlyingRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -17155,7 +16583,7 @@ static void FlyingRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -17181,15 +16609,14 @@ static void FlyingRCTrackLeftFlyerTwistDown( { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -17200,7 +16627,7 @@ static void FlyingRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -17241,14 +16668,13 @@ static void FlyingRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -17278,7 +16704,7 @@ static void FlyingRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -17304,15 +16730,14 @@ static void FlyingRCTrackRightFlyerTwistDown( { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height - 5, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -17323,7 +16748,7 @@ static void FlyingRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -17355,18 +16780,14 @@ static void FlyingRCTrackFlyerHalfLoopUp( session, direction, session.TrackColours.WithIndex(17641), { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17376,35 +16797,31 @@ static void FlyingRCTrackFlyerHalfLoopUp( session, direction, session.TrackColours.WithIndex(17627), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17635), { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 15, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17632), { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17640), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -17436,7 +16853,7 @@ static void FlyingRCTrackFlyerHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -17460,14 +16877,11 @@ static void FlyingRCTrackFlyerHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -17501,14 +16915,11 @@ static void FlyingRCTrackFlyerHalfLoopDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -17540,7 +16951,7 @@ static void FlyingRCTrackFlyerHalfLoopDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 2: switch (direction) @@ -17550,35 +16961,31 @@ static void FlyingRCTrackFlyerHalfLoopDown( session, direction, session.TrackColours.WithIndex(17627), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17635), { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 15, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17632), { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17640), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -17600,18 +17007,14 @@ static void FlyingRCTrackFlyerHalfLoopDown( session, direction, session.TrackColours.WithIndex(17641), { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17638,15 +17041,11 @@ static void FlyingRCTrackBlockBrakes( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -17667,18 +17066,14 @@ static void FlyingRCTrackBlockBrakes( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -17712,11 +17107,10 @@ static void FlyingRCTrackLeftBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18023), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -17726,13 +17120,13 @@ static void FlyingRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -17756,15 +17150,14 @@ static void FlyingRCTrackLeftBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18022), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -17775,7 +17168,7 @@ static void FlyingRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -17813,20 +17206,19 @@ static void FlyingRCTrackLeftBankedQuarterTurn325DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 47, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -17858,19 +17250,18 @@ static void FlyingRCTrackLeftBankedQuarterTurn325DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 47, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -17906,11 +17297,10 @@ static void FlyingRCTrackRightBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18020), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -17920,13 +17310,13 @@ static void FlyingRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -17935,40 +17325,36 @@ static void FlyingRCTrackRightBankedQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18015), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18017), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18019), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 10, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18021), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -17979,7 +17365,7 @@ static void FlyingRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18017,20 +17403,19 @@ static void FlyingRCTrackRightBankedQuarterTurn325DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 47, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -18062,19 +17447,18 @@ static void FlyingRCTrackRightBankedQuarterTurn325DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 47, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -18085,7 +17469,7 @@ static void FlyingRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; FlyingRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -18094,7 +17478,7 @@ static void FlyingRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; FlyingRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -18131,11 +17515,10 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -18145,10 +17528,10 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -18181,7 +17564,7 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -18214,10 +17597,10 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -18251,7 +17634,7 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -18277,15 +17660,14 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -18296,7 +17678,7 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18334,17 +17716,16 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 49, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -18374,7 +17755,7 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -18404,10 +17785,10 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -18437,7 +17818,7 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -18469,19 +17850,18 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 49, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -18520,11 +17900,10 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -18534,10 +17913,10 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -18570,7 +17949,7 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -18603,10 +17982,10 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -18640,7 +18019,7 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -18666,15 +18045,14 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -18685,7 +18063,7 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18723,17 +18101,16 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 49, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -18763,7 +18140,7 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -18793,10 +18170,10 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -18826,7 +18203,7 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -18858,19 +18235,18 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegUp( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 49, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -18881,7 +18257,7 @@ static void FlyingRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; FlyingRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -18890,7 +18266,7 @@ static void FlyingRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; FlyingRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -18929,23 +18305,19 @@ static void FlyingRCTrack25DegUpToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } else { @@ -18974,46 +18346,39 @@ static void FlyingRCTrack25DegUpToLeftBanked25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 57, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 57, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 57, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 57, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -19052,23 +18417,19 @@ static void FlyingRCTrack25DegUpToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } else { @@ -19097,46 +18458,39 @@ static void FlyingRCTrack25DegUpToRightBanked25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 57, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 57, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 57, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 57, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -19175,23 +18529,19 @@ static void FlyingRCTrackLeftBanked25DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } else { @@ -19220,46 +18570,39 @@ static void FlyingRCTrackLeftBanked25DegUpTo25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 57, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 57, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 57, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 57, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -19298,23 +18641,19 @@ static void FlyingRCTrackRightBanked25DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } else { @@ -19343,46 +18682,39 @@ static void FlyingRCTrackRightBanked25DegUpTo25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 57, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 57, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 57, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 57, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -19450,23 +18782,19 @@ static void FlyingRCTrackLeftBankedFlatToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -19495,46 +18823,39 @@ static void FlyingRCTrackLeftBankedFlatToLeftBanked25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } } @@ -19570,23 +18891,19 @@ static void FlyingRCTrackRightBankedFlatToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -19615,46 +18932,39 @@ static void FlyingRCTrackRightBankedFlatToRightBanked25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } } @@ -19690,23 +19000,19 @@ static void FlyingRCTrackLeftBanked25DegUpToLeftBankedFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -19735,46 +19041,39 @@ static void FlyingRCTrackLeftBanked25DegUpToLeftBankedFlat( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } } @@ -19810,23 +19109,19 @@ static void FlyingRCTrackRightBanked25DegUpToRightBankedFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -19855,46 +19150,39 @@ static void FlyingRCTrackRightBanked25DegUpToRightBankedFlat( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } } @@ -19965,23 +19253,19 @@ static void FlyingRCTrackFlatToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -20010,46 +19294,39 @@ static void FlyingRCTrackFlatToLeftBanked25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } } @@ -20088,23 +19365,19 @@ static void FlyingRCTrackFlatToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -20133,46 +19406,39 @@ static void FlyingRCTrackFlatToRightBanked25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 49, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 49, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 49, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 49, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 49, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } } @@ -20211,23 +19477,19 @@ static void FlyingRCTrackLeftBanked25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -20256,46 +19518,39 @@ static void FlyingRCTrackLeftBanked25DegUpToFlat( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } } @@ -20334,23 +19589,19 @@ static void FlyingRCTrackRightBanked25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -20379,46 +19630,39 @@ static void FlyingRCTrackRightBanked25DegUpToFlat( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 47, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 47, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 47, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 47, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 47, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } } @@ -20490,11 +19734,8 @@ static void FlyingRCTrack90DegUp( } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -20542,15 +19783,12 @@ static void FlyingRCTrack60DegUpTo90DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: break; @@ -20596,18 +19834,14 @@ static void FlyingRCTrack90DegUpTo60DegUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::SquareSlopeEnd); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); } static void FlyingRCTrack60DegDownTo90DegDown( @@ -20644,14 +19878,11 @@ static void FlyingRCTrack60DegDownTo90DegDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: break; @@ -20693,7 +19924,7 @@ static void FlyingRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -20724,7 +19955,7 @@ static void FlyingRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -20752,14 +19983,14 @@ static void FlyingRCTrack90DegToInvertedFlatQuarterLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -20777,8 +20008,7 @@ static void FlyingRCTrackFlatTo60DegUpLongBase( { if (trackElement.IsInverted()) return; - BolligerMabillardTrackFlatTo60DegUpLongBase( - session, ride, trackSequence, direction, height, trackElement); + BolligerMabillardTrackFlatTo60DegUpLongBase(session, ride, trackSequence, direction, height, trackElement); } static void FlyingRCTrack60DegUpToFlatLongBase( @@ -20787,8 +20017,7 @@ static void FlyingRCTrack60DegUpToFlatLongBase( { if (trackElement.IsInverted()) return; - BolligerMabillardTrack60DegUpToFlatLongBase( - session, ride, trackSequence, direction, height, trackElement); + BolligerMabillardTrack60DegUpToFlatLongBase(session, ride, trackSequence, direction, height, trackElement); } static void FlyingRCTrack60DegDownToFlatLongBase( @@ -20797,7 +20026,7 @@ static void FlyingRCTrack60DegDownToFlatLongBase( { if (trackElement.IsInverted()) return; - BolligerMabillardTrackFlatTo60DegUpLongBase( + BolligerMabillardTrackFlatTo60DegUpLongBase( session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } @@ -20807,7 +20036,7 @@ static void FlyingRCTrackFlatTo60DegDownLongBase( { if (trackElement.IsInverted()) return; - BolligerMabillardTrack60DegUpToFlatLongBase( + BolligerMabillardTrack60DegUpToFlatLongBase( session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void FlyingRCTrackHalfLoopInvertedUp( @@ -20842,39 +20071,32 @@ static void FlyingRCTrackHalfLoopInvertedUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -20901,7 +20123,7 @@ static void FlyingRCTrackHalfLoopInvertedUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -20935,7 +20157,7 @@ static void FlyingRCTrackHalfLoopInvertedUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -20963,14 +20185,11 @@ static void FlyingRCTrackHalfLoopInvertedUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -21014,14 +20233,11 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -21048,11 +20264,8 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -21086,7 +20299,7 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -21120,7 +20333,7 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -21154,7 +20367,7 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -21188,7 +20401,7 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -21198,37 +20411,33 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( session, direction, session.TrackColours.WithIndex(27645), { 0, 0, height - 4 }, { { 0, 16, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 24, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 24, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27652), { 0, 0, height - 4 }, { { 0, 16, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 24, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 24, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27659), { 0, 0, height - 4 }, { { 0, 0, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 24, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 24, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27666), { 0, 0, height - 4 }, { { 0, 0, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 24, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 24, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -21238,7 +20447,7 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -21275,14 +20484,11 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -21309,11 +20515,8 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -21347,7 +20550,7 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -21381,7 +20584,7 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -21415,7 +20618,7 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -21449,7 +20652,7 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -21459,37 +20662,33 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( session, direction, session.TrackColours.WithIndex(27694), { 0, 0, height - 4 }, { { 0, 0, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 24, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 24, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27687), { 0, 0, height - 4 }, { { 0, 0, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 24, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 24, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27680), { 0, 0, height - 4 }, { { 0, 16, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 24, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 24, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27673), { 0, 0, height - 4 }, { { 0, 16, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 24, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 24, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -21499,7 +20698,7 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -21837,13 +21036,13 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionFlyingRC(int32_t trackType) return FlyingRCTrack60DegDownToFlatLongBase; // OpenRCT2-specific track elements case TrackElemType::LeftFlyerLargeHalfLoopUninvertedUp: - return BolligerMabillardTrackLeftLargeHalfLoopUp; + return BolligerMabillardTrackLeftLargeHalfLoopUp; case TrackElemType::RightFlyerLargeHalfLoopUninvertedUp: - return BolligerMabillardTrackRightLargeHalfLoopUp; + return BolligerMabillardTrackRightLargeHalfLoopUp; case TrackElemType::LeftFlyerLargeHalfLoopInvertedDown: - return BolligerMabillardTrackLeftLargeHalfLoopDown; + return BolligerMabillardTrackLeftLargeHalfLoopDown; case TrackElemType::RightFlyerLargeHalfLoopInvertedDown: - return BolligerMabillardTrackRightLargeHalfLoopDown; + return BolligerMabillardTrackRightLargeHalfLoopDown; case TrackElemType::FlyerHalfLoopInvertedUp: return FlyingRCTrackHalfLoopInvertedUp; case TrackElemType::FlyerHalfLoopUninvertedDown: @@ -21861,5 +21060,5 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionFlyingRC(int32_t trackType) case TrackElemType::DiagBlockBrakes: return FlyingRCTrackDiagBlockBrakes; } - return GetTrackPaintFunctionBolligerMabillard(trackType); + return GetTrackPaintFunctionBolligerMabillard(trackType); } diff --git a/src/openrct2/ride/coaster/GigaCoaster.cpp b/src/openrct2/ride/coaster/GigaCoaster.cpp index 8b0779daef..da428b9044 100644 --- a/src/openrct2/ride/coaster/GigaCoaster.cpp +++ b/src/openrct2/ride/coaster/GigaCoaster.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + // Closed block brakes and regular brakes use the same images static constexpr uint32_t GIGA_COASTER_BRAKE_SW_NE_OPEN_1 = 18076; static constexpr uint32_t GIGA_COASTER_BRAKE_NW_SE_OPEN_1 = 18077; @@ -28,7 +33,7 @@ static constexpr uint32_t GIGA_COASTER_BRAKE_NW_SE_OPEN_2 = 18081; static constexpr uint32_t GIGA_COASTER_BRAKE_SW_NE_CLOSED_2 = 18082; static constexpr uint32_t GIGA_COASTER_BRAKE_NW_SE_CLOSED_2 = 18083; -static constexpr uint32_t _GigaCoasterBrakeImages[NumOrthogonalDirections][2][2] = { +static constexpr uint32_t _GigaCoasterBrakeImages[kNumOrthogonalDirections][2][2] = { { { GIGA_COASTER_BRAKE_SW_NE_OPEN_1, GIGA_COASTER_BRAKE_SW_NE_OPEN_2 }, { GIGA_COASTER_BRAKE_SW_NE_CLOSED_1, GIGA_COASTER_BRAKE_SW_NE_CLOSED_2 } }, { { GIGA_COASTER_BRAKE_NW_SE_OPEN_1, GIGA_COASTER_BRAKE_NW_SE_OPEN_2 }, @@ -43,7 +48,7 @@ static constexpr uint32_t _GigaCoasterBrakeImages[NumOrthogonalDirections][2][2] * second level: background, foreground * third level: direction */ -static constexpr uint32_t GigaDiagBrakeImages[2][2][NumOrthogonalDirections] = { +static constexpr uint32_t GigaDiagBrakeImages[2][2][kNumOrthogonalDirections] = { { // Open { @@ -104,8 +109,7 @@ static void GigaRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else if (trackElement.HasChain()) @@ -135,8 +139,7 @@ static void GigaRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else @@ -158,17 +161,12 @@ static void GigaRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void GigaRCTrackStation( @@ -198,11 +196,11 @@ static void GigaRCTrackStation( PaintAddImageAsParentRotated( session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD684 */ @@ -237,8 +235,7 @@ static void GigaRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else if (trackElement.HasChain()) @@ -268,8 +265,7 @@ static void GigaRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else @@ -299,24 +295,19 @@ static void GigaRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AD694 */ @@ -351,8 +342,7 @@ static void GigaRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } else @@ -382,24 +372,19 @@ static void GigaRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008AD6A4 */ @@ -434,8 +419,7 @@ static void GigaRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else if (trackElement.HasChain()) @@ -465,8 +449,7 @@ static void GigaRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else @@ -496,24 +479,19 @@ static void GigaRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AD6B4 */ @@ -554,8 +532,7 @@ static void GigaRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } else @@ -591,24 +568,19 @@ static void GigaRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AD6C4 */ @@ -649,8 +621,7 @@ static void GigaRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } else @@ -686,24 +657,19 @@ static void GigaRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AD6D4 */ @@ -738,8 +704,7 @@ static void GigaRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } else if (trackElement.HasChain()) @@ -769,8 +734,7 @@ static void GigaRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } else @@ -800,24 +764,19 @@ static void GigaRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008AD6E4 */ @@ -899,11 +858,10 @@ static void GigaRCTrackLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -913,10 +871,10 @@ static void GigaRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -950,7 +908,7 @@ static void GigaRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -984,10 +942,10 @@ static void GigaRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1021,7 +979,7 @@ static void GigaRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1047,15 +1005,14 @@ static void GigaRCTrackLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1066,7 +1023,7 @@ static void GigaRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1076,7 +1033,7 @@ static void GigaRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; GigaRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1116,16 +1073,11 @@ static void GigaRCTrackFlatToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD774 */ @@ -1164,16 +1116,11 @@ static void GigaRCTrackFlatToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD784 */ @@ -1212,16 +1159,11 @@ static void GigaRCTrackLeftBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD794 */ @@ -1260,16 +1202,11 @@ static void GigaRCTrackRightBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD7A4 */ @@ -1306,11 +1243,10 @@ static void GigaRCTrackBankedLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1320,10 +1256,10 @@ static void GigaRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1357,7 +1293,7 @@ static void GigaRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1391,10 +1327,10 @@ static void GigaRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1428,7 +1364,7 @@ static void GigaRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1457,15 +1393,14 @@ static void GigaRCTrackBankedLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1476,7 +1411,7 @@ static void GigaRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1486,7 +1421,7 @@ static void GigaRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; GigaRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1526,23 +1461,18 @@ static void GigaRCTrackLeftBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AD7D4 */ @@ -1581,23 +1511,18 @@ static void GigaRCTrackRightBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AD7E4 */ @@ -1636,23 +1561,18 @@ static void GigaRCTrack25DegUpToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008AD7F4 */ @@ -1691,23 +1611,18 @@ static void GigaRCTrack25DegUpToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008AD804 */ @@ -1772,16 +1687,11 @@ static void GigaRCTrackLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD854 */ @@ -1823,11 +1733,10 @@ static void GigaRCTrackLeftQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1837,10 +1746,10 @@ static void GigaRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1872,7 +1781,7 @@ static void GigaRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1905,10 +1814,10 @@ static void GigaRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1940,7 +1849,7 @@ static void GigaRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1966,15 +1875,14 @@ static void GigaRCTrackLeftQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -1985,7 +1893,7 @@ static void GigaRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2021,11 +1929,10 @@ static void GigaRCTrackRightQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2035,10 +1942,10 @@ static void GigaRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2070,7 +1977,7 @@ static void GigaRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -2102,10 +2009,10 @@ static void GigaRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -2137,7 +2044,7 @@ static void GigaRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -2163,15 +2070,14 @@ static void GigaRCTrackRightQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -2182,7 +2088,7 @@ static void GigaRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2192,7 +2098,7 @@ static void GigaRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; GigaRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2201,7 +2107,7 @@ static void GigaRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; GigaRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2236,11 +2142,10 @@ static void GigaRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2250,7 +2155,7 @@ static void GigaRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2259,13 +2164,13 @@ static void GigaRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18239), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18243), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2286,7 +2191,7 @@ static void GigaRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2305,13 +2210,13 @@ static void GigaRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18239), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18243), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2322,7 +2227,7 @@ static void GigaRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2348,15 +2253,14 @@ static void GigaRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2367,7 +2271,7 @@ static void GigaRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2403,11 +2307,10 @@ static void GigaRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2417,7 +2320,7 @@ static void GigaRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2427,15 +2330,14 @@ static void GigaRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(18247), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18251), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2454,7 +2356,7 @@ static void GigaRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2472,15 +2374,14 @@ static void GigaRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(18247), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18251), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2491,7 +2392,7 @@ static void GigaRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2517,15 +2418,14 @@ static void GigaRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2536,7 +2436,7 @@ static void GigaRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2572,11 +2472,10 @@ static void GigaRCTrackLeftQuarterTurn3( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2586,10 +2485,10 @@ static void GigaRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2623,7 +2522,7 @@ static void GigaRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2649,15 +2548,14 @@ static void GigaRCTrackLeftQuarterTurn3( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2668,7 +2566,7 @@ static void GigaRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2678,7 +2576,7 @@ static void GigaRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; GigaRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2716,11 +2614,10 @@ static void GigaRCTrackLeftQuarterTurn3Bank( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2730,10 +2627,10 @@ static void GigaRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2767,7 +2664,7 @@ static void GigaRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2796,15 +2693,14 @@ static void GigaRCTrackLeftQuarterTurn3Bank( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2815,7 +2711,7 @@ static void GigaRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2825,7 +2721,7 @@ static void GigaRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; GigaRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2856,11 +2752,10 @@ static void GigaRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18303), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2870,13 +2765,13 @@ static void GigaRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -2898,15 +2793,14 @@ static void GigaRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18302), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -2917,7 +2811,7 @@ static void GigaRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2949,11 +2843,10 @@ static void GigaRCTrackRightQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18300), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2963,13 +2856,13 @@ static void GigaRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -2978,34 +2871,34 @@ static void GigaRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18295), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18297), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18299), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18301), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3016,7 +2909,7 @@ static void GigaRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3026,7 +2919,7 @@ static void GigaRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; GigaRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3035,7 +2928,7 @@ static void GigaRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; GigaRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3073,11 +2966,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3087,10 +2979,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3124,7 +3016,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3153,15 +3045,14 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3172,7 +3063,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3201,15 +3092,14 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3220,10 +3110,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3257,7 +3147,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3286,11 +3176,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3300,7 +3189,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3339,11 +3228,10 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3353,10 +3241,10 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3390,7 +3278,7 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3419,15 +3307,14 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3438,7 +3325,7 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3467,15 +3354,14 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3486,10 +3372,10 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3523,7 +3409,7 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3552,11 +3438,10 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3566,7 +3451,7 @@ static void GigaRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3581,7 +3466,7 @@ static void GigaRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; GigaRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3595,7 +3480,7 @@ static void GigaRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; GigaRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3633,11 +3518,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3647,10 +3531,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3684,7 +3568,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3718,10 +3602,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -3755,7 +3639,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3784,15 +3668,14 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3803,7 +3686,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3832,15 +3715,14 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3851,10 +3733,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -3888,7 +3770,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -3921,10 +3803,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -3958,7 +3840,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -3987,11 +3869,10 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4001,7 +3882,7 @@ static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4040,11 +3921,10 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4054,10 +3934,10 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4091,7 +3971,7 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4124,10 +4004,10 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4161,7 +4041,7 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4171,7 +4051,7 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(18342), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4181,30 +4061,30 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(18358), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18352), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18357), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4215,7 +4095,7 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4244,15 +4124,14 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4263,10 +4142,10 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4300,7 +4179,7 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4334,10 +4213,10 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4371,7 +4250,7 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4384,33 +4263,33 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(18358), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18352), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18357), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18342), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4420,7 +4299,7 @@ static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4435,7 +4314,7 @@ static void GigaRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; GigaRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4449,7 +4328,7 @@ static void GigaRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; GigaRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4493,9 +4372,10 @@ static void GigaRCTrackLeftQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008AD9F4 */ @@ -4538,9 +4418,10 @@ static void GigaRCTrackRightQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008ADA04 */ @@ -4587,16 +4468,11 @@ static void GigaRCTrackBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008ADC84 */ @@ -4629,23 +4505,18 @@ static void GigaRCTrack25DegUpLeftBanked( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADC94 */ @@ -4678,23 +4549,18 @@ static void GigaRCTrack25DegUpRightBanked( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADA44 */ @@ -4702,7 +4568,7 @@ static void GigaRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -4728,9 +4594,9 @@ static void GigaRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ADCA4 */ @@ -4785,7 +4651,7 @@ static void GigaRCTrackFlatTo60DegUpLongBase( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else @@ -4816,19 +4682,16 @@ static void GigaRCTrackFlatTo60DegUpLongBase( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasCableLift()) @@ -4859,7 +4722,7 @@ static void GigaRCTrackFlatTo60DegUpLongBase( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); } } else @@ -4890,15 +4753,12 @@ static void GigaRCTrackFlatTo60DegUpLongBase( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); } } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasCableLift()) @@ -4929,7 +4789,7 @@ static void GigaRCTrackFlatTo60DegUpLongBase( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); } } else @@ -4960,15 +4820,12 @@ static void GigaRCTrackFlatTo60DegUpLongBase( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); } } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasCableLift()) @@ -4999,7 +4856,7 @@ static void GigaRCTrackFlatTo60DegUpLongBase( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } else @@ -5030,24 +4887,21 @@ static void GigaRCTrackFlatTo60DegUpLongBase( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; } } @@ -5085,19 +4939,15 @@ static void GigaRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: switch (direction) @@ -5125,15 +4975,11 @@ static void GigaRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 2: switch (direction) @@ -5161,15 +5007,11 @@ static void GigaRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5197,24 +5039,20 @@ static void GigaRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -5268,23 +5106,19 @@ static void GigaRCTrackCableLiftHill( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -5312,23 +5146,19 @@ static void GigaRCTrackCableLiftHill( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 2: switch (direction) @@ -5362,23 +5192,19 @@ static void GigaRCTrackCableLiftHill( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } else { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -5406,23 +5232,19 @@ static void GigaRCTrackCableLiftHill( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } else { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -5458,18 +5280,14 @@ static void GigaRCTrackLeftEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5503,7 +5321,7 @@ static void GigaRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5537,7 +5355,7 @@ static void GigaRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5548,7 +5366,7 @@ static void GigaRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5558,28 +5376,28 @@ static void GigaRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(18417), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18421), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18425), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18429), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5590,7 +5408,7 @@ static void GigaRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5626,18 +5444,14 @@ static void GigaRCTrackRightEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5671,7 +5485,7 @@ static void GigaRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5705,7 +5519,7 @@ static void GigaRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5716,7 +5530,7 @@ static void GigaRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5726,28 +5540,28 @@ static void GigaRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(18401), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18405), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18409), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18413), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5758,7 +5572,7 @@ static void GigaRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5812,18 +5626,14 @@ static void GigaRCTrackLeftEighthBankToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5857,7 +5667,7 @@ static void GigaRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5891,7 +5701,7 @@ static void GigaRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5902,7 +5712,7 @@ static void GigaRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5912,28 +5722,28 @@ static void GigaRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(18449), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18453), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18457), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18461), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5944,7 +5754,7 @@ static void GigaRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5980,18 +5790,14 @@ static void GigaRCTrackRightEighthBankToDiag( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6025,7 +5831,7 @@ static void GigaRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6059,7 +5865,7 @@ static void GigaRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6070,7 +5876,7 @@ static void GigaRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6080,28 +5886,28 @@ static void GigaRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(18433), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18437), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18441), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18445), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6112,7 +5918,7 @@ static void GigaRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6140,172 +5946,13 @@ static void GigaRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(18527), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(18465), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(18524), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(18462), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(18526), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(18464), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(18525), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(18463), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { 18462, 18463, 18464, 18465 }, + { 18524, 18525, 18526, 18527 }, + }; + + TrackPaintUtilDiagTilesPaintExtra( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], kSupportType); } /** rct2: 0x008ADB04 */ @@ -6346,7 +5993,7 @@ static void GigaRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -6378,7 +6025,7 @@ static void GigaRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -6411,7 +6058,7 @@ static void GigaRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -6420,24 +6067,22 @@ static void GigaRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18537), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -6447,24 +6092,22 @@ static void GigaRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18475), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -6476,7 +6119,7 @@ static void GigaRCTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6505,7 +6148,7 @@ static void GigaRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -6523,7 +6166,7 @@ static void GigaRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -6542,29 +6185,29 @@ static void GigaRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18487), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6575,7 +6218,7 @@ static void GigaRCTrackDiag60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -6618,7 +6261,7 @@ static void GigaRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -6650,7 +6293,7 @@ static void GigaRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -6683,7 +6326,7 @@ static void GigaRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -6692,24 +6335,22 @@ static void GigaRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18529), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -6719,24 +6360,22 @@ static void GigaRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18467), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -6748,7 +6387,7 @@ static void GigaRCTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6777,7 +6416,7 @@ static void GigaRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -6795,7 +6434,7 @@ static void GigaRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -6814,29 +6453,29 @@ static void GigaRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18479), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6847,7 +6486,7 @@ static void GigaRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6876,7 +6515,7 @@ static void GigaRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -6894,7 +6533,7 @@ static void GigaRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -6913,29 +6552,29 @@ static void GigaRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18483), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6946,7 +6585,7 @@ static void GigaRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6989,7 +6628,7 @@ static void GigaRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7021,7 +6660,7 @@ static void GigaRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7054,7 +6693,7 @@ static void GigaRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7063,24 +6702,22 @@ static void GigaRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18533), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7090,24 +6727,22 @@ static void GigaRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18471), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7119,7 +6754,7 @@ static void GigaRCTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7162,7 +6797,7 @@ static void GigaRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7194,7 +6829,7 @@ static void GigaRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7227,7 +6862,7 @@ static void GigaRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7236,24 +6871,22 @@ static void GigaRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18539), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7263,24 +6896,22 @@ static void GigaRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18477), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7292,7 +6923,7 @@ static void GigaRCTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7321,7 +6952,7 @@ static void GigaRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -7339,7 +6970,7 @@ static void GigaRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -7358,29 +6989,29 @@ static void GigaRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18489), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7391,7 +7022,7 @@ static void GigaRCTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -7505,24 +7136,22 @@ static void GigaRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18535), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7532,24 +7161,22 @@ static void GigaRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18473), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7564,7 +7191,7 @@ static void GigaRCTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADB74 */ @@ -7591,7 +7218,7 @@ static void GigaRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -7609,7 +7236,7 @@ static void GigaRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7628,29 +7255,29 @@ static void GigaRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18485), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7661,7 +7288,7 @@ static void GigaRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7690,7 +7317,7 @@ static void GigaRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -7708,7 +7335,7 @@ static void GigaRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7727,29 +7354,29 @@ static void GigaRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18481), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7760,7 +7387,7 @@ static void GigaRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7803,7 +7430,7 @@ static void GigaRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -7835,7 +7462,7 @@ static void GigaRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -7868,7 +7495,7 @@ static void GigaRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -7877,24 +7504,22 @@ static void GigaRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18531), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -7904,24 +7529,22 @@ static void GigaRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18469), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -7933,7 +7556,7 @@ static void GigaRCTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7962,7 +7585,7 @@ static void GigaRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7983,7 +7606,7 @@ static void GigaRCTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8002,29 +7625,29 @@ static void GigaRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18495), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8035,7 +7658,7 @@ static void GigaRCTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8064,7 +7687,7 @@ static void GigaRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8082,7 +7705,7 @@ static void GigaRCTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8104,29 +7727,29 @@ static void GigaRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18500), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8137,7 +7760,7 @@ static void GigaRCTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8166,7 +7789,7 @@ static void GigaRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8187,7 +7810,7 @@ static void GigaRCTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8206,29 +7829,29 @@ static void GigaRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18502), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8239,7 +7862,7 @@ static void GigaRCTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8268,7 +7891,7 @@ static void GigaRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8286,7 +7909,7 @@ static void GigaRCTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8308,29 +7931,29 @@ static void GigaRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18497), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8341,7 +7964,7 @@ static void GigaRCTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8370,7 +7993,7 @@ static void GigaRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8391,7 +8014,7 @@ static void GigaRCTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8410,29 +8033,29 @@ static void GigaRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18515), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8443,7 +8066,7 @@ static void GigaRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8472,7 +8095,7 @@ static void GigaRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8490,7 +8113,7 @@ static void GigaRCTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8512,29 +8135,29 @@ static void GigaRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18520), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8545,7 +8168,7 @@ static void GigaRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8574,7 +8197,7 @@ static void GigaRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -8595,7 +8218,7 @@ static void GigaRCTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -8614,29 +8237,29 @@ static void GigaRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18505), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8647,7 +8270,7 @@ static void GigaRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -8676,7 +8299,7 @@ static void GigaRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -8694,7 +8317,7 @@ static void GigaRCTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -8716,29 +8339,29 @@ static void GigaRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18510), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8749,7 +8372,7 @@ static void GigaRCTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -8822,22 +8445,22 @@ static void GigaRCTrackDiagLeftBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18512), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8851,7 +8474,7 @@ static void GigaRCTrackDiagLeftBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADC54 */ @@ -8922,22 +8545,22 @@ static void GigaRCTrackDiagRightBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18507), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8951,7 +8574,7 @@ static void GigaRCTrackDiagRightBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADC64 */ @@ -8978,7 +8601,7 @@ static void GigaRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8999,7 +8622,7 @@ static void GigaRCTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9018,29 +8641,29 @@ static void GigaRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18522), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9051,7 +8674,7 @@ static void GigaRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9080,7 +8703,7 @@ static void GigaRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9098,7 +8721,7 @@ static void GigaRCTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9120,29 +8743,29 @@ static void GigaRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18517), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9153,7 +8776,7 @@ static void GigaRCTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9182,7 +8805,7 @@ static void GigaRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9200,7 +8823,7 @@ static void GigaRCTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9219,29 +8842,29 @@ static void GigaRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18491), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9252,7 +8875,7 @@ static void GigaRCTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9281,7 +8904,7 @@ static void GigaRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9299,7 +8922,7 @@ static void GigaRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9318,29 +8941,29 @@ static void GigaRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18493), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9351,7 +8974,7 @@ static void GigaRCTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9371,16 +8994,11 @@ static void GigaRCTrackBlockBrakes( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008ADCC4 */ @@ -9411,11 +9029,10 @@ static void GigaRCTrackLeftBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18653), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9425,13 +9042,13 @@ static void GigaRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9455,15 +9072,14 @@ static void GigaRCTrackLeftBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18652), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9474,7 +9090,7 @@ static void GigaRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9507,11 +9123,10 @@ static void GigaRCTrackRightBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(18650), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9521,13 +9136,13 @@ static void GigaRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9536,36 +9151,36 @@ static void GigaRCTrackRightBankedQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18645), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18647), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18649), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18651), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9576,7 +9191,7 @@ static void GigaRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9586,7 +9201,7 @@ static void GigaRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; GigaRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -9595,7 +9210,7 @@ static void GigaRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; GigaRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -9630,11 +9245,10 @@ static void GigaRCTrackLeftBankedQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9644,10 +9258,10 @@ static void GigaRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9680,7 +9294,7 @@ static void GigaRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9713,10 +9327,10 @@ static void GigaRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -9750,7 +9364,7 @@ static void GigaRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -9776,15 +9390,14 @@ static void GigaRCTrackLeftBankedQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9795,7 +9408,7 @@ static void GigaRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9831,11 +9444,10 @@ static void GigaRCTrackRightBankedQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9845,10 +9457,10 @@ static void GigaRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9881,7 +9493,7 @@ static void GigaRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9913,10 +9525,10 @@ static void GigaRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -9950,7 +9562,7 @@ static void GigaRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -9976,15 +9588,14 @@ static void GigaRCTrackRightBankedQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9995,7 +9606,7 @@ static void GigaRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10005,7 +9616,7 @@ static void GigaRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; GigaRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -10014,7 +9625,7 @@ static void GigaRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; GigaRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -10051,23 +9662,18 @@ static void GigaRCTrack25DegUpToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADD54 */ @@ -10103,23 +9709,18 @@ static void GigaRCTrack25DegUpToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADD64 */ @@ -10155,23 +9756,18 @@ static void GigaRCTrackLeftBanked25DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADD74 */ @@ -10207,23 +9803,18 @@ static void GigaRCTrackRightBanked25DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ADD84 */ @@ -10288,23 +9879,18 @@ static void GigaRCTrackLeftBankedFlatToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ADDD4 */ @@ -10337,23 +9923,18 @@ static void GigaRCTrackRightBankedFlatToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ADE04 */ @@ -10386,23 +9967,18 @@ static void GigaRCTrackLeftBanked25DegUpToLeftBankedFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008ADE14 */ @@ -10435,23 +10011,18 @@ static void GigaRCTrackRightBanked25DegUpToRightBankedFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008ADE24 */ @@ -10519,23 +10090,18 @@ static void GigaRCTrackFlatToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ADE54 */ @@ -10571,23 +10137,18 @@ static void GigaRCTrackFlatToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ADE64 */ @@ -10623,23 +10184,18 @@ static void GigaRCTrackLeftBanked25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008ADE74 */ @@ -10675,23 +10231,18 @@ static void GigaRCTrackRightBanked25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008ADE84 */ @@ -10747,16 +10298,11 @@ static void GigaRCTrackBooster( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void GigaRCTrackPoweredLift( @@ -10769,23 +10315,18 @@ static void GigaRCTrackPoweredLift( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void GigaRCTrack90DegUp( @@ -10820,11 +10361,8 @@ static void GigaRCTrack90DegUp( } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -10870,20 +10408,16 @@ static void GigaRCTrack60DegUpTo90DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 36, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 36, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: break; @@ -10927,18 +10461,14 @@ static void GigaRCTrack90DegUpTo60DegUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::StandardSlopeEnd); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); } static void GigaRCTrack60DegDownTo90DegDown( @@ -10973,14 +10503,11 @@ static void GigaRCTrack60DegDownTo90DegDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: break; @@ -11025,11 +10552,8 @@ static void GigaRCTrackLeftQuarterTurn190DegUp( } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -11074,11 +10598,8 @@ static void GigaRCTrackRightQuarterTurn190DegUp( } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -11116,8 +10637,7 @@ static void GigaRCTrackLeftBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 1)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height - 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height - 2, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -11127,8 +10647,7 @@ static void GigaRCTrackLeftBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 7)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height - 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height - 2, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11138,7 +10657,7 @@ static void GigaRCTrackLeftBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 13)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 1, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 1, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -11148,12 +10667,12 @@ static void GigaRCTrackLeftBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 19)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 1, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 1, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -11163,7 +10682,7 @@ static void GigaRCTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11209,7 +10728,7 @@ static void GigaRCTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -11250,10 +10769,10 @@ static void GigaRCTrackLeftBarrelRollUpToDown( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -11264,7 +10783,7 @@ static void GigaRCTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11286,7 +10805,7 @@ static void GigaRCTrackRightBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 25)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 1, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 1, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -11296,8 +10815,7 @@ static void GigaRCTrackRightBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 31)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 1, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11307,8 +10825,7 @@ static void GigaRCTrackRightBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 37)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height - 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height - 2, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -11318,12 +10835,12 @@ static void GigaRCTrackRightBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 43)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height - 2, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height - 2, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -11333,7 +10850,7 @@ static void GigaRCTrackRightBarrelRollUpToDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11379,7 +10896,7 @@ static void GigaRCTrackRightBarrelRollUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -11420,10 +10937,10 @@ static void GigaRCTrackRightBarrelRollUpToDown( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -11434,7 +10951,7 @@ static void GigaRCTrackRightBarrelRollUpToDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11483,18 +11000,14 @@ static void GigaRCTrackHalfLoopUp( { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -11504,32 +11017,32 @@ static void GigaRCTrackHalfLoopUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 5)), { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 9)), { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 13)), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11563,7 +11076,7 @@ static void GigaRCTrackHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -11591,14 +11104,11 @@ static void GigaRCTrackHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11624,33 +11134,33 @@ static void GigaRCTrackLeftVerticalLoop( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 0), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 4), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 8), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 12), { 0, 6, height }, { 32, 20, 7 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -11660,7 +11170,7 @@ static void GigaRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -11670,28 +11180,28 @@ static void GigaRCTrackLeftVerticalLoop( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 1), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 26, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 26, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 5), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 10, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 10, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 9), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 13), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11702,7 +11212,7 @@ static void GigaRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11736,7 +11246,7 @@ static void GigaRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -11770,13 +11280,13 @@ static void GigaRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -11810,7 +11320,7 @@ static void GigaRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -11844,7 +11354,7 @@ static void GigaRCTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -11854,28 +11364,28 @@ static void GigaRCTrackLeftVerticalLoop( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 9), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 13), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 1), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 26, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 26, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 5), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 10, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 10, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11886,7 +11396,7 @@ static void GigaRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -11896,37 +11406,37 @@ static void GigaRCTrackLeftVerticalLoop( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 8), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 12), { 0, 6, height }, { 32, 20, 7 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 0), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 4), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } PaintUtilSetSegmentSupportHeight( @@ -11937,7 +11447,7 @@ static void GigaRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -11972,13 +11482,12 @@ static void GigaRCTrackRightVerticalLoop( { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -11988,31 +11497,31 @@ static void GigaRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 17), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 21), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 25), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 10, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 10, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 29), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 26, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 26, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12038,7 +11547,7 @@ static void GigaRCTrackRightVerticalLoop( { 16, 0, height }, { { 16, 0, height }, { 2, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -12064,13 +11573,13 @@ static void GigaRCTrackRightVerticalLoop( { 0, 0, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -12096,7 +11605,7 @@ static void GigaRCTrackRightVerticalLoop( { 0, 16, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -12122,7 +11631,7 @@ static void GigaRCTrackRightVerticalLoop( { 10, 16, height }, { { 10, 16, height }, { 4, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -12132,31 +11641,31 @@ static void GigaRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 25), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 10, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 10, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 29), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 26, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 26, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 17), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 21), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -12182,18 +11691,17 @@ static void GigaRCTrackRightVerticalLoop( { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } @@ -12214,33 +11722,33 @@ static void GigaRCTrackLeftCorkscrewUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 0)), { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height - 3, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height - 3, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 3)), { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 6)), { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 9)), { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 3, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 3, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12250,7 +11758,7 @@ static void GigaRCTrackLeftCorkscrewUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12277,7 +11785,7 @@ static void GigaRCTrackLeftCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12312,19 +11820,18 @@ static void GigaRCTrackLeftCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 40, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 40, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12343,33 +11850,33 @@ static void GigaRCTrackRightCorkscrewUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 12)), { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 3, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 3, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 15)), { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 18)), { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 21)), { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height - 3, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height - 3, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12379,7 +11886,7 @@ static void GigaRCTrackRightCorkscrewUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12406,7 +11913,7 @@ static void GigaRCTrackRightCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12441,19 +11948,18 @@ static void GigaRCTrackRightCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 40, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 40, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12502,12 +12008,11 @@ static void GigaRCTrackLeftLargeCorkscrewUp( break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12517,7 +12022,7 @@ static void GigaRCTrackLeftLargeCorkscrewUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -12527,30 +12032,28 @@ static void GigaRCTrackLeftLargeCorkscrewUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 6)), { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 19, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 19, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 11)), { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 19, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 19, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 16)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12561,7 +12064,7 @@ static void GigaRCTrackLeftLargeCorkscrewUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12595,10 +12098,10 @@ static void GigaRCTrackLeftLargeCorkscrewUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -12616,36 +12119,32 @@ static void GigaRCTrackLeftLargeCorkscrewUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 3)), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 65, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 8)), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 65, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 13)), { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 65, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 18)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 65, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: switch (direction) @@ -12683,13 +12182,13 @@ static void GigaRCTrackLeftLargeCorkscrewUp( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12725,12 +12224,11 @@ static void GigaRCTrackRightLargeCorkscrewUp( break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12740,7 +12238,7 @@ static void GigaRCTrackRightLargeCorkscrewUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -12750,30 +12248,28 @@ static void GigaRCTrackRightLargeCorkscrewUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 21)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 26)), { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 19, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 19, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 31)), { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 19, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 19, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 36)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 21, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12784,7 +12280,7 @@ static void GigaRCTrackRightLargeCorkscrewUp( PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12818,10 +12314,10 @@ static void GigaRCTrackRightLargeCorkscrewUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -12839,35 +12335,31 @@ static void GigaRCTrackRightLargeCorkscrewUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 23)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 65, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 28)), { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 65, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 33)), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 65, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 38)), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 65, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: switch (direction) @@ -12905,13 +12397,13 @@ static void GigaRCTrackRightLargeCorkscrewUp( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12961,19 +12453,15 @@ static void GigaRCTrackLeftMediumHalfLoopUp( break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13008,7 +12496,7 @@ static void GigaRCTrackLeftMediumHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::topCorner), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13018,30 +12506,28 @@ static void GigaRCTrackLeftMediumHalfLoopUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 2)), { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 7)), { 0, 0, height }, { { 29, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 12)), { 0, 0, height }, { { 31, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 18, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 18, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 17)), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 14, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13052,7 +12538,7 @@ static void GigaRCTrackLeftMediumHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 3: switch (direction) @@ -13086,7 +12572,7 @@ static void GigaRCTrackLeftMediumHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 4: switch (direction) @@ -13124,9 +12610,9 @@ static void GigaRCTrackLeftMediumHalfLoopUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13162,19 +12648,15 @@ static void GigaRCTrackRightMediumHalfLoopUp( break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13209,7 +12691,7 @@ static void GigaRCTrackRightMediumHalfLoopUp( PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13219,30 +12701,28 @@ static void GigaRCTrackRightMediumHalfLoopUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 22)), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 27)), { 0, 0, height }, { { 30, 16, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 18, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 18, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 32)), { 0, 0, height }, { { 29, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 37)), { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 14, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13253,7 +12733,7 @@ static void GigaRCTrackRightMediumHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 3: switch (direction) @@ -13288,7 +12768,7 @@ static void GigaRCTrackRightMediumHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 4: switch (direction) @@ -13325,9 +12805,9 @@ static void GigaRCTrackRightMediumHalfLoopUp( 0xFFFF, 0); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13363,7 +12843,7 @@ static void GigaRCTrackLeftZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 1)), { 0, 0, height }, { { 0, 6, height + 32 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13373,34 +12853,31 @@ static void GigaRCTrackLeftZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 5)), { 0, 0, height }, { { 0, 31, height }, { 40, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 8)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 12)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 11, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -13434,7 +12911,7 @@ static void GigaRCTrackLeftZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13469,10 +12946,10 @@ static void GigaRCTrackLeftZeroGRollUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -13483,9 +12960,8 @@ static void GigaRCTrackLeftZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13504,14 +12980,14 @@ static void GigaRCTrackRightZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 16)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 11, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 20)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13521,7 +12997,7 @@ static void GigaRCTrackRightZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 25)), { 0, 0, height }, { { 0, 31, height }, { 40, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13531,19 +13007,16 @@ static void GigaRCTrackRightZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 29)), { 0, 0, height }, { { 0, 6, height + 32 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -13577,7 +13050,7 @@ static void GigaRCTrackRightZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13612,10 +13085,10 @@ static void GigaRCTrackRightZeroGRollUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -13626,9 +13099,8 @@ static void GigaRCTrackRightZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13680,18 +13152,14 @@ static void GigaRCTrackLeftLargeZeroGRollUp( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 21, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 21, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -13721,11 +13189,8 @@ static void GigaRCTrackLeftLargeZeroGRollUp( break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13762,7 +13227,7 @@ static void GigaRCTrackLeftLargeZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -13780,16 +13245,14 @@ static void GigaRCTrackLeftLargeZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 4)), { 0, 0, height }, { { 0, 26, height }, { 32, 0, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 37, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 8)), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 37, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13799,28 +13262,26 @@ static void GigaRCTrackLeftLargeZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 14)), { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 37, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 19)), { 0, 0, height }, { { 0, 18, height }, { 32, 1, 30 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 37, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13858,18 +13319,14 @@ static void GigaRCTrackRightLargeZeroGRollUp( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 21, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 21, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -13899,11 +13356,8 @@ static void GigaRCTrackRightLargeZeroGRollUp( break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13941,7 +13395,7 @@ static void GigaRCTrackRightLargeZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -13959,8 +13413,7 @@ static void GigaRCTrackRightLargeZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 24)), { 0, 0, height }, { { 0, 18, height }, { 32, 1, 30 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 37, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13970,36 +13423,33 @@ static void GigaRCTrackRightLargeZeroGRollUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 30)), { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 37, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 34)), { 0, 0, height }, { { 0, 26, height }, { 32, 0, 30 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 37, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 39)), { 0, 0, height }, { { 0, 26, height }, { 40, 0, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 37, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -14053,7 +13503,7 @@ static void GigaRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -14084,7 +13534,7 @@ static void GigaRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -14112,14 +13562,14 @@ static void GigaRCTrack90DegToInvertedFlatQuarterLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -14164,11 +13614,10 @@ static void GigaRCTrackLeftBankToLeftQuarterTurn3Tile25DegUp( { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14178,13 +13627,13 @@ static void GigaRCTrackLeftBankToLeftQuarterTurn3Tile25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14210,15 +13659,14 @@ static void GigaRCTrackLeftBankToLeftQuarterTurn3Tile25DegUp( { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 4, height - 6, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 4, height - 6, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -14229,7 +13677,7 @@ static void GigaRCTrackLeftBankToLeftQuarterTurn3Tile25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14267,11 +13715,10 @@ static void GigaRCTrackRightBankToRightQuarterTurn3Tile25DegUp( { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14281,13 +13728,13 @@ static void GigaRCTrackRightBankToRightQuarterTurn3Tile25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14313,15 +13760,14 @@ static void GigaRCTrackRightBankToRightQuarterTurn3Tile25DegUp( { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 4, height - 6, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 4, height - 6, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -14332,7 +13778,7 @@ static void GigaRCTrackRightBankToRightQuarterTurn3Tile25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14367,11 +13813,10 @@ static void GigaRCTrackLeftQuarterTurn3Tile25DegDownToLeftBank( { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 4, height - 6, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 4, height - 6, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -14381,13 +13826,13 @@ static void GigaRCTrackLeftQuarterTurn3Tile25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14416,15 +13861,14 @@ static void GigaRCTrackLeftQuarterTurn3Tile25DegDownToLeftBank( { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -14435,7 +13879,7 @@ static void GigaRCTrackLeftQuarterTurn3Tile25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14470,11 +13914,10 @@ static void GigaRCTrackRightQuarterTurn3Tile25DegDownToRightBank( { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 4, height - 6, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 4, height - 6, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -14484,13 +13927,13 @@ static void GigaRCTrackRightQuarterTurn3Tile25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14519,15 +13962,14 @@ static void GigaRCTrackRightQuarterTurn3Tile25DegDownToRightBank( { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -14538,7 +13980,7 @@ static void GigaRCTrackRightQuarterTurn3Tile25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14573,18 +14015,14 @@ static void GigaRCTrackLeftLargeHalfLoopUp( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -14594,36 +14032,33 @@ static void GigaRCTrackLeftLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 8)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 15)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 22)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -14657,7 +14092,7 @@ static void GigaRCTrackLeftLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -14667,32 +14102,28 @@ static void GigaRCTrackLeftLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 3)), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 14, height + 8, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 14, height + 8, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 10)), { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 14, height + 8, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 14, height + 8, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 17)), { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 21, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 21, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 24)), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 22, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 22, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14703,7 +14134,7 @@ static void GigaRCTrackLeftLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -14737,7 +14168,7 @@ static void GigaRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -14771,7 +14202,7 @@ static void GigaRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -14799,7 +14230,7 @@ static void GigaRCTrackLeftLargeHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14809,7 +14240,7 @@ static void GigaRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -14844,18 +14275,14 @@ static void GigaRCTrackRightLargeHalfLoopUp( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -14865,36 +14292,33 @@ static void GigaRCTrackRightLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 29)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 36)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 43)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 50)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -14928,7 +14352,7 @@ static void GigaRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -14938,32 +14362,28 @@ static void GigaRCTrackRightLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 31)), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 22, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 22, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 38)), { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 21, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 21, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 45)), { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 14, height + 8, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 14, height + 8, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 52)), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 14, height + 8, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 14, height + 8, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14974,7 +14394,7 @@ static void GigaRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -15008,7 +14428,7 @@ static void GigaRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -15042,7 +14462,7 @@ static void GigaRCTrackRightLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -15070,7 +14490,7 @@ static void GigaRCTrackRightLargeHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -15080,7 +14500,7 @@ static void GigaRCTrackRightLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -15132,21 +14552,17 @@ static void GigaRCTrackFlatTo60DegUp( { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); } static void GigaRCTrack60DegUpToFlat( @@ -15182,21 +14598,17 @@ static void GigaRCTrack60DegUpToFlat( { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardFlat); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void GigaRCTrackFlatTo60DegDown( @@ -15236,7 +14648,7 @@ static void GigaRCTrackDiagFlatTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -15254,7 +14666,7 @@ static void GigaRCTrackDiagFlatTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -15273,29 +14685,29 @@ static void GigaRCTrackDiagFlatTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15306,7 +14718,7 @@ static void GigaRCTrackDiagFlatTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -15334,7 +14746,7 @@ static void GigaRCTrackDiag60DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -15352,7 +14764,7 @@ static void GigaRCTrackDiag60DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -15371,29 +14783,29 @@ static void GigaRCTrackDiag60DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 18, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 18, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 18, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 18, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 18, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 18, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 18, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 18, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15404,7 +14816,7 @@ static void GigaRCTrackDiag60DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -15432,7 +14844,7 @@ static void GigaRCTrackDiagFlatTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -15450,7 +14862,7 @@ static void GigaRCTrackDiagFlatTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -15469,29 +14881,29 @@ static void GigaRCTrackDiagFlatTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 14, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 14, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15502,7 +14914,7 @@ static void GigaRCTrackDiagFlatTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -15530,7 +14942,7 @@ static void GigaRCTrackDiag60DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -15548,7 +14960,7 @@ static void GigaRCTrackDiag60DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -15567,29 +14979,29 @@ static void GigaRCTrackDiag60DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 2, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 2, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 2, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 2, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 2, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 2, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15600,7 +15012,7 @@ static void GigaRCTrackDiag60DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -15635,18 +15047,14 @@ static void GigaRCTrackLeftEighthToDiagUp25( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -15680,7 +15088,7 @@ static void GigaRCTrackLeftEighthToDiagUp25( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -15714,7 +15122,7 @@ static void GigaRCTrackLeftEighthToDiagUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -15725,7 +15133,7 @@ static void GigaRCTrackLeftEighthToDiagUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -15735,28 +15143,28 @@ static void GigaRCTrackLeftEighthToDiagUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 3)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 2, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 7)), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 11)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 2, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 15)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15767,7 +15175,7 @@ static void GigaRCTrackLeftEighthToDiagUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -15802,18 +15210,14 @@ static void GigaRCTrackRightEighthToDiagUp25( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -15847,7 +15251,7 @@ static void GigaRCTrackRightEighthToDiagUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -15881,7 +15285,7 @@ static void GigaRCTrackRightEighthToDiagUp25( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -15892,7 +15296,7 @@ static void GigaRCTrackRightEighthToDiagUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -15902,28 +15306,28 @@ static void GigaRCTrackRightEighthToDiagUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 19)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 23)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 2, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 27)), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 31)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 2, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15934,7 +15338,7 @@ static void GigaRCTrackRightEighthToDiagUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -15953,28 +15357,28 @@ static void GigaRCTrackLeftEighthToOrthogonalUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 32)), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 36)), { 0, 0, height }, { { 16, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 5, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 40)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 44)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15985,7 +15389,7 @@ static void GigaRCTrackLeftEighthToOrthogonalUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16019,7 +15423,7 @@ static void GigaRCTrackLeftEighthToOrthogonalUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -16029,7 +15433,7 @@ static void GigaRCTrackLeftEighthToOrthogonalUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -16063,7 +15467,7 @@ static void GigaRCTrackLeftEighthToOrthogonalUp25( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -16089,20 +15493,16 @@ static void GigaRCTrackLeftEighthToOrthogonalUp25( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 4, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 4, height, session.SupportColours); if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16121,28 +15521,28 @@ static void GigaRCTrackRightEighthToOrthogonalUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 48)), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 52)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 5, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 56)), { 0, 0, height }, { { 16, 0, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 60)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16153,7 +15553,7 @@ static void GigaRCTrackRightEighthToOrthogonalUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16187,7 +15587,7 @@ static void GigaRCTrackRightEighthToOrthogonalUp25( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -16198,7 +15598,7 @@ static void GigaRCTrackRightEighthToOrthogonalUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -16232,7 +15632,7 @@ static void GigaRCTrackRightEighthToOrthogonalUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -16258,18 +15658,17 @@ static void GigaRCTrackRightEighthToOrthogonalUp25( { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 4, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 4, height, session.SupportColours); if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16331,7 +15730,7 @@ static void GigaRCTrackDiagUp25ToLeftBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16352,7 +15751,7 @@ static void GigaRCTrackDiagUp25ToLeftBankedUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -16371,29 +15770,29 @@ static void GigaRCTrackDiagUp25ToLeftBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 2)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 10, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 10, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16404,7 +15803,7 @@ static void GigaRCTrackDiagUp25ToLeftBankedUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16432,7 +15831,7 @@ static void GigaRCTrackDiagUp25ToRightBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16450,7 +15849,7 @@ static void GigaRCTrackDiagUp25ToRightBankedUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -16472,29 +15871,29 @@ static void GigaRCTrackDiagUp25ToRightBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 6)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 10, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 10, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16505,7 +15904,7 @@ static void GigaRCTrackDiagUp25ToRightBankedUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16533,7 +15932,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -16554,7 +15953,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -16573,29 +15972,29 @@ static void GigaRCTrackDiagLeftBankedUp25ToUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 12)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16606,7 +16005,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -16634,7 +16033,7 @@ static void GigaRCTrackDiagRightBankedUp25ToUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -16652,7 +16051,7 @@ static void GigaRCTrackDiagRightBankedUp25ToUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -16674,29 +16073,29 @@ static void GigaRCTrackDiagRightBankedUp25ToUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 16)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16707,7 +16106,7 @@ static void GigaRCTrackDiagRightBankedUp25ToUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -16763,7 +16162,7 @@ static void GigaRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -16781,7 +16180,7 @@ static void GigaRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -16800,29 +16199,29 @@ static void GigaRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 21)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16833,7 +16232,7 @@ static void GigaRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -16861,7 +16260,7 @@ static void GigaRCTrackDiagRightBankedFlatToRightBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -16879,7 +16278,7 @@ static void GigaRCTrackDiagRightBankedFlatToRightBankedUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -16898,29 +16297,29 @@ static void GigaRCTrackDiagRightBankedFlatToRightBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 25)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16931,7 +16330,7 @@ static void GigaRCTrackDiagRightBankedFlatToRightBankedUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -16959,7 +16358,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -16977,7 +16376,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -16996,29 +16395,29 @@ static void GigaRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 29)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17029,7 +16428,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17057,7 +16456,7 @@ static void GigaRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17075,7 +16474,7 @@ static void GigaRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17094,29 +16493,29 @@ static void GigaRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 33)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17127,7 +16526,7 @@ static void GigaRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17185,7 +16584,7 @@ static void GigaRCTrackDiagUp25LeftBanked( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17203,7 +16602,7 @@ static void GigaRCTrackDiagUp25LeftBanked( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17222,29 +16621,29 @@ static void GigaRCTrackDiagUp25LeftBanked( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 37)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 11, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 11, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 11, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17255,7 +16654,7 @@ static void GigaRCTrackDiagUp25LeftBanked( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17283,7 +16682,7 @@ static void GigaRCTrackDiagUp25RightBanked( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17301,7 +16700,7 @@ static void GigaRCTrackDiagUp25RightBanked( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17320,29 +16719,29 @@ static void GigaRCTrackDiagUp25RightBanked( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 11, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 41)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 11, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 11, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17353,7 +16752,7 @@ static void GigaRCTrackDiagUp25RightBanked( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17395,7 +16794,7 @@ static void GigaRCTrackDiagFlatToLeftBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -17416,7 +16815,7 @@ static void GigaRCTrackDiagFlatToLeftBankedUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -17435,29 +16834,29 @@ static void GigaRCTrackDiagFlatToLeftBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 46)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17468,7 +16867,7 @@ static void GigaRCTrackDiagFlatToLeftBankedUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -17496,7 +16895,7 @@ static void GigaRCTrackDiagFlatToRightBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -17514,7 +16913,7 @@ static void GigaRCTrackDiagFlatToRightBankedUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -17536,29 +16935,29 @@ static void GigaRCTrackDiagFlatToRightBankedUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 50)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17569,7 +16968,7 @@ static void GigaRCTrackDiagFlatToRightBankedUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -17597,7 +16996,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17618,7 +17017,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17637,29 +17036,29 @@ static void GigaRCTrackDiagLeftBankedUp25ToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 56)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17670,7 +17069,7 @@ static void GigaRCTrackDiagLeftBankedUp25ToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17698,7 +17097,7 @@ static void GigaRCTrackDiagRightBankedUp25ToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17716,7 +17115,7 @@ static void GigaRCTrackDiagRightBankedUp25ToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17738,29 +17137,29 @@ static void GigaRCTrackDiagRightBankedUp25ToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 60)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17771,7 +17170,7 @@ static void GigaRCTrackDiagRightBankedUp25ToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17818,40 +17217,37 @@ static void GigaRCTrackLeftEighthBankToDiagUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 64)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height - 4, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 1, height - 4, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 68)), { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 72)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 76)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -17885,7 +17281,7 @@ static void GigaRCTrackLeftEighthBankToDiagUp25( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -17919,7 +17315,7 @@ static void GigaRCTrackLeftEighthBankToDiagUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -17930,7 +17326,7 @@ static void GigaRCTrackLeftEighthBankToDiagUp25( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -17940,28 +17336,28 @@ static void GigaRCTrackLeftEighthBankToDiagUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 67)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 71)), { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 75)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 79)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 7, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17972,7 +17368,7 @@ static void GigaRCTrackLeftEighthBankToDiagUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -17991,40 +17387,37 @@ static void GigaRCTrackRightEighthBankToDiagUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 80)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 84)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 88)), { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 92)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height - 4, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 1, height - 4, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -18058,7 +17451,7 @@ static void GigaRCTrackRightEighthBankToDiagUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -18092,7 +17485,7 @@ static void GigaRCTrackRightEighthBankToDiagUp25( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -18103,7 +17496,7 @@ static void GigaRCTrackRightEighthBankToDiagUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -18113,28 +17506,28 @@ static void GigaRCTrackRightEighthBankToDiagUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 83)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 87)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 91)), { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 95)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18145,7 +17538,7 @@ static void GigaRCTrackRightEighthBankToDiagUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18164,28 +17557,28 @@ static void GigaRCTrackLeftEighthBankToOrthogonalUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 96)), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 100)), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 104)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 108)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18196,7 +17589,7 @@ static void GigaRCTrackLeftEighthBankToOrthogonalUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -18230,7 +17623,7 @@ static void GigaRCTrackLeftEighthBankToOrthogonalUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -18240,7 +17633,7 @@ static void GigaRCTrackLeftEighthBankToOrthogonalUp25( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -18274,7 +17667,7 @@ static void GigaRCTrackLeftEighthBankToOrthogonalUp25( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -18284,40 +17677,37 @@ static void GigaRCTrackLeftEighthBankToOrthogonalUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 99)), { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 103)), { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 107)), { 0, 0, height }, { { 0, 0, height }, { 32, 20, 10 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 111)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; } if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18336,28 +17726,28 @@ static void GigaRCTrackRightEighthBankToOrthogonalUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 112)), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 116)), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 120)), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 124)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18368,7 +17758,7 @@ static void GigaRCTrackRightEighthBankToOrthogonalUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -18402,7 +17792,7 @@ static void GigaRCTrackRightEighthBankToOrthogonalUp25( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -18413,7 +17803,7 @@ static void GigaRCTrackRightEighthBankToOrthogonalUp25( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -18447,7 +17837,7 @@ static void GigaRCTrackRightEighthBankToOrthogonalUp25( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -18457,40 +17847,40 @@ static void GigaRCTrackRightEighthBankToOrthogonalUp25( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 115)), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 10 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 119)), { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 123)), { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 127)), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; } if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18541,22 +17931,20 @@ static void GigaRCTrackDiagBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, - GigaDiagBrakeImages[trackElement.IsBrakeClosed()][0], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 3, height, direction, trackSequence, GigaDiagBrakeImages[trackElement.IsBrakeClosed()][0], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, - GigaDiagBrakeImages[trackElement.IsBrakeClosed()][1], defaultDiagTileOffsets, defaultDiagBoundLengths, - diagBrakeBoundsOffsets); + session, 3, height, direction, trackSequence, GigaDiagBrakeImages[trackElement.IsBrakeClosed()][1], + defaultDiagTileOffsets, defaultDiagBoundLengths, diagBrakeBoundsOffsets); if (trackSequence == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionGigaRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp index 1bbb7d7196..dd581ac7f4 100644 --- a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp +++ b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Mine; + /** rct2: 0x0087694C */ static void HeartlineTwisterRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -87,11 +92,11 @@ static void HeartlineTwisterRCTrackFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void HeartlineTwisterRCTrackStation( @@ -113,9 +118,9 @@ static void HeartlineTwisterRCTrackStation( { 32, 32, 1 }); DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0087695C */ @@ -201,19 +206,19 @@ static void HeartlineTwisterRCTrack25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008769FC */ @@ -299,19 +304,19 @@ static void HeartlineTwisterRCTrack60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x0087696C */ @@ -397,19 +402,19 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008769BC */ @@ -495,19 +500,19 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008769CC */ @@ -593,19 +598,19 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x0087697C */ @@ -691,19 +696,19 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0087698C */ @@ -799,19 +804,19 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -875,11 +880,11 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -919,10 +924,10 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -962,14 +967,14 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height - 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 16, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1019,14 +1024,14 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height - 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 16, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1090,11 +1095,11 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1134,10 +1139,10 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1177,19 +1182,19 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1426,11 +1431,11 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00876A5C */ @@ -1665,11 +1670,11 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionHeartlineTwisterRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/HybridCoaster.cpp b/src/openrct2/ride/coaster/HybridCoaster.cpp index a8aa4fb49c..052f73a1fa 100644 --- a/src/openrct2/ride/coaster/HybridCoaster.cpp +++ b/src/openrct2/ride/coaster/HybridCoaster.cpp @@ -18,12 +18,17 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + namespace HybridRC { static ImageId GetTrackColour(PaintSession& session) @@ -51,10 +56,10 @@ namespace HybridRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackStation( @@ -82,13 +87,13 @@ namespace HybridRC } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 10, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void Track25DegUp( @@ -108,18 +113,18 @@ namespace HybridRC { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void Track60DegUp( @@ -165,18 +170,18 @@ namespace HybridRC } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void TrackFlatTo25DegUp( @@ -196,18 +201,18 @@ namespace HybridRC { { 0, 6, height }, { 32, 20, 3 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void Track25DegUpTo60DegUp( @@ -279,18 +284,18 @@ namespace HybridRC } } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void Track60DegUpTo25DegUp( @@ -363,18 +368,18 @@ namespace HybridRC } } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void Track25DegUpToFlat( @@ -394,18 +399,18 @@ namespace HybridRC { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void Track25DegDown( @@ -481,7 +486,7 @@ namespace HybridRC { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z } }); PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -526,14 +531,14 @@ namespace HybridRC { { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }, { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: break; @@ -577,14 +582,14 @@ namespace HybridRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); } static void Track60DegDownTo90DegDown( @@ -619,10 +624,10 @@ namespace HybridRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: break; @@ -643,39 +648,39 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 0), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 3), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 6), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 9), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -685,28 +690,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 1), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 4), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 7), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 10), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -717,7 +722,7 @@ namespace HybridRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -727,41 +732,41 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 2), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 5), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 8), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 11), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -770,7 +775,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -788,36 +793,36 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 0), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 5), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 10), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 15), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -826,7 +831,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -836,28 +841,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 1), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 6), { 0, 0, height }, { { 0, 4, height }, { 36, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 11), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 16), { 0, 0, height }, { { 0, 18, height }, { 32, 14, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -868,7 +873,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -878,28 +883,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 2), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 7), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 12), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 17), { 0, 0, height }, { { 0, 0, height }, { 33, 33, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -911,7 +916,7 @@ namespace HybridRC PaintSegment::bottomRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -920,7 +925,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -930,28 +935,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 3), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 8), { 0, 0, height }, { { 4, 0, height }, { 16, 36, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 13), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 18), { 0, 0, height }, { { 18, 0, height }, { 14, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -962,7 +967,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -972,41 +977,41 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 4), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 9), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 14), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 19), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1015,7 +1020,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1033,36 +1038,36 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 0), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 4), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 8), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 12), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1072,32 +1077,32 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 1), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 5), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 9), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 13), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1107,55 +1112,55 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 2), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 6), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 10), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 14), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1182,7 +1187,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1201,36 +1206,36 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 16), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 20), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 24), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 28), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1240,32 +1245,32 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 17), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 21), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 25), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 29), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1275,55 +1280,55 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 18), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 22), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 26), { 0, 0, height }, { { 4, 4, height }, { 28, 28, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 30), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1350,7 +1355,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1375,32 +1380,20 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 0, SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 1, + SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 0, SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 1 }, + { SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 0, SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 1, + SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 2, SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 3 }, + }; + + TrackPaintUtilDiagTilesPaint( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr, 0, GetTrackColour(session)); + switch (trackSequence) { case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, - GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 3), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 1), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -1409,129 +1402,27 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); break; case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 0), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 0), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - switch (direction) - { - case 0: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - break; - case 2: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - break; - } + WoodenASupportsPaintSetupRotated( + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); + break; case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 2), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 0), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - switch (direction) - { - case 0: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - break; - case 2: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - break; - } + WoodenASupportsPaintSetupRotated( + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); + break; case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, - GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 1), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 1), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); + break; } } @@ -1559,7 +1450,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1574,23 +1465,23 @@ namespace HybridRC { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1605,23 +1496,23 @@ namespace HybridRC { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1633,7 +1524,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1661,7 +1552,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1676,23 +1567,23 @@ namespace HybridRC { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1707,23 +1598,23 @@ namespace HybridRC { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1735,7 +1626,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1771,7 +1662,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -1798,10 +1689,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -1828,10 +1718,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -1858,7 +1747,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -1894,7 +1783,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -1921,10 +1810,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -1951,10 +1839,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -1981,7 +1868,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2017,7 +1904,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -2044,10 +1931,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -2074,10 +1960,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -2104,7 +1989,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2140,7 +2025,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2167,10 +2052,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2197,10 +2081,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2227,7 +2110,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2289,8 +2172,7 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); break; case 2: @@ -2318,8 +2200,7 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); break; case 3: @@ -2350,7 +2231,7 @@ namespace HybridRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiag25DegDownToFlat( @@ -2384,7 +2265,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -2411,10 +2292,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -2441,10 +2321,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -2471,7 +2350,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2507,7 +2386,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -2534,10 +2413,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -2564,10 +2442,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -2594,7 +2471,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -2630,7 +2507,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -2657,10 +2534,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -2687,10 +2563,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -2717,7 +2592,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2753,7 +2628,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -2780,10 +2655,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -2810,10 +2684,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -2840,7 +2713,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2876,7 +2749,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -2903,10 +2776,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -2933,10 +2805,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -2963,7 +2834,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -2999,7 +2870,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -3026,10 +2897,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -3056,10 +2926,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -3086,7 +2955,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3122,7 +2991,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -3149,10 +3018,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -3179,10 +3047,9 @@ namespace HybridRC } } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -3209,7 +3076,7 @@ namespace HybridRC } } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3248,10 +3115,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackFlatToRightBank( @@ -3288,10 +3155,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackLeftBankToflat( @@ -3342,18 +3209,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackRightBankTo25DegUp( @@ -3390,18 +3257,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void Track25DegUpToLeftBank( @@ -3438,18 +3305,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void Track25DegUpToRightBank( @@ -3486,18 +3353,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackLeftBankTo25DegDown( @@ -3562,10 +3429,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackRightbank( @@ -3592,7 +3459,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3609,10 +3476,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3625,10 +3491,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3641,7 +3506,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3663,7 +3528,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3676,10 +3541,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3696,10 +3560,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3712,7 +3575,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3734,7 +3597,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3751,10 +3614,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3767,10 +3629,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3783,7 +3644,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3805,7 +3666,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3818,10 +3679,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3838,10 +3698,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3854,7 +3713,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3876,7 +3735,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3893,10 +3752,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3909,10 +3767,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -3925,7 +3782,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3947,7 +3804,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3960,10 +3817,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3980,10 +3836,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -3996,7 +3851,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4018,7 +3873,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -4035,10 +3890,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -4051,10 +3905,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -4067,7 +3920,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -4089,7 +3942,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -4102,10 +3955,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -4122,10 +3974,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -4138,7 +3989,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -4176,8 +4027,7 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); break; case 2: @@ -4191,8 +4041,7 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); break; case 3: @@ -4209,7 +4058,7 @@ namespace HybridRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiagRightBankTo25DegDown( @@ -4241,8 +4090,7 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); break; case 2: @@ -4260,8 +4108,7 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); break; case 3: @@ -4278,7 +4125,7 @@ namespace HybridRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiag25DegDownToLeftBank( @@ -4298,7 +4145,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -4315,10 +4162,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4331,10 +4177,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4347,7 +4192,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4369,7 +4214,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -4382,10 +4227,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4402,10 +4246,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4418,7 +4261,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4440,7 +4283,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4457,10 +4300,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4473,10 +4315,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4489,7 +4330,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4511,7 +4352,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4524,10 +4365,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4544,10 +4384,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4560,7 +4399,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4582,7 +4421,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 1), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4592,32 +4431,32 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 5), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 9), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 13), { 0, 0, height }, { { 6, 6, height }, { 26, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4627,28 +4466,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 2), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 6), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 10), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 14), { 0, 0, height }, { { 16, 16, height }, { 22, 22, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4659,7 +4498,7 @@ namespace HybridRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4669,7 +4508,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 3), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4679,7 +4518,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 8), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4689,27 +4528,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 12), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 15), { 0, 0, height }, { { 6, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4718,7 +4557,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4739,7 +4578,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 1), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4749,29 +4588,29 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 7), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 14), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 20), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -4780,7 +4619,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4790,28 +4629,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 2), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 8), { 0, 0, height }, { { 0, 0, height + 28 }, { 48, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 15), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 21), { 0, 0, height }, { { 0, 18, height }, { 32, 14, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4822,7 +4661,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4832,7 +4671,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 3), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4842,21 +4681,21 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 10), { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 16), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 22), { 0, 0, height }, { { 0, 0, height }, { 38, 38, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4868,7 +4707,7 @@ namespace HybridRC PaintSegment::bottomRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -4877,7 +4716,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4887,28 +4726,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 4), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 11), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 48, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 17), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 23), { 0, 0, height }, { { 18, 0, height }, { 14, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4919,7 +4758,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), (direction + 1) & 3), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4929,7 +4768,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 5), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4939,7 +4778,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 13), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4949,27 +4788,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 19), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 24), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4978,7 +4817,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4999,7 +4838,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 1), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5009,29 +4848,29 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 6), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 12), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 16), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5041,7 +4880,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 2), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5051,25 +4890,25 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 8), { 0, 0, height }, { { 0, 0, height + 28 }, { 34, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 13), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 17), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5079,55 +4918,55 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 3), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 9), { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 14), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 18), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5157,7 +4996,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5176,14 +5015,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 20), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 24), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5193,7 +5032,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 29), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5203,15 +5042,15 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 36), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5221,14 +5060,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 21), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 25), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5238,18 +5077,18 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 31), { 0, 0, height }, { { 0, 0, height + 28 }, { 34, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 37), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5259,55 +5098,55 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 22), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 26), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 32), { 0, 0, height }, { { 4, 4, height + 28 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 38), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5340,7 +5179,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5375,62 +5214,62 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE + 0), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE + 2), { 0, 6, height }, { 34, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE + 4), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE + 6), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5441,7 +5280,7 @@ namespace HybridRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5469,19 +5308,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5500,62 +5339,62 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE + 8), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE + 10), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE + 12), { 0, 6, height }, { 34, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE + 14), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5566,7 +5405,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5593,19 +5432,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionNext(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5614,7 +5453,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackRightQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -5622,7 +5461,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -5640,40 +5479,40 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 0), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 5), { 0, 0, height }, { { 0, 6, height }, { 34, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 10), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 15), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -5682,7 +5521,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5692,28 +5531,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 1), { 0, 0, height }, { 32, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 6), { 0, 0, height }, { 32, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 11), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 16), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5724,7 +5563,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -5734,28 +5573,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 2), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 7), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 12), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 17), { 0, 0, height }, { 16, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5767,7 +5606,7 @@ namespace HybridRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -5776,7 +5615,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -5786,28 +5625,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 3), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 8), { 0, 0, height }, { 16, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 13), { 0, 0, height }, { 16, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 18), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5818,7 +5657,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -5845,19 +5684,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5876,40 +5715,40 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 20), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 25), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 30), { 0, 0, height }, { { 0, 6, height }, { 34, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 35), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -5918,7 +5757,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5928,28 +5767,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 21), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 26), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 31), { 0, 0, height }, { 32, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 36), { 0, 0, height }, { 32, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5960,7 +5799,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -5970,28 +5809,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 22), { 0, 0, height }, { 16, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 27), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 32), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 37), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6003,7 +5842,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -6012,7 +5851,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -6022,28 +5861,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 23), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 28), { 0, 0, height }, { 16, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 33), { 0, 0, height }, { 16, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 38), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6054,7 +5893,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -6081,19 +5920,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionNext(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6102,7 +5941,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackRightQuarterTurn5Tile25DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -6110,7 +5949,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftQuarterTurn5Tile25DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -6127,8 +5966,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 1), { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6137,8 +5975,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 3), { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6147,8 +5984,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 5), { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6157,13 +5993,13 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 7), { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void TrackRightQuarterTurn1Tile60DegUp( @@ -6179,8 +6015,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 9), { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6189,8 +6024,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 11), { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6199,8 +6033,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 13), { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6209,13 +6042,13 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 15), { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void TrackLeftQuarterTurn1Tile60DegDown( @@ -6270,7 +6103,7 @@ namespace HybridRC } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -6315,7 +6148,7 @@ namespace HybridRC } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -6367,18 +6200,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void Track25DegUpToRightBanked25DegUp( @@ -6412,18 +6245,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackLeftBanked25DegUpTo25DegUp( @@ -6457,18 +6290,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackRightBanked25DegUpTo25DegUp( @@ -6502,18 +6335,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackLeftBanked25DegDownTo25DegDown( @@ -6578,18 +6411,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackRightBankedFlatToRightBanked25DegUp( @@ -6626,18 +6459,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackLeftBanked25DegUpToLeftBankedFlat( @@ -6674,18 +6507,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackRightBanked25DegUpToRightBankedFlat( @@ -6722,18 +6555,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackLeftBankedFlatToLeftBanked25DegDown( @@ -6792,18 +6625,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void Track25DegUpRightBanked( @@ -6834,18 +6667,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void Track25DegDownLeftBanked( @@ -6893,18 +6726,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackFlatToRightBanked25DegUp( @@ -6938,18 +6771,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackLeftBanked25DegUpToFlat( @@ -6983,18 +6816,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackRightBanked25DegUpToFlat( @@ -7028,18 +6861,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackFlatToLeftBanked25DegDown( @@ -7085,8 +6918,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 0), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( @@ -7098,8 +6931,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 3), { 0, 6, height }, { { 0, 27, height }, { 34, 1, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( @@ -7107,8 +6940,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 6), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( @@ -7116,38 +6949,38 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 9), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7158,7 +6991,7 @@ namespace HybridRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -7197,19 +7030,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7253,36 +7086,36 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionNext(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7293,7 +7126,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -7332,19 +7165,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionNext(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7353,7 +7186,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackRightBankedQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -7361,7 +7194,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftBankedQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -7380,8 +7213,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 0), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( @@ -7393,8 +7226,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 6), { 0, 0, height }, { { 0, 27, height }, { 34, 1, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( @@ -7402,8 +7235,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 15), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( @@ -7411,16 +7244,16 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 21), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -7429,7 +7262,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7440,7 +7273,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 1), { 0, 0, height }, { 32, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7452,7 +7285,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 8), { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7460,7 +7293,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 16), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7468,7 +7301,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 22), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7479,7 +7312,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -7490,7 +7323,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 2), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7502,7 +7335,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 10), { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7510,7 +7343,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 17), { 0, 0, height }, { { 64, 0, height }, { 1, 1, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7518,7 +7351,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 23), { 0, 0, height }, { 16, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7530,7 +7363,7 @@ namespace HybridRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -7539,7 +7372,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -7550,7 +7383,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 3), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7562,7 +7395,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 12), { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7570,7 +7403,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 18), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7578,7 +7411,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 24), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7589,7 +7422,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -7628,19 +7461,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7660,8 +7493,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 26), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( @@ -7669,8 +7502,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 31), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( @@ -7682,8 +7515,8 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 38), { 0, 0, height }, { { 0, 27, height }, { 34, 1, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( @@ -7691,16 +7524,16 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 47), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -7709,7 +7542,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7720,7 +7553,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 27), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7728,7 +7561,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 32), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7740,7 +7573,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 40), { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7748,7 +7581,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 48), { 0, 0, height }, { 32, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7759,7 +7592,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -7770,7 +7603,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 28), { 0, 0, height }, { 16, 16, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7778,7 +7611,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 33), { 0, 0, height }, { { 64, 0, height }, { 1, 1, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7790,7 +7623,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 42), { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7798,7 +7631,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 49), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7810,7 +7643,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -7819,7 +7652,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -7830,7 +7663,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 29), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7838,7 +7671,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 34), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7850,7 +7683,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 44), { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7858,7 +7691,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 50), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7869,7 +7702,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -7908,19 +7741,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionNext(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7929,7 +7762,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackRightBankedQuarterTurn5Tile25DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -7937,7 +7770,7 @@ namespace HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftBankedQuarterTurn5Tile25DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -7955,36 +7788,36 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 0), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 4), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 3), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 7), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7994,28 +7827,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 1), { 0, 0, height }, { 32, 26, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 5), { 0, 0, height }, { 34, 26, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 2), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 6), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8026,7 +7859,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8036,28 +7869,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 2), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 6), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 1), { 0, 0, height }, { 32, 26, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 5), { 0, 0, height }, { 34, 26, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8068,7 +7901,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -8078,41 +7911,41 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 3), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 7), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 0), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 4), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8131,36 +7964,36 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 8), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 12), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 11), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 15), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8170,28 +8003,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 9), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 13), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 10), { 0, 0, height }, { 34, 26, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 14), { 0, 0, height }, { 32, 26, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8202,7 +8035,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8212,28 +8045,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 10), { 0, 0, height }, { 34, 26, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 14), { 0, 0, height }, { 32, 26, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 9), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 13), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8244,7 +8077,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -8254,41 +8087,41 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 11), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 15), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 8), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 12), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8310,7 +8143,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 1), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8320,51 +8153,51 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 5), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 9), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 13), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8374,28 +8207,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 2), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 6), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 10), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 14), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8406,7 +8239,7 @@ namespace HybridRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -8416,7 +8249,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 3), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8426,7 +8259,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 8), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8436,27 +8269,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 12), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 15), { 0, 0, height }, { { 6, 0, height + 8 }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -8466,7 +8299,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 13), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8476,7 +8309,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 1), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8486,49 +8319,49 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 5), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 9), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -8538,28 +8371,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 14), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 2), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 6), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 10), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8570,7 +8403,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -8580,14 +8413,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 15), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 3), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8597,7 +8430,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 8), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8607,15 +8440,15 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 12), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8634,14 +8467,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 16), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 19), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8651,7 +8484,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 24), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8661,37 +8494,37 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 29), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8701,28 +8534,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 17), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 20), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 25), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 30), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8733,7 +8566,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -8743,7 +8576,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 18), { 0, 0, height }, { { 6, 0, height + 8 }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8753,7 +8586,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 22), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8763,27 +8596,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 27), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 31), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -8793,7 +8626,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 19), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8803,7 +8636,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 24), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8813,49 +8646,49 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 29), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 16), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -8865,28 +8698,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 20), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 25), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 30), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 17), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8897,7 +8730,7 @@ namespace HybridRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -8910,7 +8743,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 22), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8920,29 +8753,29 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 27), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 31), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 18), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8956,7 +8789,7 @@ namespace HybridRC trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -8969,7 +8802,7 @@ namespace HybridRC trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -8990,7 +8823,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 1), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9000,29 +8833,29 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 7), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 14), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 20), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -9031,7 +8864,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9041,28 +8874,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 2), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 8), { 0, 0, height }, { { 0, 0, height + 28 }, { 33, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 15), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 21), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9073,7 +8906,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -9083,7 +8916,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 3), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9093,21 +8926,21 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 10), { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 16), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 22), { 0, 0, height }, { { 0, 0, height }, { 34, 34, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9119,7 +8952,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -9128,7 +8961,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -9138,28 +8971,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 4), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 11), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 33, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 17), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 23), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9170,7 +9003,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -9180,7 +9013,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 5), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9190,7 +9023,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 13), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9200,27 +9033,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 19), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 24), { 0, 0, height }, { { 6, 0, height + 8 }, { 28, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -9230,7 +9063,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 20), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9240,7 +9073,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 1), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9250,27 +9083,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 7), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 14), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: PaintUtilSetSegmentSupportHeight( @@ -9279,7 +9112,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -9289,28 +9122,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 21), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 2), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 8), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 15), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9321,7 +9154,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -9331,14 +9164,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 22), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 3), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9348,14 +9181,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 10), { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 16), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9367,7 +9200,7 @@ namespace HybridRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: PaintUtilSetSegmentSupportHeight( @@ -9376,7 +9209,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -9386,28 +9219,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 23), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 4), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 11), { 0, 0, height }, { { 0, 0, height + 28 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 17), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9418,7 +9251,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -9428,14 +9261,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 24), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 5), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9445,7 +9278,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 13), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9455,15 +9288,15 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 19), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9482,14 +9315,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 25), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 30), { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9499,7 +9332,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 37), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9509,15 +9342,15 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 45), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -9526,7 +9359,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9536,28 +9369,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 26), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 31), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 38), { 0, 0, height }, { { 0, 0, height + 28 }, { 33, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 46), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9568,7 +9401,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -9578,14 +9411,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 27), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 32), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9595,14 +9428,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 40), { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 47), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9614,7 +9447,7 @@ namespace HybridRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -9623,7 +9456,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -9633,28 +9466,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 28), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 33), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 41), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 33, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 48), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9665,7 +9498,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -9675,7 +9508,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 29), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9685,7 +9518,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 35), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9695,27 +9528,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 43), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 49), { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -9725,7 +9558,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 30), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9735,7 +9568,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 37), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9745,27 +9578,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 45), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 25), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: PaintUtilSetSegmentSupportHeight( @@ -9774,7 +9607,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -9784,28 +9617,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 31), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 38), { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 46), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 26), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9816,7 +9649,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -9826,7 +9659,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 32), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9836,21 +9669,21 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 40), { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 47), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 27), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9862,7 +9695,7 @@ namespace HybridRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: PaintUtilSetSegmentSupportHeight( @@ -9871,7 +9704,7 @@ namespace HybridRC EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -9881,28 +9714,28 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 33), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 41), { 0, 0, height }, { { 0, 0, height + 28 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 48), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 28), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9913,7 +9746,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -9926,7 +9759,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 35), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9936,29 +9769,29 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 43), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 49), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 29), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9972,7 +9805,7 @@ namespace HybridRC trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -9985,7 +9818,7 @@ namespace HybridRC trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -10032,13 +9865,13 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10077,9 +9910,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -10120,16 +9953,16 @@ namespace HybridRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10177,13 +10010,13 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -10222,9 +10055,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -10263,18 +10096,18 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10332,17 +10165,13 @@ namespace HybridRC if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -10383,8 +10212,8 @@ namespace HybridRC direction), 0xFFFF, 0); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -10425,14 +10254,14 @@ namespace HybridRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -10441,7 +10270,7 @@ namespace HybridRC PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -10484,17 +10313,13 @@ namespace HybridRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -10527,7 +10352,7 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -10536,7 +10361,7 @@ namespace HybridRC PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -10577,14 +10402,14 @@ namespace HybridRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -10593,7 +10418,7 @@ namespace HybridRC PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -10650,17 +10475,13 @@ namespace HybridRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -10696,14 +10517,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10742,7 +10559,7 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -10752,8 +10569,8 @@ namespace HybridRC direction), 0xFFFF, 0); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -10794,14 +10611,14 @@ namespace HybridRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -10810,7 +10627,7 @@ namespace HybridRC PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -10853,17 +10670,13 @@ namespace HybridRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -10899,14 +10712,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10946,7 +10755,7 @@ namespace HybridRC } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -10955,7 +10764,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -10996,14 +10805,14 @@ namespace HybridRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -11012,7 +10821,7 @@ namespace HybridRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -11074,7 +10883,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -11113,9 +10922,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -11154,13 +10963,13 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11180,10 +10989,10 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BRAKE + (direction & 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackOnRidePhoto( @@ -11197,10 +11006,10 @@ namespace HybridRC { { 0, 6, height + 3 }, { 32, 20, 0 } }); TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackFlatTo60DegUpLongBase( @@ -11234,14 +11043,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp60DegLongBaseSeq0); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -11268,10 +11077,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp60DegLongBaseSeq1); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -11298,10 +11107,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp60DegLongBaseSeq2); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -11328,19 +11137,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp60DegLongBaseSeq3); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; } } @@ -11376,14 +11185,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToFlatLongBaseSeq0); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: switch (direction) @@ -11410,10 +11219,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToFlatLongBaseSeq1); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 2: switch (direction) @@ -11440,10 +11249,10 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToFlatLongBaseSeq2); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -11470,19 +11279,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToFlatLongBaseSeq3); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -11509,10 +11318,10 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + (direction & 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void Trackbooster( @@ -11523,10 +11332,10 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BOOSTER + (direction & 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackpoweredLift( @@ -11537,18 +11346,18 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_POWERED_LIFT + direction), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackLeftBankToLeftQuarterTurn3Tile25DegUp( @@ -11565,7 +11374,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 0), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -11575,51 +11384,51 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 3), { 0, 6, height }, { { 0, 27, height }, { 34, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 5), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 7), { 0, 6, height }, { 32, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11630,7 +11439,7 @@ namespace HybridRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -11640,41 +11449,41 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 1), { 6, 0, height }, { 20, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 4), { 6, 0, height }, { 20, 34, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 6), { 6, 0, height }, { 20, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 8), { 6, 0, height }, { 20, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -11693,7 +11502,7 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 9), { 0, 6, height }, { 32, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -11701,7 +11510,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 11), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11713,7 +11522,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 14), { 0, 6, height }, { { 0, 27, height }, { 34, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -11721,37 +11530,37 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 16), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11762,7 +11571,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -11793,19 +11602,19 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionNext(direction), height, + session, kSupportType, WoodenSupportSubType::NeSw, DirectionNext(direction), height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -11825,7 +11634,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 12), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -11833,7 +11642,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 15), { 0, 6, height }, { 34, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11841,7 +11650,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 17), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -11849,37 +11658,37 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 10), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11890,7 +11699,7 @@ namespace HybridRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -11901,7 +11710,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 11), { 6, 0, height }, { 20, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -11913,7 +11722,7 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 14), { 6, 0, height }, { { 27, 0, height }, { 1, 34, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11921,27 +11730,27 @@ namespace HybridRC GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 16), { 6, 0, height }, { 20, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 9), { 6, 0, height }, { 32, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -11960,58 +11769,58 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 8), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 1), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 4), { 0, 6, height }, { 34, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 6), { 0, 6, height }, { 32, 20, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12022,7 +11831,7 @@ namespace HybridRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -12032,14 +11841,14 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 7), { 6, 0, height }, { 32, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 0), { 6, 0, height }, { 20, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -12049,27 +11858,27 @@ namespace HybridRC session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 3), { 6, 0, height }, { { 27, 0, height }, { 1, 34, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 5), { 6, 0, height }, { 20, 32, 3 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -12106,14 +11915,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -12141,10 +11950,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12173,17 +11981,15 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -12212,7 +12018,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -12252,14 +12058,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -12290,10 +12096,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12324,17 +12129,15 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -12365,7 +12168,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -12405,7 +12208,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -12436,18 +12239,16 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -12478,10 +12279,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -12512,16 +12312,16 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -12561,7 +12361,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -12591,17 +12391,16 @@ namespace HybridRC { { 0, 16, height }, { 16, 16, 3 } }); break; } - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height + 16, session.SupportColours); + WoodenASupportsPaintSetupRotated( + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -12632,10 +12431,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -12666,14 +12464,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height + 16, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NwSe, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -12729,7 +12527,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -12746,10 +12544,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12762,10 +12559,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -12784,7 +12580,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -12806,7 +12602,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -12819,10 +12615,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12839,10 +12634,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -12861,7 +12655,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -12883,7 +12677,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12900,10 +12694,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12916,10 +12709,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -12938,7 +12730,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12960,7 +12752,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12973,10 +12765,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12993,10 +12784,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -13015,7 +12805,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -13065,7 +12855,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13082,10 +12872,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13098,10 +12887,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13120,7 +12908,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13142,7 +12930,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13155,10 +12943,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13175,10 +12962,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13197,7 +12983,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13219,7 +13005,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -13236,10 +13022,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -13252,10 +13037,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -13274,7 +13058,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -13296,7 +13080,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -13309,10 +13093,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -13329,10 +13112,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -13351,7 +13133,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -13401,7 +13183,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -13418,10 +13200,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -13434,10 +13215,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -13456,7 +13236,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -13478,7 +13258,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -13491,10 +13271,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -13511,10 +13290,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -13533,7 +13311,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -13569,7 +13347,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13586,10 +13364,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13602,10 +13379,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13624,7 +13400,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13646,7 +13422,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13659,10 +13435,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13679,10 +13454,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13701,7 +13475,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13723,7 +13497,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -13740,10 +13514,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -13756,10 +13529,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -13778,7 +13550,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -13800,7 +13572,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -13813,10 +13585,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -13833,10 +13604,9 @@ namespace HybridRC break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -13855,7 +13625,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -13923,14 +13693,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -13961,10 +13731,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13995,17 +13764,15 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -14036,7 +13803,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -14076,14 +13843,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -14114,10 +13881,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -14148,17 +13914,15 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -14189,7 +13953,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -14233,7 +13997,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -14268,17 +14032,15 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -14313,10 +14075,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -14351,14 +14112,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -14402,7 +14163,7 @@ namespace HybridRC break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -14436,17 +14197,16 @@ namespace HybridRC { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height + 16, session.SupportColours); + WoodenASupportsPaintSetupRotated( + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -14481,10 +14241,9 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -14519,14 +14278,14 @@ namespace HybridRC break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height + 16, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NwSe, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } diff --git a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp index dbda4f1368..4bfadaaf3a 100644 --- a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::TubesInverted; + /** rct2: 0x00890CB4 */ static void InvertedHairpinRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -68,19 +73,14 @@ static void InvertedHairpinRCTrackFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00890D84, 0x00890D94, 0x00890DA4 */ @@ -104,11 +104,11 @@ static void InvertedHairpinRCTrackStation( 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, MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00890CC4 */ @@ -169,47 +169,39 @@ static void InvertedHairpinRCTrack25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 48, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00890CD4 */ @@ -271,18 +263,14 @@ static void InvertedHairpinRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x00890CE4 */ @@ -343,47 +331,39 @@ static void InvertedHairpinRCTrackFlatTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 40, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 40, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 40, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 40, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00890CF4 */ @@ -457,18 +437,14 @@ static void InvertedHairpinRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x00890D04 */ @@ -541,47 +517,39 @@ static void InvertedHairpinRCTrack60DegUpTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x00890D14 */ @@ -642,47 +610,39 @@ static void InvertedHairpinRCTrack25DegUpToFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 38, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 38, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 38, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x00890D24 */ @@ -773,17 +733,16 @@ static void InvertedHairpinRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -817,7 +776,7 @@ static void InvertedHairpinRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -852,19 +811,18 @@ static void InvertedHairpinRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -874,7 +832,7 @@ static void InvertedHairpinRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedHairpinRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -914,20 +872,19 @@ static void InvertedHairpinRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -958,19 +915,18 @@ static void InvertedHairpinRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1011,20 +967,19 @@ static void InvertedHairpinRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -1055,19 +1010,18 @@ static void InvertedHairpinRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1077,7 +1031,7 @@ static void InvertedHairpinRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedHairpinRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -1086,7 +1040,7 @@ static void InvertedHairpinRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedHairpinRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1126,23 +1080,22 @@ static void InvertedHairpinRCTrackLeftQuarterTurn1( PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00890E74 */ @@ -1224,18 +1177,14 @@ static void InvertedHairpinRCTrackFlatTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x00890E34 */ @@ -1308,44 +1257,36 @@ static void InvertedHairpinRCTrack60DegUpToFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00890E44 */ @@ -1385,19 +1326,14 @@ static void InvertedHairpinRCTrackBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00890E84 */ @@ -1421,19 +1357,14 @@ static void InvertedHairpinRCTrackBlockBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedHairpinRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp index 06a2040611..2044fe334e 100644 --- a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::TubesInverted; + /** rct2: 0x008B0460 */ static void InvertedImpulseRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -39,19 +44,14 @@ static void InvertedImpulseRCTrackFlat( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008B0470, 0x008B0480, 0x008B0490 */ @@ -75,11 +75,11 @@ static void InvertedImpulseRCTrackStation( 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, MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008B04A0 */ @@ -111,47 +111,39 @@ static void InvertedImpulseRCTrack25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008B04B0 */ @@ -184,18 +176,14 @@ static void InvertedImpulseRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 120); } /** rct2: 0x008B04C0 */ @@ -227,44 +215,36 @@ static void InvertedImpulseRCTrackFlatTo25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008B04D0 */ @@ -303,18 +283,14 @@ static void InvertedImpulseRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); } /** rct2: 0x008B04E0 */ @@ -353,18 +329,14 @@ static void InvertedImpulseRCTrack60DegUpTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); } /** rct2: 0x008B04F0 */ @@ -396,44 +368,36 @@ static void InvertedImpulseRCTrack25DegUpToFlat( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008B0500 */ @@ -517,11 +481,8 @@ static void InvertedImpulseRCTrack90DegUp( } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -569,15 +530,12 @@ static void InvertedImpulseRCTrack60DegUpTo90DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: break; @@ -623,18 +581,14 @@ static void InvertedImpulseRCTrack90DegUpTo60DegUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::InvertedSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); } /** rct2: 0x008B0590 */ @@ -670,14 +624,11 @@ static void InvertedImpulseRCTrack60DegDownTo90DegDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::InvertedSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -726,11 +677,8 @@ static void InvertedImpulseRCTrackLeftQuarterTurn190DegUp( } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -779,11 +727,8 @@ static void InvertedImpulseRCTrackRightQuarterTurn190DegUp( } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; diff --git a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp index f7751b4272..4d92f977af 100644 --- a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp @@ -12,13 +12,22 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" -static constexpr const uint32_t InvertedRCDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr MetalSupportType kSupportType = MetalSupportType::Boxed; + +static constexpr ImageIndex kInvertedRCDiagFlatImages[2][kNumOrthogonalDirections] = { + { 27555, 27556, 27557, 27558 }, + { 27611, 27612, 27613, 27614 }, +}; + +static constexpr ImageIndex kInvertedRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_BM_INVERT_DIAG_BRAKES, SPR_G2_BM_INVERT_DIAG_BRAKES + 1, SPR_G2_BM_INVERT_DIAG_BRAKES, @@ -67,19 +76,14 @@ static void InvertedRCTrackFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A9558, 0x008A9568, 0x008A9578 */ @@ -103,11 +107,11 @@ static void InvertedRCTrackStation( 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, MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A92F8 */ @@ -168,45 +172,39 @@ static void InvertedRCTrack25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9308 */ @@ -239,18 +237,14 @@ static void InvertedRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 120); } /** rct2: 0x008A9318 */ @@ -311,45 +305,39 @@ static void InvertedRCTrackFlatTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A9328 */ @@ -388,18 +376,14 @@ static void InvertedRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); } /** rct2: 0x008A9338 */ @@ -437,45 +421,39 @@ static void InvertedRCTrack60DegUpTo25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 76, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 76, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 76, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 76, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 76, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 76, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 76, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 76, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); } /** rct2: 0x008A9348 */ @@ -536,45 +514,39 @@ static void InvertedRCTrack25DegUpToFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A9358 */ @@ -665,17 +637,16 @@ static void InvertedRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -707,7 +678,7 @@ static void InvertedRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -740,10 +711,10 @@ static void InvertedRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -775,7 +746,7 @@ static void InvertedRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -810,19 +781,18 @@ static void InvertedRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -832,7 +802,7 @@ static void InvertedRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; InvertedRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -875,12 +845,11 @@ static void InvertedRCTrackFlatToLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A93E8 */ @@ -922,12 +891,11 @@ static void InvertedRCTrackFlatToRightBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A93F8 */ @@ -969,12 +937,11 @@ static void InvertedRCTrackLeftBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A9408 */ @@ -1016,12 +983,11 @@ static void InvertedRCTrackRightBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A9418 */ @@ -1064,17 +1030,16 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1106,7 +1071,7 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -1139,10 +1104,10 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -1174,7 +1139,7 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -1209,19 +1174,18 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1231,7 +1195,7 @@ static void InvertedRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; InvertedRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1278,34 +1242,32 @@ static void InvertedRCTrackLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A9448 */ @@ -1351,34 +1313,32 @@ static void InvertedRCTrackRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A9458 */ @@ -1424,34 +1384,32 @@ static void InvertedRCTrack25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A9468 */ @@ -1497,34 +1455,32 @@ static void InvertedRCTrack25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A9478 */ @@ -1598,12 +1554,11 @@ static void InvertedRCTrackLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A94C8 */ @@ -1650,17 +1605,16 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -1690,7 +1644,7 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -1720,10 +1674,10 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -1753,7 +1707,7 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -1784,19 +1738,18 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -1837,17 +1790,16 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -1877,7 +1829,7 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -1906,10 +1858,10 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -1939,7 +1891,7 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -1970,19 +1922,18 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -1992,7 +1943,7 @@ static void InvertedRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; InvertedRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2001,7 +1952,7 @@ static void InvertedRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; InvertedRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2045,14 +1996,13 @@ static void InvertedRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -2089,17 +2039,15 @@ static void InvertedRCTrackSBendLeft( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2136,17 +2084,15 @@ static void InvertedRCTrackSBendLeft( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -2181,19 +2127,18 @@ static void InvertedRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2238,14 +2183,13 @@ static void InvertedRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -2282,17 +2226,15 @@ static void InvertedRCTrackSBendRight( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2329,17 +2271,15 @@ static void InvertedRCTrackSBendRight( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -2374,19 +2314,18 @@ static void InvertedRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2436,31 +2375,27 @@ static void InvertedRCTrackLeftVerticalLoop( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 55, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 55, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 55, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 55, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -2487,7 +2422,7 @@ static void InvertedRCTrackLeftVerticalLoop( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -2521,7 +2456,7 @@ static void InvertedRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2555,13 +2490,13 @@ static void InvertedRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 6: switch (direction) @@ -2595,7 +2530,7 @@ static void InvertedRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 7: switch (direction) @@ -2629,7 +2564,7 @@ static void InvertedRCTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2656,7 +2591,7 @@ static void InvertedRCTrackLeftVerticalLoop( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 9: switch (direction) @@ -2696,36 +2631,32 @@ static void InvertedRCTrackLeftVerticalLoop( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 55, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 55, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 55, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 55, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::InvertedSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::InvertedSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2775,31 +2706,27 @@ static void InvertedRCTrackRightVerticalLoop( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 55, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 55, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 55, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 55, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -2826,7 +2753,7 @@ static void InvertedRCTrackRightVerticalLoop( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -2860,7 +2787,7 @@ static void InvertedRCTrackRightVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2894,13 +2821,13 @@ static void InvertedRCTrackRightVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 6: switch (direction) @@ -2934,7 +2861,7 @@ static void InvertedRCTrackRightVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 7: switch (direction) @@ -2967,7 +2894,7 @@ static void InvertedRCTrackRightVerticalLoop( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2994,7 +2921,7 @@ static void InvertedRCTrackRightVerticalLoop( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 9: switch (direction) @@ -3034,36 +2961,32 @@ static void InvertedRCTrackRightVerticalLoop( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 55, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 55, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 55, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 55, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::InvertedSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::InvertedSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3108,17 +3031,16 @@ static void InvertedRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3151,7 +3073,7 @@ static void InvertedRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -3186,19 +3108,18 @@ static void InvertedRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3208,7 +3129,7 @@ static void InvertedRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3252,17 +3173,16 @@ static void InvertedRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3296,7 +3216,7 @@ static void InvertedRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -3331,19 +3251,18 @@ static void InvertedRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3353,7 +3272,7 @@ static void InvertedRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3393,20 +3312,19 @@ static void InvertedRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -3437,19 +3355,18 @@ static void InvertedRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -3490,20 +3407,19 @@ static void InvertedRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -3534,19 +3450,18 @@ static void InvertedRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -3556,7 +3471,7 @@ static void InvertedRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3565,7 +3480,7 @@ static void InvertedRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3605,14 +3520,13 @@ static void InvertedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3642,7 +3556,7 @@ static void InvertedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3664,15 +3578,14 @@ static void InvertedRCTrackLeftTwistDownToUp( session, direction, session.TrackColours.WithIndex(27436), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3683,7 +3596,7 @@ static void InvertedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3724,14 +3637,13 @@ static void InvertedRCTrackRightTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3761,7 +3673,7 @@ static void InvertedRCTrackRightTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3783,15 +3695,14 @@ static void InvertedRCTrackRightTwistDownToUp( session, direction, session.TrackColours.WithIndex(27448), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3802,7 +3713,7 @@ static void InvertedRCTrackRightTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3834,11 +3745,10 @@ static void InvertedRCTrackLeftTwistUpToDown( session, direction, session.TrackColours.WithIndex(27435), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3848,7 +3758,7 @@ static void InvertedRCTrackLeftTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3878,7 +3788,7 @@ static void InvertedRCTrackLeftTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3909,19 +3819,18 @@ static void InvertedRCTrackLeftTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3953,11 +3862,10 @@ static void InvertedRCTrackRightTwistUpToDown( session, direction, session.TrackColours.WithIndex(27447), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3967,7 +3875,7 @@ static void InvertedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3997,7 +3905,7 @@ static void InvertedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4028,19 +3936,18 @@ static void InvertedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4078,39 +3985,32 @@ static void InvertedRCTrackHalfLoopUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -4137,7 +4037,7 @@ static void InvertedRCTrackHalfLoopUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4171,7 +4071,7 @@ static void InvertedRCTrackHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -4199,14 +4099,11 @@ static void InvertedRCTrackHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::InvertedFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4259,14 +4156,13 @@ static void InvertedRCTrackLeftCorkscrewUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 50, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 50, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -4293,7 +4189,7 @@ static void InvertedRCTrackLeftCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4319,15 +4215,14 @@ static void InvertedRCTrackLeftCorkscrewUp( { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 28, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 28, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 40, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 40, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 40, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 40, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4338,7 +4233,7 @@ static void InvertedRCTrackLeftCorkscrewUp( PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4383,14 +4278,13 @@ static void InvertedRCTrackRightCorkscrewUp( PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 50, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 50, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -4417,7 +4311,7 @@ static void InvertedRCTrackRightCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4443,15 +4337,14 @@ static void InvertedRCTrackRightCorkscrewUp( { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 28, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 28, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 40, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 40, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 40, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 40, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4462,7 +4355,7 @@ static void InvertedRCTrackRightCorkscrewUp( PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4523,9 +4416,10 @@ static void InvertedRCTrackLeftQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::InvertedSlopeStart, +56, TunnelType::InvertedSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A96B8 */ @@ -4568,9 +4462,10 @@ static void InvertedRCTrackRightQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::InvertedSlopeStart, +56, TunnelType::InvertedSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A96C8 */ @@ -4610,19 +4505,14 @@ static void InvertedRCTrackBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A96F8 */ @@ -4665,17 +4555,16 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4709,7 +4598,7 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4743,10 +4632,10 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -4780,7 +4669,7 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -4815,19 +4704,18 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4872,17 +4760,16 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4916,7 +4803,7 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4949,10 +4836,10 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -4986,7 +4873,7 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -5021,19 +4908,18 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5078,17 +4964,16 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5122,7 +5007,7 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -5156,10 +5041,10 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -5193,7 +5078,7 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -5228,19 +5113,18 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5285,17 +5169,16 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5329,7 +5212,7 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -5362,10 +5245,10 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -5399,7 +5282,7 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -5434,19 +5317,18 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5480,45 +5362,39 @@ static void InvertedRCTrack25DegUpLeftBanked( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9A48 */ @@ -5550,45 +5426,39 @@ static void InvertedRCTrack25DegUpRightBanked( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9738 */ @@ -5596,7 +5466,7 @@ static void InvertedRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Boxed); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -5622,9 +5492,9 @@ static void InvertedRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A9A58 */ @@ -5676,18 +5546,14 @@ static void InvertedRCTrackLeftEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5721,7 +5587,7 @@ static void InvertedRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5755,7 +5621,7 @@ static void InvertedRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5766,7 +5632,7 @@ static void InvertedRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -5805,26 +5671,23 @@ static void InvertedRCTrackLeftEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5862,18 +5725,14 @@ static void InvertedRCTrackRightEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5907,7 +5766,7 @@ static void InvertedRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5941,7 +5800,7 @@ static void InvertedRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5952,7 +5811,7 @@ static void InvertedRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -5991,26 +5850,23 @@ static void InvertedRCTrackRightEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6073,14 +5929,13 @@ static void InvertedRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6114,7 +5969,7 @@ static void InvertedRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6148,7 +6003,7 @@ static void InvertedRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6159,7 +6014,7 @@ static void InvertedRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -6198,26 +6053,23 @@ static void InvertedRCTrackLeftEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6262,14 +6114,13 @@ static void InvertedRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6303,7 +6154,7 @@ static void InvertedRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6337,7 +6188,7 @@ static void InvertedRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6348,7 +6199,7 @@ static void InvertedRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -6387,26 +6238,23 @@ static void InvertedRCTrackRightEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6429,188 +6277,37 @@ static void InvertedRCTrackRightEighthBankToOrthogonal( InvertedRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } -/** rct2: 0x008A9788 */ -static void InvertedRCTrackDiagFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27614), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27558), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27611), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27555), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27613), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27557), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27612), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27556), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } -} - -static void inverted_rc_track_diag_brakes( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) +inline void InvertedRCTrackDiagFlatBase( + PaintSession& session, uint8_t trackSequence, const ImageIndex* images, uint8_t direction, int32_t height) { TrackPaintUtilDiagTilesPaint( - session, 1, height + 29, direction, trackSequence, session.TrackColours, InvertedRCDiagBrakeImages, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height + 29, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 0, height + 44, session.SupportColours); + session, kSupportType, kDiagSupportPlacement[direction], 0, height + 44, session.SupportColours); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); +} + +/** rct2: 0x008A9788 */ +static void InvertedRCTrackDiagFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + const auto* images = kInvertedRCDiagFlatImages[trackElement.HasChain()]; + InvertedRCTrackDiagFlatBase(session, trackSequence, images, direction, height); +} + +static void InvertedRCTrackDiagBrakes( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + InvertedRCTrackDiagFlatBase(session, trackSequence, kInvertedRCDiagBrakeImages, direction, height); } /** rct2: 0x008A97B8 */ @@ -6651,7 +6348,7 @@ static void InvertedRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -6683,7 +6380,7 @@ static void InvertedRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -6716,7 +6413,7 @@ static void InvertedRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -6754,26 +6451,23 @@ static void InvertedRCTrackDiag25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 56, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 56, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 56, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 56, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 56, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6802,7 +6496,7 @@ static void InvertedRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 1: switch (direction) @@ -6820,7 +6514,7 @@ static void InvertedRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 2: switch (direction) @@ -6839,7 +6533,7 @@ static void InvertedRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 3: switch (direction) @@ -6863,27 +6557,23 @@ static void InvertedRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 32, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 36, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 32, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 36, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; } } @@ -6926,7 +6616,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -6958,7 +6648,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -6991,7 +6681,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -7029,26 +6719,23 @@ static void InvertedRCTrackDiagFlatTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -7077,7 +6764,7 @@ static void InvertedRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -7095,7 +6782,7 @@ static void InvertedRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -7114,7 +6801,7 @@ static void InvertedRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -7138,27 +6825,23 @@ static void InvertedRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 16, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 16, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 16, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 16, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -7187,7 +6870,7 @@ static void InvertedRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -7205,7 +6888,7 @@ static void InvertedRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -7224,7 +6907,7 @@ static void InvertedRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -7248,27 +6931,23 @@ static void InvertedRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 21, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 21, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 21, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 21, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -7311,7 +6990,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7343,7 +7022,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7376,7 +7055,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7414,26 +7093,23 @@ static void InvertedRCTrackDiag25DegUpToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7476,7 +7152,7 @@ static void InvertedRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7508,7 +7184,7 @@ static void InvertedRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7541,7 +7217,7 @@ static void InvertedRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7579,26 +7255,23 @@ static void InvertedRCTrackDiag25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 56, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 56, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 56, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 56, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 56, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7627,7 +7300,7 @@ static void InvertedRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 1: switch (direction) @@ -7645,7 +7318,7 @@ static void InvertedRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 2: switch (direction) @@ -7664,7 +7337,7 @@ static void InvertedRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 3: switch (direction) @@ -7688,27 +7361,23 @@ static void InvertedRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 24, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 28, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 24, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 28, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; } } @@ -7851,28 +7520,25 @@ static void InvertedRCTrackDiagFlatTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9828 */ @@ -7899,7 +7565,7 @@ static void InvertedRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -7917,7 +7583,7 @@ static void InvertedRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -7936,7 +7602,7 @@ static void InvertedRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -7960,27 +7626,23 @@ static void InvertedRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 17, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 17, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 17, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 17, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -8009,7 +7671,7 @@ static void InvertedRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -8027,7 +7689,7 @@ static void InvertedRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -8046,7 +7708,7 @@ static void InvertedRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -8070,26 +7732,23 @@ static void InvertedRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 8, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 8, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 8, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 8, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -8132,7 +7791,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -8164,7 +7823,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -8197,7 +7856,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -8235,26 +7894,23 @@ static void InvertedRCTrackDiag25DegDownToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -8283,7 +7939,7 @@ static void InvertedRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8301,7 +7957,7 @@ static void InvertedRCTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8320,7 +7976,7 @@ static void InvertedRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8344,26 +8000,23 @@ static void InvertedRCTrackDiagFlatToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8392,7 +8045,7 @@ static void InvertedRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8410,7 +8063,7 @@ static void InvertedRCTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8429,7 +8082,7 @@ static void InvertedRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8453,26 +8106,23 @@ static void InvertedRCTrackDiagFlatToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8501,7 +8151,7 @@ static void InvertedRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8519,7 +8169,7 @@ static void InvertedRCTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8538,7 +8188,7 @@ static void InvertedRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8562,26 +8212,23 @@ static void InvertedRCTrackDiagLeftBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8610,7 +8257,7 @@ static void InvertedRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8628,7 +8275,7 @@ static void InvertedRCTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8647,7 +8294,7 @@ static void InvertedRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8671,26 +8318,23 @@ static void InvertedRCTrackDiagRightBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8719,7 +8363,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -8737,7 +8381,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -8756,7 +8400,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -8780,26 +8424,23 @@ static void InvertedRCTrackDiagLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -8828,7 +8469,7 @@ static void InvertedRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -8846,7 +8487,7 @@ static void InvertedRCTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -8865,7 +8506,7 @@ static void InvertedRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -8889,26 +8530,23 @@ static void InvertedRCTrackDiagRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -8937,7 +8575,7 @@ static void InvertedRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -8955,7 +8593,7 @@ static void InvertedRCTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -8974,7 +8612,7 @@ static void InvertedRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -8998,26 +8636,23 @@ static void InvertedRCTrackDiag25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9046,7 +8681,7 @@ static void InvertedRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -9064,7 +8699,7 @@ static void InvertedRCTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9083,7 +8718,7 @@ static void InvertedRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9107,26 +8742,23 @@ static void InvertedRCTrackDiag25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9213,28 +8845,25 @@ static void InvertedRCTrackDiagLeftBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9908 */ @@ -9319,28 +8948,25 @@ static void InvertedRCTrackDiagRightBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9918 */ @@ -9367,7 +8993,7 @@ static void InvertedRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -9385,7 +9011,7 @@ static void InvertedRCTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -9404,7 +9030,7 @@ static void InvertedRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -9428,26 +9054,23 @@ static void InvertedRCTrackDiag25DegDownToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -9476,7 +9099,7 @@ static void InvertedRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -9494,7 +9117,7 @@ static void InvertedRCTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -9513,7 +9136,7 @@ static void InvertedRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -9537,26 +9160,23 @@ static void InvertedRCTrackDiag25DegDownToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -9585,7 +9205,7 @@ static void InvertedRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9603,7 +9223,7 @@ static void InvertedRCTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9622,7 +9242,7 @@ static void InvertedRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -9646,26 +9266,23 @@ static void InvertedRCTrackDiagLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9694,7 +9311,7 @@ static void InvertedRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9712,7 +9329,7 @@ static void InvertedRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9731,7 +9348,7 @@ static void InvertedRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -9755,26 +9372,23 @@ static void InvertedRCTrackDiagRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9812,14 +9426,11 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -9846,11 +9457,8 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9884,7 +9492,7 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -9918,7 +9526,7 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -9952,7 +9560,7 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -9986,7 +9594,7 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -9996,33 +9604,33 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex(27645), { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 27, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 27, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27652), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 27, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 27, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27659), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 25, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 25, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27666), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 27, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 27, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10032,7 +9640,7 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -10070,14 +9678,11 @@ static void InvertedRCTrackRightLargeHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -10104,11 +9709,8 @@ static void InvertedRCTrackRightLargeHalfLoopUp( break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10142,7 +9744,7 @@ static void InvertedRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -10176,7 +9778,7 @@ static void InvertedRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -10210,7 +9812,7 @@ static void InvertedRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -10244,7 +9846,7 @@ static void InvertedRCTrackRightLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -10254,33 +9856,33 @@ static void InvertedRCTrackRightLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex(27694), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 27, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 27, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27687), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 25, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 25, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27680), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 27, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 27, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27673), { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 27, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 27, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10290,7 +9892,7 @@ static void InvertedRCTrackRightLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -10332,19 +9934,14 @@ static void InvertedRCTrackBlockBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A9A78 */ @@ -10383,20 +9980,19 @@ static void InvertedRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -10427,19 +10023,18 @@ static void InvertedRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -10480,20 +10075,19 @@ static void InvertedRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -10524,19 +10118,18 @@ static void InvertedRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 52, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -10546,7 +10139,7 @@ static void InvertedRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -10555,7 +10148,7 @@ static void InvertedRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; InvertedRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -10595,17 +10188,16 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -10635,7 +10227,7 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -10665,10 +10257,10 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -10698,7 +10290,7 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -10729,19 +10321,18 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -10782,17 +10373,16 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -10822,7 +10412,7 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -10851,10 +10441,10 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -10884,7 +10474,7 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -10915,19 +10505,18 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -10937,7 +10526,7 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; InvertedRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -10946,7 +10535,7 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; InvertedRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -10979,45 +10568,39 @@ static void InvertedRCTrack25DegUpToLeftBanked25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9AC8 */ @@ -11049,45 +10632,39 @@ static void InvertedRCTrack25DegUpToRightBanked25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9AD8 */ @@ -11119,45 +10696,39 @@ static void InvertedRCTrackLeftBanked25DegUpTo25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9AE8 */ @@ -11189,45 +10760,39 @@ static void InvertedRCTrackRightBanked25DegUpTo25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A9AF8 */ @@ -11291,45 +10856,39 @@ static void InvertedRCTrackLeftBankedFlatToLeftBanked25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A9B48 */ @@ -11361,45 +10920,39 @@ static void InvertedRCTrackRightBankedFlatToRightBanked25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A9B58 */ @@ -11431,45 +10984,39 @@ static void InvertedRCTrackLeftBanked25DegUpToLeftBankedFlat( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A9B68 */ @@ -11501,45 +11048,39 @@ static void InvertedRCTrackRightBanked25DegUpToRightBankedFlat( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A9B78 */ @@ -11603,45 +11144,39 @@ static void InvertedRCTrackFlatToLeftBanked25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A99C8 */ @@ -11673,45 +11208,39 @@ static void InvertedRCTrackFlatToRightBanked25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A99D8 */ @@ -11743,45 +11272,39 @@ static void InvertedRCTrackLeftBanked25DegUpToFlat( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A99E8 */ @@ -11813,45 +11336,39 @@ static void InvertedRCTrackRightBanked25DegUpToFlat( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A99F8 */ @@ -11897,19 +11414,14 @@ static void InvertedRCTrackBooster( session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 1 } }); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedRC(int32_t trackType) @@ -12209,7 +11721,7 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedRC(int32_t trackType) case TrackElemType::DiagBrakes: case TrackElemType::DiagBlockBrakes: - return inverted_rc_track_diag_brakes; + return InvertedRCTrackDiagBrakes; case TrackElemType::Booster: return InvertedRCTrackBooster; diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 7b740e9481..d847933667 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -13,12 +13,19 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +#include + +static constexpr MetalSupportType kSupportType = MetalSupportType::Fork; + enum class JuniorRCSubType : uint8_t { Junior = 1, @@ -1855,12 +1862,12 @@ static void JuniorRCPaintTrackFlat( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); auto imageId = session.TrackColours.WithIndex(junior_rc_track_pieces_flat[subTypeOffset][direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } @@ -1869,7 +1876,7 @@ static void JuniorRCPaintTrackFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -1924,12 +1931,12 @@ static void JuniorRCPaintStation( } DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -1942,12 +1949,13 @@ static void JuniorRCPaintTrack25DegUp( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }); int8_t tunnelHeights[4] = { -8, 8, 8, -8 }; - uint8_t tunnelType[4] = { TUNNEL_1, TUNNEL_2, TUNNEL_2, TUNNEL_1 }; + TunnelType tunnelType[4] = { TunnelType::StandardSlopeStart, TunnelType::StandardSlopeEnd, TunnelType::StandardSlopeEnd, + TunnelType::StandardSlopeStart }; PaintUtilPushTunnelRotated(session, direction, height + tunnelHeights[direction], tunnelType[direction]); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } @@ -1956,7 +1964,7 @@ static void JuniorRCPaintTrack25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -1970,16 +1978,16 @@ static void JuniorRCPaintTrackFlatTo25DegUp( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; uint16_t ax = (direction == 0) ? 5 : 3; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, ax, height, session.SupportColours); } @@ -1989,7 +1997,7 @@ static void JuniorRCPaintTrackFlatTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -2001,16 +2009,16 @@ static void JuniorRCPaintTrack25DegUpToFlat( auto imageId = session.TrackColours.WithIndex(junior_rc_track_pieces_25_deg_up_to_flat[subTypeOffset][direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }); - uint8_t tunnelType; + TunnelType tunnelType; int16_t tunnelHeight; if (direction == 1 || direction == 2) { - tunnelType = TUNNEL_12; + tunnelType = TunnelType::_12; tunnelHeight = height + 8; } else { - tunnelType = TUNNEL_0; + tunnelType = TunnelType::StandardFlat; tunnelHeight = height - 8; } @@ -2025,7 +2033,7 @@ static void JuniorRCPaintTrack25DegUpToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } @@ -2034,7 +2042,7 @@ static void JuniorRCPaintTrack25DegUpToFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static constexpr int8_t junior_rc_track_right_quarter_turn_5_tiles_support_height_offset[][7] = { @@ -2050,42 +2058,42 @@ static void JuniorRCRightQuarterTurn5TilesPaintSetup( { TrackPaintUtilRightQuarterTurn5TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_flat_quarter_turn_5_tiles, - defaultRightQuarterTurn5TilesOffsets, defaultRightQuarterTurn5TilesBoundLengths, - defaultRightQuarterTurn5TilesBoundOffsets); + kDefaultRightQuarterTurn5TilesOffsets, kDefaultRightQuarterTurn5TilesBoundLengths, + kDefaultRightQuarterTurn5TilesBoundOffsets); int32_t supportHeight = height + junior_rc_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; switch (trackSequence) { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, supportHeight, session.SupportColours); break; case 6: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 0, + session, (direction & 1) ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 0, supportHeight, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -2141,7 +2149,7 @@ static void JuniorRCRightQuarterTurn5TilesPaintSetup( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr uint8_t junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[] = { @@ -2171,13 +2179,13 @@ static void JuniorRCFlatToLeftBankPaintSetup( { PaintAddImageAsParent(session, image_id, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); - PaintUtilPushTunnelRight(session, height, 0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } else { PaintAddImageAsParent(session, image_id, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - PaintUtilPushTunnelLeft(session, height, 0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (junior_rc_track_pieces_flat_to_left_bank[direction][1] != 0) @@ -2196,7 +2204,7 @@ static void JuniorRCFlatToLeftBankPaintSetup( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } @@ -2205,7 +2213,7 @@ static void JuniorRCFlatToLeftBankPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** @@ -2222,13 +2230,13 @@ static void JuniorRCFlatToRightBankPaintSetup( { PaintAddImageAsParent(session, image_id, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); - PaintUtilPushTunnelRight(session, height, 0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } else { PaintAddImageAsParent(session, image_id, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - PaintUtilPushTunnelLeft(session, height, 0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (junior_rc_track_pieces_flat_to_right_bank[direction][1] != 0) @@ -2247,7 +2255,7 @@ static void JuniorRCFlatToRightBankPaintSetup( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } @@ -2256,7 +2264,7 @@ static void JuniorRCFlatToRightBankPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void JuniorRCLeftBankToFlatPaintSetup( @@ -2366,34 +2374,34 @@ static void JuniorRCBankedRightQuarterTurn5TilesPaintSetup( { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, supportHeight, session.SupportColours); break; case 6: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 0, + session, (direction & 1) ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 0, supportHeight, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -2449,7 +2457,7 @@ static void JuniorRCBankedRightQuarterTurn5TilesPaintSetup( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /* rct2: 0x008AB000 */ @@ -2496,23 +2504,23 @@ static void JuniorRCLeftBankTo25DegUpPaintSetup( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; } @@ -2521,7 +2529,7 @@ static void JuniorRCLeftBankTo25DegUpPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** @@ -2559,23 +2567,23 @@ static void JuniorRCRightBankTo25DegUpPaintSetup( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; } @@ -2584,7 +2592,7 @@ static void JuniorRCRightBankTo25DegUpPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** @@ -2596,16 +2604,16 @@ static void JuniorRC25DegUpToLeftBankPaintSetup( { ImageId image_id; - uint8_t tunnelType; + TunnelType tunnelType; int16_t tunnelHeight; if (direction == 1 || direction == 2) { - tunnelType = TUNNEL_12; + tunnelType = TunnelType::_12; tunnelHeight = height + 8; } else { - tunnelType = TUNNEL_0; + tunnelType = TunnelType::StandardFlat; tunnelHeight = height - 8; } @@ -2639,7 +2647,7 @@ static void JuniorRC25DegUpToLeftBankPaintSetup( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } @@ -2648,7 +2656,7 @@ static void JuniorRC25DegUpToLeftBankPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** @@ -2660,16 +2668,16 @@ static void JuniorRC25DegUpToRightBankPaintSetup( { ImageId image_id; - uint8_t tunnelType; + TunnelType tunnelType; int16_t tunnelHeight; if (direction == 1 || direction == 2) { - tunnelType = TUNNEL_12; + tunnelType = TunnelType::_12; tunnelHeight = height + 8; } else { - tunnelType = TUNNEL_0; + tunnelType = TunnelType::StandardFlat; tunnelHeight = height - 8; } @@ -2703,7 +2711,7 @@ static void JuniorRC25DegUpToRightBankPaintSetup( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } @@ -2712,7 +2720,7 @@ static void JuniorRC25DegUpToRightBankPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** @@ -2785,16 +2793,16 @@ static void JuniorRCLeftBankPaintSetup( if (direction & 1) { - PaintUtilPushTunnelRight(session, height, 0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelLeft(session, height, 0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } @@ -2803,7 +2811,7 @@ static void JuniorRCLeftBankPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** @@ -2824,38 +2832,38 @@ static void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( TrackPaintUtilRightQuarterTurn5TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_left_quarter_turn_5_tiles_25_deg_up[subTypeOffset], - junior_rc_left_quarter_turn_5_tiles_25_deg_up_offsets, defaultRightQuarterTurn5TilesBoundLengths, nullptr); + junior_rc_left_quarter_turn_5_tiles_25_deg_up_offsets, kDefaultRightQuarterTurn5TilesBoundLengths, nullptr); static constexpr uint8_t supportSpecial[4] = { 8, 8, 8, 3 }; switch (trackSequence) { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, (direction == 0 || direction == 3) ? 10 : 8, height, session.SupportColours); break; case 6: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, + session, (direction & 1) ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, supportSpecial[direction], height, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); } if (direction == 2 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); } if (direction == 3 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); } switch (trackSequence) @@ -2913,11 +2921,11 @@ static void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( } if (trackSequence == 3) { - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } else { - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -2928,39 +2936,39 @@ static void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilRightQuarterTurn5TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_right_quarter_turn_5_tiles_25_deg_up[subTypeOffset], defaultRightQuarterTurn5TilesOffsets, - defaultRightQuarterTurn5TilesBoundLengths, nullptr); + junior_rc_track_pieces_right_quarter_turn_5_tiles_25_deg_up[subTypeOffset], kDefaultRightQuarterTurn5TilesOffsets, + kDefaultRightQuarterTurn5TilesBoundLengths, nullptr); static constexpr uint8_t supportSpecial[4] = { 11, 8, 8, 7 }; switch (trackSequence) { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, supportSpecial[direction], height, session.SupportColours); break; case 6: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 8, - height, session.SupportColours); + session, (direction & 1) ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 8, height, + session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); } switch (trackSequence) @@ -3017,11 +3025,11 @@ static void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( } if (trackSequence == 3) { - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } else { - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -3085,22 +3093,20 @@ static void JuniorRCSBendLeftPaintSetup( { if (trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } } @@ -3108,7 +3114,7 @@ static void JuniorRCSBendLeftPaintSetup( { if (trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -3152,7 +3158,7 @@ static void JuniorRCSBendLeftPaintSetup( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, (direction & 1)), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /* rct2: 0x008AAE60, 0x0051BBC0, 0x0051BE06, 0x0051C04E, 0x0051C068 */ @@ -3195,22 +3201,20 @@ static void JuniorRCSBendRightPaintSetup( { if (trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } } @@ -3218,7 +3222,7 @@ static void JuniorRCSBendRightPaintSetup( { if (trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -3262,7 +3266,7 @@ static void JuniorRCSBendRightPaintSetup( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, (direction & 1)), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AAEB0, 0x0051C0E0, 0x0051C2C1, 0x0051C47F, 0x0051C61D */ @@ -3273,11 +3277,11 @@ static void JuniorRCRightQuarterTurn3TilesPaintSetup( TrackPaintUtilRightQuarterTurn3TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_flat_quarter_turn_3_tiles, defaultRightQuarterTurn3TilesOffsets, defaultRightQuarterTurn3TilesBoundLengths, nullptr); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::StandardFlat); static constexpr MetalSupportType supportType[2][4] = { - { MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt }, - { MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork }, + { kSupportType, MetalSupportType::ForkAlt, kSupportType, MetalSupportType::ForkAlt }, + { MetalSupportType::ForkAlt, kSupportType, MetalSupportType::ForkAlt, kSupportType }, }; switch (trackSequence) { @@ -3307,7 +3311,7 @@ static void JuniorRCRightQuarterTurn3TilesPaintSetup( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AAEA0 */ @@ -3315,7 +3319,7 @@ static void JuniorRCLeftQuarterTurn3TilesPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; JuniorRCRightQuarterTurn3TilesPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -3381,7 +3385,7 @@ static void JuniorRCRightQuarterTurn3TilesBankPaintSetup( session, thickness[direction][trackSequence], height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_banked_quarter_turn_3_tiles, nullptr, junior_rc_right_quarter_turn_3_tiles_bank_bound_lengths, junior_rc_right_quarter_turn_3_tiles_bank_offsets); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::StandardFlat); if (direction == 1 && trackSequence == 3) { @@ -3395,8 +3399,8 @@ static void JuniorRCRightQuarterTurn3TilesBankPaintSetup( } static constexpr MetalSupportType supportType[2][4] = { - { MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt }, - { MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork }, + { kSupportType, MetalSupportType::ForkAlt, kSupportType, MetalSupportType::ForkAlt }, + { MetalSupportType::ForkAlt, kSupportType, MetalSupportType::ForkAlt, kSupportType }, }; switch (trackSequence) { @@ -3426,7 +3430,7 @@ static void JuniorRCRightQuarterTurn3TilesBankPaintSetup( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegUp( @@ -3462,27 +3466,27 @@ static void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegUp( if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); } if (direction == 0 && trackSequence == 3) { - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); } if (direction == 1 && trackSequence == 3) { - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); } static constexpr MetalSupportType supportType[2][4] = { - { MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt }, - { MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork }, + { kSupportType, MetalSupportType::ForkAlt, kSupportType, MetalSupportType::ForkAlt }, + { MetalSupportType::ForkAlt, kSupportType, MetalSupportType::ForkAlt, kSupportType }, }; switch (trackSequence) { @@ -3509,9 +3513,9 @@ static void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegUp( PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); if (trackSequence == 0 || trackSequence == 3) - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); else - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegDown( @@ -3547,27 +3551,27 @@ static void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegDown( if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); } if (direction == 0 && trackSequence == 3) { - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); } if (direction == 1 && trackSequence == 3) { - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); } static constexpr MetalSupportType supportType[2][4] = { - { MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt }, - { MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork }, + { kSupportType, MetalSupportType::ForkAlt, kSupportType, MetalSupportType::ForkAlt }, + { MetalSupportType::ForkAlt, kSupportType, MetalSupportType::ForkAlt, kSupportType }, }; switch (trackSequence) { @@ -3594,9 +3598,9 @@ static void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegDown( PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); if (trackSequence == 0 || trackSequence == 3) - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); else - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AA0C0 */ @@ -3604,7 +3608,7 @@ static void JuniorRCLeftQuarterTurn3TilesBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; JuniorRCRightQuarterTurn3TilesBankPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -3654,34 +3658,34 @@ static void JuniorRCRightHalfBankedHelixUpSmallPaintSetup( if (trackSequence == 0) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 2, height, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); } else if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 6, height, + session, (direction & 1) ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 3) { - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 3) { - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } int32_t blockedSegments = 0; @@ -3703,7 +3707,7 @@ static void JuniorRCRightHalfBankedHelixUpSmallPaintSetup( break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB110, 0x0052BD80, 0x0052BFD4, 0x0052C23B, 0x0052C450 */ @@ -3727,34 +3731,34 @@ static void JuniorRCRightHalfBankedHelixDownSmallPaintSetup( if (trackSequence == 0) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } else if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 2, height, + session, (direction & 1) ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 2, height, session.SupportColours); } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 3) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); } int32_t blockedSegments = 0; @@ -3776,7 +3780,7 @@ static void JuniorRCRightHalfBankedHelixDownSmallPaintSetup( break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB0E0 */ @@ -3830,34 +3834,34 @@ static void JuniorRCRightHalfBankedHelixUpLargePaintSetup( if (trackSequence == 0) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 1, height, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); } else if (trackSequence == 6) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 7, height, + session, (direction & 1) ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 7, height, session.SupportColours); } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -3913,7 +3917,7 @@ static void JuniorRCRightHalfBankedHelixUpLargePaintSetup( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB150, 0x0052D778, 0x0052DB27, 0x0052DEEA, 0x0052E26B */ @@ -3937,34 +3941,34 @@ static void JuniorRCRightHalfBankedHelixDownLargePaintSetup( if (trackSequence == 0) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); } else if (trackSequence == 6) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Fork : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 1, height, + session, (direction & 1) ? kSupportType : MetalSupportType::ForkAlt, MetalSupportPlace::Centre, 1, height, session.SupportColours); } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); } switch (trackSequence) @@ -4020,7 +4024,7 @@ static void JuniorRCRightHalfBankedHelixDownLargePaintSetup( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB120 */ @@ -4067,18 +4071,18 @@ static void JuniorRCBrakePaintSetup( { PaintAddImageAsParent(session, image_id, { 6, 0, height }, { 20, 32, 1 }); - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } else { PaintAddImageAsParent(session, image_id, { 0, 6, height }, { 32, 20, 1 }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } @@ -4087,7 +4091,7 @@ static void JuniorRCBrakePaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** @@ -4106,18 +4110,18 @@ static void JuniorRCBlockBrakePaintSetup( { PaintAddImageAsParent(session, image_id, { 6, 0, height }, { 20, 32, 1 }); - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } else { PaintAddImageAsParent(session, image_id, { 0, 6, height }, { 32, 20, 1 }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } @@ -4126,7 +4130,7 @@ static void JuniorRCBlockBrakePaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AAF80 */ @@ -4143,8 +4147,8 @@ static void JuniorRCLeftEighthToDiagPaintSetup( { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); break; case 4: if (direction == 0) @@ -4152,23 +4156,23 @@ static void JuniorRCLeftEighthToDiagPaintSetup( session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); if (direction == 1) MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); if (direction == 2) MetalASupportsPaintSetup( session, MetalSupportType::ForkAlt, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); if (direction == 3) MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } int32_t blockedSegments = 0; @@ -4199,7 +4203,7 @@ static void JuniorRCLeftEighthToDiagPaintSetup( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AAF90 */ @@ -4216,8 +4220,8 @@ static void JuniorRCRightEighthToDiagPaintSetup( { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); break; case 4: if (direction == 0) @@ -4225,23 +4229,23 @@ static void JuniorRCRightEighthToDiagPaintSetup( session, MetalSupportType::ForkAlt, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); if (direction == 1) MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); if (direction == 2) MetalASupportsPaintSetup( session, MetalSupportType::ForkAlt, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); if (direction == 3) MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } int32_t blockedSegments = 0; @@ -4272,7 +4276,7 @@ static void JuniorRCRightEighthToDiagPaintSetup( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AAFA0 */ @@ -4280,8 +4284,7 @@ static void JuniorRCLeftEighthToOrthogonalPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - const uint8_t map[] = { 4, 2, 3, 1, 0 }; - trackSequence = map[trackSequence]; + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; JuniorRCRightEighthToDiagPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } @@ -4290,8 +4293,7 @@ static void JuniorRCRightEighthToOrthogonalPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - const uint8_t map[] = { 4, 2, 3, 1, 0 }; - trackSequence = map[trackSequence]; + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; JuniorRCLeftEighthToDiagPaintSetup(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } @@ -4390,19 +4392,19 @@ static void JuniorRCLeftEighthToDiagBankPaintSetup( { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); break; case 4: if (direction == 0) MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); if (direction == 1) MetalASupportsPaintSetup( session, MetalSupportType::ForkAlt, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); if (direction == 2) MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); if (direction == 3) MetalASupportsPaintSetup( session, MetalSupportType::ForkAlt, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); @@ -4411,11 +4413,11 @@ static void JuniorRCLeftEighthToDiagBankPaintSetup( if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } int32_t blockedSegments = 0; @@ -4446,7 +4448,7 @@ static void JuniorRCLeftEighthToDiagBankPaintSetup( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr CoordsXY junior_rc_right_eighth_to_diag_bank_bound_lengths[4][4] = { @@ -4544,19 +4546,19 @@ static void JuniorRCRightEighthToDiagBankPaintSetup( { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 0, height, + session.SupportColours); break; case 4: if (direction == 0) MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); if (direction == 1) MetalASupportsPaintSetup( session, MetalSupportType::ForkAlt, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); if (direction == 2) MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); if (direction == 3) MetalASupportsPaintSetup( session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); @@ -4565,11 +4567,11 @@ static void JuniorRCRightEighthToDiagBankPaintSetup( if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } int32_t blockedSegments = 0; @@ -4600,7 +4602,7 @@ static void JuniorRCRightEighthToDiagBankPaintSetup( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB180 */ @@ -4608,8 +4610,7 @@ static void JuniorRCLeftEighthToOrthogonalBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr uint8_t map[] = { 4, 2, 3, 1, 0 }; - trackSequence = map[trackSequence]; + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; JuniorRCRightEighthToDiagBankPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } @@ -4618,8 +4619,7 @@ static void JuniorRCRightEighthToOrthogonalBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr uint8_t map[] = { 4, 2, 3, 1, 0 }; - trackSequence = map[trackSequence]; + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; JuniorRCLeftEighthToDiagBankPaintSetup(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } @@ -4629,20 +4629,8 @@ static void JuniorRCPaintTrackDiagFlat( const TrackElement& trackElement) { auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); - TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_flat[subTypeOffset], - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); - } - - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + TrackPaintUtilDiagTilesPaintExtra( + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_flat[subTypeOffset], kSupportType); } static void JuniorRCTrackDiagBrakes( @@ -4650,19 +4638,19 @@ static void JuniorRCTrackDiagBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_brakes, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_brakes, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void JuniorRCTrackDiagBlockBrakes( @@ -4670,20 +4658,19 @@ static void JuniorRCTrackDiagBlockBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_blockbrakes[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_blockbrakes[trackElement.IsBrakeClosed()], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -4693,19 +4680,19 @@ static void JuniorRCPaintTrackDiag25DegUp( { auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_25_deg_up[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_up[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 8, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 8, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -4715,19 +4702,19 @@ static void JuniorRCPaintTrackDiagFlatTo25DegUp( { auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_flat_to_25_deg_up[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_flat_to_25_deg_up[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void JuniorRCPaintTrackDiagFlatTo60DegUp( @@ -4738,19 +4725,19 @@ static void JuniorRCPaintTrackDiagFlatTo60DegUp( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_flat_to_60_deg_up[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_flat_to_60_deg_up[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height + 6, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } template @@ -4760,19 +4747,19 @@ static void JuniorRCPaintTrackDiag25DegUpToFlat( { auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_25_deg_up_to_flat[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_up_to_flat[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 4, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 4, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void JuniorRCPaintTrackDiag60DegUpToFlat( @@ -4783,19 +4770,19 @@ static void JuniorRCPaintTrackDiag60DegUpToFlat( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_60_deg_up_to_flat[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_60_deg_up_to_flat[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 4, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 4, height + 13, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } template @@ -4805,19 +4792,19 @@ static void JuniorRCPaintTrackDiag25DegDown( { auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_25_deg_down[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_down[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 8, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 8, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } template @@ -4827,20 +4814,19 @@ static void JuniorRCPaintTrackDiagFlatTo25DegDown( { auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_flat_to_25_deg_down[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_flat_to_25_deg_down[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 4, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 4, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void JuniorRCPaintTrackDiagFlatTo60DegDown( @@ -4851,20 +4837,19 @@ static void JuniorRCPaintTrackDiagFlatTo60DegDown( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_flat_to_60_deg_down[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_flat_to_60_deg_down[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 4, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 4, height + 7, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } template @@ -4874,20 +4859,19 @@ static void JuniorRCPaintTrackDiag25DegDownToFlat( { auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_25_deg_down_to_flat[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_down_to_flat[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void JuniorRCPaintTrackDiag60DegDownToFlat( @@ -4898,20 +4882,19 @@ static void JuniorRCPaintTrackDiag60DegDownToFlat( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_60_deg_down_to_flat[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_60_deg_down_to_flat[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AB1C0 */ @@ -4920,8 +4903,8 @@ static void JuniorRCDiagFlatToLeftBankPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_flat_to_left_bank, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_flat_to_left_bank, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (direction == 0 && trackSequence == 1) { @@ -4932,13 +4915,13 @@ static void JuniorRCDiagFlatToLeftBankPaintSetup( if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB1D0 */ @@ -4947,8 +4930,8 @@ static void JuniorRCDiagFlatToRightBankPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_flat_to_right_bank, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_flat_to_right_bank, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (direction == 2 && trackSequence == 2) { @@ -4959,13 +4942,13 @@ static void JuniorRCDiagFlatToRightBankPaintSetup( if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB1E0 */ @@ -4974,8 +4957,8 @@ static void JuniorRCDiagLeftBankToFlatPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_left_bank_to_flat, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_left_bank_to_flat, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (direction == 0 && trackSequence == 1) { @@ -4986,13 +4969,13 @@ static void JuniorRCDiagLeftBankToFlatPaintSetup( if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB1F0 */ @@ -5001,8 +4984,8 @@ static void JuniorRCDiagRightBankToFlatPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_right_bank_to_flat, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_right_bank_to_flat, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (direction == 2 && trackSequence == 2) { @@ -5013,13 +4996,13 @@ static void JuniorRCDiagRightBankToFlatPaintSetup( if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB220 */ @@ -5028,7 +5011,7 @@ static void JuniorRCDiagLeftBankTo25DegUpPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_left_bank_to_25_deg_up, + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_left_bank_to_25_deg_up, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (direction == 0 && trackSequence == 1) @@ -5040,13 +5023,13 @@ static void JuniorRCDiagLeftBankTo25DegUpPaintSetup( if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AB230 */ @@ -5055,7 +5038,7 @@ static void JuniorRCDiagRightBankTo25DegUpPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_right_bank_to_25_deg_up, + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_right_bank_to_25_deg_up, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (direction == 2 && trackSequence == 2) @@ -5067,13 +5050,13 @@ static void JuniorRCDiagRightBankTo25DegUpPaintSetup( if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AB200 */ @@ -5082,7 +5065,7 @@ static void JuniorRCDiag25DegUpToLeftBankPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_25_deg_up_to_left_bank, + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_up_to_left_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (direction == 0 && trackSequence == 1) @@ -5094,13 +5077,13 @@ static void JuniorRCDiag25DegUpToLeftBankPaintSetup( if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 4, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 4, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AB210 */ @@ -5109,7 +5092,7 @@ static void JuniorRCDiag25DegUpToRightBankPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_25_deg_up_to_right_bank, + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_up_to_right_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (direction == 2 && trackSequence == 2) @@ -5121,13 +5104,13 @@ static void JuniorRCDiag25DegUpToRightBankPaintSetup( if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 4, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 4, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AB200 */ @@ -5136,8 +5119,8 @@ static void JuniorRCDiagLeftBankTo25DegDownPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_left_bank_to_25_deg_down, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_left_bank_to_25_deg_down, + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (direction == 0 && trackSequence == 1) { @@ -5148,13 +5131,13 @@ static void JuniorRCDiagLeftBankTo25DegDownPaintSetup( if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 4, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 4, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AB210 */ @@ -5163,8 +5146,8 @@ static void JuniorRCDiagRightBankTo25DegDownPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_right_bank_to_25_deg_down, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_right_bank_to_25_deg_down, + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (direction == 2 && trackSequence == 2) { @@ -5175,13 +5158,13 @@ static void JuniorRCDiagRightBankTo25DegDownPaintSetup( if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 4, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 4, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AB220 */ @@ -5190,8 +5173,8 @@ static void JuniorRCDiag25DegDownToLeftBankPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_25_deg_down_to_left_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_down_to_left_bank, + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (direction == 0 && trackSequence == 1) { @@ -5202,13 +5185,13 @@ static void JuniorRCDiag25DegDownToLeftBankPaintSetup( if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AB230 */ @@ -5217,8 +5200,8 @@ static void JuniorRCDiag25DegDownToRightBankPaintSetup( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_25_deg_down_to_right_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_down_to_right_bank, + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (direction == 2 && trackSequence == 2) { @@ -5229,13 +5212,13 @@ static void JuniorRCDiag25DegDownToRightBankPaintSetup( if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static constexpr CoordsXYZ junior_rc_diag_left_bank_bound_offsets[4] = { @@ -5259,19 +5242,19 @@ static void JuniorRCDiagLeftBankPaintSetup( { uint8_t thickness = direction == 0 ? 0 : 1; TrackPaintUtilDiagTilesPaint( - session, thickness, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_left_bank, - defaultDiagTileOffsets, defaultDiagBoundLengths, junior_rc_diag_left_bank_bound_offsets); + session, thickness, height, direction, trackSequence, junior_rc_track_pieces_diag_left_bank, defaultDiagTileOffsets, + defaultDiagBoundLengths, junior_rc_diag_left_bank_bound_offsets); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AB1B0 */ @@ -5281,19 +5264,19 @@ static void JuniorRCDiagRightBankPaintSetup( { uint8_t thickness = direction == 2 ? 0 : 1; TrackPaintUtilDiagTilesPaint( - session, thickness, height, direction, trackSequence, session.TrackColours, junior_rc_track_pieces_diag_right_bank, - defaultDiagTileOffsets, defaultDiagBoundLengths, junior_rc_diag_right_bank_bound_offsets); + session, thickness, height, direction, trackSequence, junior_rc_track_pieces_diag_right_bank, defaultDiagTileOffsets, + defaultDiagBoundLengths, junior_rc_diag_right_bank_bound_offsets); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 0, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 0, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr CoordsXY junior_rc_60_deg_up_bound_offsets[4] = { @@ -5341,16 +5324,16 @@ static void JuniorRCPaintTrack60DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 56, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 56, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 56, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 56, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } @@ -5358,7 +5341,7 @@ static void JuniorRCPaintTrack60DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, support[direction & 3], height, session.SupportColours); } @@ -5367,7 +5350,7 @@ static void JuniorRCPaintTrack60DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void JuniorRC60DegDownPaintSetup( @@ -5427,16 +5410,16 @@ static void JuniorRCPaintTrack25DegUpTo60DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } @@ -5444,7 +5427,7 @@ static void JuniorRCPaintTrack25DegUpTo60DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, support[direction & 3], height, session.SupportColours); } @@ -5453,7 +5436,7 @@ static void JuniorRCPaintTrack25DegUpTo60DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void JuniorRC60DegDownTo25DegDownPaintSetup( @@ -5492,24 +5475,24 @@ static void JuniorRCPaintTrack60DegUpTo25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 20, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 20, height, + session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -5517,7 +5500,7 @@ static void JuniorRCPaintTrack60DegUpTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void JuniorRC25DegDownTo60DegDownPaintSetup( @@ -5535,19 +5518,19 @@ static void JuniorRCPaintTrackDiag60DegUp( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_60_deg_up[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_60_deg_up[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 36, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 36, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void JuniorRCPaintTrackDiag60DegDown( @@ -5558,19 +5541,19 @@ static void JuniorRCPaintTrackDiag60DegDown( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_60_deg_down[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_60_deg_down[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 28, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 28, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void JuniorRCPaintTrackDiag25DegUpTo60DegUp( @@ -5581,20 +5564,19 @@ static void JuniorRCPaintTrackDiag25DegUpTo60DegUp( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_25_deg_up_to_60_deg_up[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_up_to_60_deg_up[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 16, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 16, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void JuniorRCPaintTrackDiag60DegUpTo25DegUp( @@ -5614,21 +5596,20 @@ static void JuniorRCPaintTrackDiag60DegUpTo25DegUp( else { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_60_deg_up_to_25_deg_up[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_60_deg_up_to_25_deg_up[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); } if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 21, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 21, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void JuniorRCPaintTrackDiag25DegDownTo60DegDown( @@ -5648,21 +5629,20 @@ static void JuniorRCPaintTrackDiag25DegDownTo60DegDown( else { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_25_deg_down_to_60_deg_down[subTypeOffset], defaultDiagTileOffsets, - defaultDiagBoundLengths, nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_25_deg_down_to_60_deg_down[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); } if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 17, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 17, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void JuniorRCPaintTrackDiag60DegDownTo25DegDown( @@ -5673,20 +5653,19 @@ static void JuniorRCPaintTrackDiag60DegDownTo25DegDown( auto subTypeOffset = JuniorRCGetSubTypeOffset(trackElement); TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, - junior_rc_track_pieces_diag_60_deg_down_to_25_deg_down[subTypeOffset], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_60_deg_down_to_25_deg_down[subTypeOffset], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalBSupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, DiagSupportPlacement[direction], 8, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, kDiagSupportPlacement[direction], 8, height, + session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static constexpr CoordsXY junior_rc_flat_to_60_deg_up_bound_lengths[4][2] = { @@ -5751,16 +5730,16 @@ static void JuniorRCFlatTo60DegUpPaintSetup( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_1); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeStart); break; } @@ -5768,8 +5747,8 @@ static void JuniorRCFlatTo60DegUpPaintSetup( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, - support[direction], height - 7, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, support[direction], + height - 7, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -5777,7 +5756,7 @@ static void JuniorRCFlatTo60DegUpPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void JuniorRC60DegDownToFlatPaintSetup( @@ -5814,24 +5793,24 @@ static void JuniorRC60DegUpToFlatPaintSetup( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_1); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeStart); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork, MetalSupportPlace::Centre, 20, - height - 5, session.SupportColours); + session, (direction & 1) ? MetalSupportType::ForkAlt : kSupportType, MetalSupportPlace::Centre, 20, height - 5, + session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -5839,7 +5818,7 @@ static void JuniorRC60DegUpToFlatPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void JuniorRCFlatTo60DegDownPaintSetup( @@ -5885,19 +5864,19 @@ static void JuniorRCBoosterPaintSetup( PaintAddImageAsParent( session, session.TrackColours.WithIndex(SPR_JUNIOR_RC_BOOSTER_NE_SW), { 0, 0, height }, { 20, 32, 1 }); - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } else { PaintAddImageAsParent( session, session.TrackColours.WithIndex(SPR_JUNIOR_RC_BOOSTER_NW_SE), { 0, 0, height }, { 32, 20, 1 }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : MetalSupportType::Fork; + auto supportType = (direction & 1) ? MetalSupportType::ForkAlt : kSupportType; MetalASupportsPaintSetup(session, supportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } @@ -5906,7 +5885,7 @@ static void JuniorRCBoosterPaintSetup( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void JuniorRCTrackOnRidePhoto( @@ -5917,14 +5896,14 @@ static void JuniorRCTrackOnRidePhoto( constexpr int8_t photoCameraOffset = -1; PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height + photoCameraOffset }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height + photoCameraOffset, session.SupportColours, MetalSupportType::Fork, 6); + DrawSupportsSideBySide(session, direction, height + photoCameraOffset, session.SupportColours, kSupportType, 6); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); TrackPaintUtilOnridePhotoPaint(session, direction, height + 3 + photoCameraOffset, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48 + photoCameraOffset, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48 + photoCameraOffset); } /* 0x008AAA0C */ diff --git a/src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp b/src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp index def663e08e..031b5cd9a9 100644 --- a/src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp +++ b/src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp @@ -12,19 +12,31 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" -static constexpr const uint32_t LaydownDiagBrakeImages[NumOrthogonalDirections] = { +#include "CorkscrewRollerCoaster.hpp" + +static constexpr MetalSupportType kSupportType = MetalSupportType::TubesInverted; + +static constexpr ImageIndex kLaydownDiagFlatImages[2][kNumOrthogonalDirections] = { + { 26781, 26782, 26783, 26784 }, + { 26809, 26810, 26811, 26812 }, +}; + +static constexpr ImageIndex kLaydownDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_SLC_DIAG_BRAKES, SPR_G2_SLC_DIAG_BRAKES + 2, SPR_G2_SLC_DIAG_BRAKES, SPR_G2_SLC_DIAG_BRAKES + 2, }; -static constexpr const uint32_t LaydownDiagBlockBrakeImages[2][NumOrthogonalDirections] = { +static constexpr ImageIndex kLaydownDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_SLC_DIAG_BRAKES, SPR_G2_SLC_DIAG_BRAKES + 2, @@ -81,19 +93,14 @@ static void LayDownRCTrackFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00824B8C, 0x00824B9C, 0x00824BAC */ @@ -117,11 +124,11 @@ static void LayDownRCTrackStation( 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, MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0082492C */ @@ -182,47 +189,39 @@ static void LayDownRCTrack25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 51, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 51, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 51, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 51, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0082493C */ @@ -255,18 +254,14 @@ static void LayDownRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x0082494C */ @@ -327,47 +322,39 @@ static void LayDownRCTrackFlatTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 43, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 43, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 43, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 43, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 43, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0082495C */ @@ -406,18 +393,14 @@ static void LayDownRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x0082496C */ @@ -455,47 +438,39 @@ static void LayDownRCTrack60DegUpTo25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 65, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 65, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 65, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 65, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 65, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x0082497C */ @@ -556,47 +531,39 @@ static void LayDownRCTrack25DegUpToFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 41, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 41, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 41, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 41, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0082498C */ @@ -687,17 +654,16 @@ static void LayDownRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -731,7 +697,7 @@ static void LayDownRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -765,10 +731,10 @@ static void LayDownRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -802,7 +768,7 @@ static void LayDownRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -837,19 +803,18 @@ static void LayDownRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -859,7 +824,7 @@ static void LayDownRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LayDownRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -902,12 +867,11 @@ static void LayDownRCTrackFlatToLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00824A1C */ @@ -949,12 +913,11 @@ static void LayDownRCTrackFlatToRightBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00824A2C */ @@ -996,12 +959,11 @@ static void LayDownRCTrackLeftBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00824A3C */ @@ -1043,12 +1005,11 @@ static void LayDownRCTrackRightBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00824A4C */ @@ -1091,17 +1052,16 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1133,7 +1093,7 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1166,10 +1126,10 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1201,7 +1161,7 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1236,19 +1196,18 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1258,7 +1217,7 @@ static void LayDownRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LayDownRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1305,36 +1264,32 @@ static void LayDownRCTrackLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 41, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 41, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 41, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 41, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00824A7C */ @@ -1380,36 +1335,32 @@ static void LayDownRCTrackRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 41, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 41, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 41, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 41, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00824A8C */ @@ -1455,36 +1406,32 @@ static void LayDownRCTrack25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 41, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 41, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 41, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 41, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x00824A9C */ @@ -1530,36 +1477,32 @@ static void LayDownRCTrack25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 41, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 41, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 41, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 41, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x00824AAC */ @@ -1633,12 +1576,11 @@ static void LayDownRCTrackLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00824AFC */ @@ -1685,17 +1627,16 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1725,7 +1666,7 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1755,10 +1696,10 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1788,7 +1729,7 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1819,19 +1760,18 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1872,17 +1812,16 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1912,7 +1851,7 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1941,10 +1880,10 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1974,7 +1913,7 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -2005,19 +1944,18 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2027,7 +1965,7 @@ static void LayDownRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LayDownRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2036,7 +1974,7 @@ static void LayDownRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LayDownRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2080,14 +2018,13 @@ static void LayDownRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2126,17 +2063,15 @@ static void LayDownRCTrackSBendLeft( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2175,17 +2110,15 @@ static void LayDownRCTrackSBendLeft( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2220,19 +2153,18 @@ static void LayDownRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2277,14 +2209,13 @@ static void LayDownRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2323,17 +2254,15 @@ static void LayDownRCTrackSBendRight( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2372,17 +2301,15 @@ static void LayDownRCTrackSBendRight( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2417,19 +2344,18 @@ static void LayDownRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2474,17 +2400,16 @@ static void LayDownRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2518,7 +2443,7 @@ static void LayDownRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2553,19 +2478,18 @@ static void LayDownRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2575,7 +2499,7 @@ static void LayDownRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LayDownRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2619,17 +2543,16 @@ static void LayDownRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2663,7 +2586,7 @@ static void LayDownRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2698,19 +2621,18 @@ static void LayDownRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2720,7 +2642,7 @@ static void LayDownRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LayDownRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2760,20 +2682,19 @@ static void LayDownRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -2804,19 +2725,18 @@ static void LayDownRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2857,20 +2777,19 @@ static void LayDownRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -2901,19 +2820,18 @@ static void LayDownRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2923,7 +2841,7 @@ static void LayDownRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LayDownRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2932,7 +2850,7 @@ static void LayDownRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LayDownRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2977,9 +2895,10 @@ static void LayDownRCTrackLeftQuarterTurn160DegUp( break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::StandardSlopeStart, +56, TunnelType::StandardSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x00824D1C */ @@ -3023,9 +2942,10 @@ static void LayDownRCTrackRightQuarterTurn160DegUp( break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::StandardSlopeStart, +56, TunnelType::StandardSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x00824D2C */ @@ -3065,19 +2985,14 @@ static void LayDownRCTrackBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00824D6C */ @@ -3085,7 +3000,7 @@ static void LayDownRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -3111,9 +3026,9 @@ static void LayDownRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x00824D8C */ @@ -3149,18 +3064,14 @@ static void LayDownRCTrackLeftEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3194,7 +3105,7 @@ static void LayDownRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3228,7 +3139,7 @@ static void LayDownRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -3239,7 +3150,7 @@ static void LayDownRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3278,27 +3189,23 @@ static void LayDownRCTrackLeftEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3336,18 +3243,14 @@ static void LayDownRCTrackRightEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3381,7 +3284,7 @@ static void LayDownRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3415,7 +3318,7 @@ static void LayDownRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -3426,7 +3329,7 @@ static void LayDownRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3465,27 +3368,23 @@ static void LayDownRCTrackRightEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3548,14 +3447,13 @@ static void LayDownRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3589,7 +3487,7 @@ static void LayDownRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3623,7 +3521,7 @@ static void LayDownRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -3634,7 +3532,7 @@ static void LayDownRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3673,27 +3571,23 @@ static void LayDownRCTrackLeftEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3738,14 +3632,13 @@ static void LayDownRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3779,7 +3672,7 @@ static void LayDownRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3813,7 +3706,7 @@ static void LayDownRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -3824,7 +3717,7 @@ static void LayDownRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3863,27 +3756,23 @@ static void LayDownRCTrackRightEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3911,175 +3800,55 @@ static void LayDownRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26812), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26784), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26809), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26781), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26811), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26783), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26810), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26782), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } + constexpr CoordsXYZ boundsOffsets[kNumOrthogonalDirections] = { + { -16, -16, -2 }, + { -16, -16, -2 }, + { -16, -16, -2 }, + { -16, -16, -2 }, + }; + const auto* images = kLaydownDiagFlatImages[trackElement.HasChain()]; + TrackPaintUtilDiagTilesPaint( + session, 3, height + 24, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, + boundsOffsets); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + if (trackSequence == 3) + MetalASupportsPaintSetupRotated( + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 0, height + 33, session.SupportColours); + + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void LayDownRCTrackDiagBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; TrackPaintUtilDiagTilesPaint( - session, -3, height + 24, direction, trackSequence, session.TrackColours, LaydownDiagBrakeImages, + session, -3, height + 24, direction, trackSequence, kLaydownDiagBrakeImages, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); + + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); + + if (trackSequence == 3) + { + MetalASupportsPaintSetup( + session, kSupportType, kDiagSupportPlacement[direction], 0, height + 33, session.SupportColours); + } + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); +} + +static void LayDownRCTrackDiagBlockBrakes( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; + + TrackPaintUtilDiagTilesPaint( + session, -3, height + 24, direction, trackSequence, kLaydownDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -4087,29 +3856,9 @@ static void LayDownRCTrackDiagBrakes( if (trackSequence == 3) { MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 33, session.SupportColours); + session, kSupportType, kDiagSupportPlacement[direction], 0, height + 33, session.SupportColours); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); -} - -static void LayDownRCTrackDiagBlockBrakes( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; - - TrackPaintUtilDiagTilesPaint( - session, -3, height + 24, direction, trackSequence, session.TrackColours, - LaydownDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); - - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 33, session.SupportColours); - } - PaintUtilSetGeneralSupportHeight(session, height + 33, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 33); } /** rct2: 0x00824E2C */ @@ -4150,7 +3899,7 @@ static void LayDownRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -4182,7 +3931,7 @@ static void LayDownRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -4215,7 +3964,7 @@ static void LayDownRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -4253,27 +4002,23 @@ static void LayDownRCTrackDiag25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 45, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 45, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 45, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 45, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -4302,7 +4047,7 @@ static void LayDownRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -4320,7 +4065,7 @@ static void LayDownRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -4339,7 +4084,7 @@ static void LayDownRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -4363,27 +4108,23 @@ static void LayDownRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height + 33, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height + 33, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height + 33, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -4426,7 +4167,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -4458,7 +4199,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -4491,7 +4232,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -4529,27 +4270,23 @@ static void LayDownRCTrackDiagFlatTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 37, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 37, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 37, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 37, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4578,7 +4315,7 @@ static void LayDownRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -4596,7 +4333,7 @@ static void LayDownRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -4615,7 +4352,7 @@ static void LayDownRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -4639,27 +4376,23 @@ static void LayDownRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height + 33, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height + 33, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height + 33, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -4688,7 +4421,7 @@ static void LayDownRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -4706,7 +4439,7 @@ static void LayDownRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -4725,7 +4458,7 @@ static void LayDownRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -4749,27 +4482,23 @@ static void LayDownRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height + 33, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height + 33, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height + 33, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -4812,7 +4541,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -4844,7 +4573,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -4877,7 +4606,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -4915,27 +4644,23 @@ static void LayDownRCTrackDiag25DegUpToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -4964,7 +4689,7 @@ static void LayDownRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -4982,7 +4707,7 @@ static void LayDownRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -5001,7 +4726,7 @@ static void LayDownRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -5025,27 +4750,23 @@ static void LayDownRCTrackDiag25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 45, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 45, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 45, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 45, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -5074,7 +4795,7 @@ static void LayDownRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -5092,7 +4813,7 @@ static void LayDownRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -5111,7 +4832,7 @@ static void LayDownRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -5135,27 +4856,23 @@ static void LayDownRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height + 33, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height + 33, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height + 33, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -5242,29 +4959,25 @@ static void LayDownRCTrackDiagFlatTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00824E9C */ @@ -5291,7 +5004,7 @@ static void LayDownRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -5309,7 +5022,7 @@ static void LayDownRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5328,7 +5041,7 @@ static void LayDownRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -5352,27 +5065,23 @@ static void LayDownRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height + 33, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height + 33, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height + 33, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5401,7 +5110,7 @@ static void LayDownRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -5419,7 +5128,7 @@ static void LayDownRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5438,7 +5147,7 @@ static void LayDownRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -5462,27 +5171,23 @@ static void LayDownRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height + 33, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height + 33, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height + 33, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5511,7 +5216,7 @@ static void LayDownRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5529,7 +5234,7 @@ static void LayDownRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5548,7 +5253,7 @@ static void LayDownRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -5572,27 +5277,23 @@ static void LayDownRCTrackDiag25DegDownToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 37, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 37, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 37, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 37, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5621,7 +5322,7 @@ static void LayDownRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5639,7 +5340,7 @@ static void LayDownRCTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5658,7 +5359,7 @@ static void LayDownRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5682,27 +5383,23 @@ static void LayDownRCTrackDiagFlatToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5731,7 +5428,7 @@ static void LayDownRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5749,7 +5446,7 @@ static void LayDownRCTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5768,7 +5465,7 @@ static void LayDownRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5792,27 +5489,23 @@ static void LayDownRCTrackDiagFlatToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5841,7 +5534,7 @@ static void LayDownRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5859,7 +5552,7 @@ static void LayDownRCTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5878,7 +5571,7 @@ static void LayDownRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5902,27 +5595,23 @@ static void LayDownRCTrackDiagLeftBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5951,7 +5640,7 @@ static void LayDownRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5969,7 +5658,7 @@ static void LayDownRCTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5988,7 +5677,7 @@ static void LayDownRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6012,27 +5701,23 @@ static void LayDownRCTrackDiagRightBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6061,7 +5746,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6079,7 +5764,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6098,7 +5783,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -6122,27 +5807,23 @@ static void LayDownRCTrackDiagLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 37, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 37, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 37, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 37, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6171,7 +5852,7 @@ static void LayDownRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6189,7 +5870,7 @@ static void LayDownRCTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6208,7 +5889,7 @@ static void LayDownRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -6232,27 +5913,23 @@ static void LayDownRCTrackDiagRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 37, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 37, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 37, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 37, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6281,7 +5958,7 @@ static void LayDownRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -6299,7 +5976,7 @@ static void LayDownRCTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -6318,7 +5995,7 @@ static void LayDownRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -6342,27 +6019,23 @@ static void LayDownRCTrackDiag25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6391,7 +6064,7 @@ static void LayDownRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -6409,7 +6082,7 @@ static void LayDownRCTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -6428,7 +6101,7 @@ static void LayDownRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -6452,27 +6125,23 @@ static void LayDownRCTrackDiag25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6559,29 +6228,25 @@ static void LayDownRCTrackDiagLeftBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00824F7C */ @@ -6666,29 +6331,25 @@ static void LayDownRCTrackDiagRightBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 39, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 39, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 39, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 39, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00824F8C */ @@ -6715,7 +6376,7 @@ static void LayDownRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6733,7 +6394,7 @@ static void LayDownRCTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6752,7 +6413,7 @@ static void LayDownRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -6776,27 +6437,23 @@ static void LayDownRCTrackDiag25DegDownToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 37, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 37, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 37, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 37, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6825,7 +6482,7 @@ static void LayDownRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6843,7 +6500,7 @@ static void LayDownRCTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6862,7 +6519,7 @@ static void LayDownRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -6886,27 +6543,23 @@ static void LayDownRCTrackDiag25DegDownToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 37, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 37, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 37, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 37, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6935,7 +6588,7 @@ static void LayDownRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6953,7 +6606,7 @@ static void LayDownRCTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6972,7 +6625,7 @@ static void LayDownRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6996,27 +6649,23 @@ static void LayDownRCTrackDiagLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7045,7 +6694,7 @@ static void LayDownRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7063,7 +6712,7 @@ static void LayDownRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7082,7 +6731,7 @@ static void LayDownRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -7106,27 +6755,23 @@ static void LayDownRCTrackDiagRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 33, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 33, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 33, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 33, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7168,14 +6813,13 @@ static void LayDownRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7206,7 +6850,7 @@ static void LayDownRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7228,15 +6872,14 @@ static void LayDownRCTrackLeftFlyerTwistDown( session, direction, session.TrackColours.WithIndex(26978), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7247,7 +6890,7 @@ static void LayDownRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7288,14 +6931,13 @@ static void LayDownRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7325,7 +6967,7 @@ static void LayDownRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7347,15 +6989,14 @@ static void LayDownRCTrackRightFlyerTwistDown( session, direction, session.TrackColours.WithIndex(26990), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7366,7 +7007,7 @@ static void LayDownRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7400,14 +7041,11 @@ static void LayDownRCTrackFlyerHalfLoopDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -7439,7 +7077,7 @@ static void LayDownRCTrackFlyerHalfLoopDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 2: switch (direction) @@ -7449,35 +7087,31 @@ static void LayDownRCTrackFlyerHalfLoopDown( session, direction, session.TrackColours.WithIndex(16595), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16603), { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 15, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16600), { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16608), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -7499,18 +7133,14 @@ static void LayDownRCTrackFlyerHalfLoopDown( session, direction, session.TrackColours.WithIndex(16609), { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7555,14 +7185,13 @@ static void LayDownRCTrackLeftFlyerCorkscrewDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -7589,7 +7218,7 @@ static void LayDownRCTrackLeftFlyerCorkscrewDown( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7615,15 +7244,14 @@ static void LayDownRCTrackLeftFlyerCorkscrewDown( { { 6, 0, height + 4 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7634,7 +7262,7 @@ static void LayDownRCTrackLeftFlyerCorkscrewDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7644,7 +7272,7 @@ static void LayDownRCTrackRightFlyerCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftFlyerCorkscrewUp); + auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftFlyerCorkscrewUp); function(session, ride, 2 - trackSequence, (direction + 3) % 4, height, trackElement); return; } @@ -7670,19 +7298,14 @@ static void LayDownRCTrackBlockBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( @@ -7724,17 +7347,16 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -7768,7 +7390,7 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -7802,10 +7424,10 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -7839,7 +7461,7 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -7874,19 +7496,18 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7930,17 +7551,16 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -7974,7 +7594,7 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8007,10 +7627,10 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -8044,7 +7664,7 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -8079,19 +7699,18 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8135,17 +7754,16 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8179,7 +7797,7 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8213,10 +7831,10 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -8250,7 +7868,7 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -8285,19 +7903,18 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8341,17 +7958,16 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8385,7 +8001,7 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8418,10 +8034,10 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -8455,7 +8071,7 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -8490,19 +8106,18 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8539,39 +8154,32 @@ static void LayDownRCTrackHalfLoopInvertedUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 56, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 56, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 56, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 56, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -8598,7 +8206,7 @@ static void LayDownRCTrackHalfLoopInvertedUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -8632,7 +8240,7 @@ static void LayDownRCTrackHalfLoopInvertedUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -8660,14 +8268,11 @@ static void LayDownRCTrackHalfLoopInvertedUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } diff --git a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp index 90b1e98392..e521bc60e6 100644 --- a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp @@ -12,18 +12,23 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + static constexpr uint32_t LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_OPEN = 15020; static constexpr uint32_t LIM_LAUNCHED_RC_BLOCK_BRAKE_NW_SE_OPEN = 15021; static constexpr uint32_t LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_CLOSED = 15022; static constexpr uint32_t LIM_LAUNCHED_RC_BLOCK_BRAKE_NW_SE_CLOSED = 15023; -static constexpr uint32_t _LimLauncherBlockBrakeImages[NumOrthogonalDirections][2] = { +static constexpr uint32_t _LimLauncherBlockBrakeImages[kNumOrthogonalDirections][2] = { { LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_OPEN, LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_CLOSED }, { LIM_LAUNCHED_RC_BLOCK_BRAKE_NW_SE_OPEN, LIM_LAUNCHED_RC_BLOCK_BRAKE_NW_SE_CLOSED }, { LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_OPEN, LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_CLOSED }, @@ -58,11 +63,11 @@ static void LimLaunchedRCTrackStation( PaintAddImageAsParentRotated( session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A65E0 */ @@ -79,30 +84,30 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15388), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15396), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15395), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15403), { 0, 6, height }, { 32, 20, 7 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -112,7 +117,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -142,7 +147,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -176,7 +181,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -206,13 +211,13 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -242,7 +247,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -276,7 +281,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -306,7 +311,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -315,34 +320,34 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15395), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15403), { 0, 6, height }, { 32, 20, 7 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15388), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15396), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } PaintUtilSetSegmentSupportHeight( @@ -353,7 +358,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -385,13 +390,12 @@ static void LimLaunchedRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15404), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -413,7 +417,7 @@ static void LimLaunchedRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15405), { 0, 0, height }, { 32, 26, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -439,7 +443,7 @@ static void LimLaunchedRCTrackRightVerticalLoop( { { 16, 0, height }, { 2, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -461,13 +465,13 @@ static void LimLaunchedRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15407), { 0, 0, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -489,7 +493,7 @@ static void LimLaunchedRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15408), { 0, 16, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -515,7 +519,7 @@ static void LimLaunchedRCTrackRightVerticalLoop( { { 10, 16, height }, { 4, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -537,7 +541,7 @@ static void LimLaunchedRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15410), { 0, 6, height }, { 32, 26, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -559,18 +563,17 @@ static void LimLaunchedRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15411), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } @@ -620,11 +623,10 @@ static void LimLaunchedRCTrackLeftTwistDownToUp( { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -634,7 +636,7 @@ static void LimLaunchedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -680,7 +682,7 @@ static void LimLaunchedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -721,10 +723,10 @@ static void LimLaunchedRCTrackLeftTwistDownToUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 32, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height - 32, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height - 32, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height - 32, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -735,7 +737,7 @@ static void LimLaunchedRCTrackLeftTwistDownToUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height, 0x20); + PaintUtilSetGeneralSupportHeight(session, height); break; } } @@ -783,11 +785,10 @@ static void LimLaunchedRCTrackRightTwistDownToUp( { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -797,7 +798,7 @@ static void LimLaunchedRCTrackRightTwistDownToUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -843,7 +844,7 @@ static void LimLaunchedRCTrackRightTwistDownToUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -884,10 +885,10 @@ static void LimLaunchedRCTrackRightTwistDownToUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 32, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 32, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 32, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 32, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -898,7 +899,7 @@ static void LimLaunchedRCTrackRightTwistDownToUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height, 0x20); + PaintUtilSetGeneralSupportHeight(session, height); break; } } @@ -948,7 +949,7 @@ static void LimLaunchedRCTrackLeftTwistUpToDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 32, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 32, TunnelType::InvertedFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -958,7 +959,7 @@ static void LimLaunchedRCTrackLeftTwistUpToDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height, 0x20); + PaintUtilSetGeneralSupportHeight(session, height); break; case 1: switch (direction) @@ -1004,7 +1005,7 @@ static void LimLaunchedRCTrackLeftTwistUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1042,15 +1043,14 @@ static void LimLaunchedRCTrackLeftTwistUpToDown( { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1061,7 +1061,7 @@ static void LimLaunchedRCTrackLeftTwistUpToDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1111,7 +1111,7 @@ static void LimLaunchedRCTrackRightTwistUpToDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::InvertedFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1121,7 +1121,7 @@ static void LimLaunchedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -1167,7 +1167,7 @@ static void LimLaunchedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1205,15 +1205,14 @@ static void LimLaunchedRCTrackRightTwistUpToDown( { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1224,7 +1223,7 @@ static void LimLaunchedRCTrackRightTwistUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1265,9 +1264,9 @@ static void LimLaunchedRCTrackLeftCorkscrewUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -1294,7 +1293,7 @@ static void LimLaunchedRCTrackLeftCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1329,19 +1328,18 @@ static void LimLaunchedRCTrackLeftCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1377,11 +1375,10 @@ static void LimLaunchedRCTrackRightCorkscrewUp( { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1391,7 +1388,7 @@ static void LimLaunchedRCTrackRightCorkscrewUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -1418,7 +1415,7 @@ static void LimLaunchedRCTrackRightCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1453,19 +1450,18 @@ static void LimLaunchedRCTrackRightCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1508,16 +1504,11 @@ static void LimLaunchedRCTrackBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A6C10 */ @@ -1553,11 +1544,8 @@ static void LimLaunchedRCTrack90DegUp( } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -1605,15 +1593,12 @@ static void LimLaunchedRCTrack60DegUpTo90DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: break; @@ -1659,18 +1644,14 @@ static void LimLaunchedRCTrack90DegUpTo60DegUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::StandardSlopeEnd); break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); } /** rct2: 0x008A6C60 */ @@ -1706,14 +1687,11 @@ static void LimLaunchedRCTrack60DegDownTo90DegDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: break; @@ -1756,7 +1734,7 @@ static void LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -1787,7 +1765,7 @@ static void LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -1815,14 +1793,14 @@ static void LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1847,16 +1825,11 @@ static void LimLaunchedRCTrackBlockBrakes( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void LimLaunchedRCTrackLeftQuarterTurn190DegUp( @@ -1897,11 +1870,8 @@ static void LimLaunchedRCTrackLeftQuarterTurn190DegUp( } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -1947,11 +1917,8 @@ static void LimLaunchedRCTrackRightQuarterTurn190DegUp( } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -1991,8 +1958,7 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 1), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height + 1, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2002,8 +1968,7 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 7), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height + 1, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2013,7 +1978,7 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 13), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 1, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 1, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2023,12 +1988,12 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 19), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2038,7 +2003,7 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2084,7 +2049,7 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2125,10 +2090,10 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2139,7 +2104,7 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2161,7 +2126,7 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 25), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2171,8 +2136,7 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 31), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 1, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2182,8 +2146,7 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 37), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height + 1, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2193,12 +2156,12 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 43), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height + 1, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height + 1, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2208,7 +2171,7 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2254,7 +2217,7 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2295,10 +2258,10 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2309,7 +2272,7 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2358,18 +2321,14 @@ static void LimLaunchedRCTrackHalfLoopUp( { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2379,32 +2338,32 @@ static void LimLaunchedRCTrackHalfLoopUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 1), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 5), { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 9), { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 13), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2438,7 +2397,7 @@ static void LimLaunchedRCTrackHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2466,14 +2425,11 @@ static void LimLaunchedRCTrackHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2517,19 +2473,15 @@ static void LimLaunchedRCTrackFlatTo60DegUpLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -2557,15 +2509,11 @@ static void LimLaunchedRCTrackFlatTo60DegUpLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2593,15 +2541,11 @@ static void LimLaunchedRCTrackFlatTo60DegUpLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -2629,24 +2573,20 @@ static void LimLaunchedRCTrackFlatTo60DegUpLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 19, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 19, height, session.SupportColours); } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; } } @@ -2682,19 +2622,15 @@ static void LimLaunchedRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 24, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 24, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: switch (direction) @@ -2722,15 +2658,11 @@ static void LimLaunchedRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 18, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 18, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 2: switch (direction) @@ -2758,15 +2690,11 @@ static void LimLaunchedRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 13, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -2794,24 +2722,20 @@ static void LimLaunchedRCTrack60DegUpToFlatLongBase( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -2861,12 +2785,11 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2876,7 +2799,7 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -2886,30 +2809,28 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 1), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 34, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 34, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 6), { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 22, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 22, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 11), { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 24, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 16), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2920,7 +2841,7 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -2954,10 +2875,10 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -2975,36 +2896,32 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 3), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 56, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 8), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 56, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 13), { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 56, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 18), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 56, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: switch (direction) @@ -3042,13 +2959,13 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3084,12 +3001,11 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3099,7 +3015,7 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -3109,30 +3025,28 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 21), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 26), { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 24, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 31), { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 22, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 22, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 36), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 34, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 34, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3143,7 +3057,7 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -3177,10 +3091,10 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -3198,35 +3112,31 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 23), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 56, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 28), { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 56, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 33), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 56, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 38), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 56, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: switch (direction) @@ -3264,13 +3174,13 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3320,19 +3230,15 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3367,7 +3273,7 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::topCorner), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3377,30 +3283,28 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 2), { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 7), { 0, 0, height }, { { 29, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 12), { 0, 0, height }, { { 31, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 18, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 18, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 17), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 14, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3411,7 +3315,7 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 3: switch (direction) @@ -3445,7 +3349,7 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 4: switch (direction) @@ -3483,9 +3387,9 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3521,19 +3425,15 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3568,7 +3468,7 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3578,30 +3478,28 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 22), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 27), { 0, 0, height }, { { 30, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 18, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 18, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 32), { 0, 0, height }, { { 29, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 37), { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 14, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3612,7 +3510,7 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 3: switch (direction) @@ -3647,7 +3545,7 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 4: switch (direction) @@ -3684,9 +3582,9 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( 0xFFFF, 0); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3722,7 +3620,7 @@ static void LimLaunchedRCTrackLeftZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 1), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3732,34 +3630,31 @@ static void LimLaunchedRCTrackLeftZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 5), { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 8), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 12), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -3793,7 +3688,7 @@ static void LimLaunchedRCTrackLeftZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3828,10 +3723,10 @@ static void LimLaunchedRCTrackLeftZeroGRollUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3842,9 +3737,8 @@ static void LimLaunchedRCTrackLeftZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -3863,14 +3757,14 @@ static void LimLaunchedRCTrackRightZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 16), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 20), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3880,7 +3774,7 @@ static void LimLaunchedRCTrackRightZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 25), { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3890,19 +3784,16 @@ static void LimLaunchedRCTrackRightZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 29), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -3936,7 +3827,7 @@ static void LimLaunchedRCTrackRightZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3971,10 +3862,10 @@ static void LimLaunchedRCTrackRightZeroGRollUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3985,9 +3876,8 @@ static void LimLaunchedRCTrackRightZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -4039,18 +3929,14 @@ static void LimLaunchedRCTrackLeftLargeZeroGRollUp( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 25, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 25, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -4080,11 +3966,8 @@ static void LimLaunchedRCTrackLeftLargeZeroGRollUp( break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -4121,7 +4004,7 @@ static void LimLaunchedRCTrackLeftLargeZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -4139,16 +4022,14 @@ static void LimLaunchedRCTrackLeftLargeZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 4), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 28, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 8), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 28, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4158,28 +4039,26 @@ static void LimLaunchedRCTrackLeftLargeZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 14), { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 28, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 19), { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 28, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -4217,18 +4096,14 @@ static void LimLaunchedRCTrackRightLargeZeroGRollUp( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 25, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 25, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -4258,11 +4133,8 @@ static void LimLaunchedRCTrackRightLargeZeroGRollUp( break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -4300,7 +4172,7 @@ static void LimLaunchedRCTrackRightLargeZeroGRollUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -4318,8 +4190,7 @@ static void LimLaunchedRCTrackRightLargeZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 24), { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 28, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4329,36 +4200,33 @@ static void LimLaunchedRCTrackRightLargeZeroGRollUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 30), { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 28, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 34), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 28, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 39), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 28, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -4410,11 +4278,10 @@ static void LimLaunchedRCTrackLeftBankToLeftQuarterTurn325DegUp( { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4424,13 +4291,13 @@ static void LimLaunchedRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4456,15 +4323,14 @@ static void LimLaunchedRCTrackLeftBankToLeftQuarterTurn325DegUp( { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -4475,7 +4341,7 @@ static void LimLaunchedRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4513,11 +4379,10 @@ static void LimLaunchedRCTrackRightBankToRightQuarterTurn325DegUp( { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4527,13 +4392,13 @@ static void LimLaunchedRCTrackRightBankToRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4559,15 +4424,14 @@ static void LimLaunchedRCTrackRightBankToRightQuarterTurn325DegUp( { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -4578,7 +4442,7 @@ static void LimLaunchedRCTrackRightBankToRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4613,11 +4477,10 @@ static void LimLaunchedRCTrackLeftQuarterTurn325DegDownToLeftBank( { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -4627,13 +4490,13 @@ static void LimLaunchedRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4662,15 +4525,14 @@ static void LimLaunchedRCTrackLeftQuarterTurn325DegDownToLeftBank( { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4681,7 +4543,7 @@ static void LimLaunchedRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4716,11 +4578,10 @@ static void LimLaunchedRCTrackRightQuarterTurn325DegDownToRightBank( { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -4730,13 +4591,13 @@ static void LimLaunchedRCTrackRightQuarterTurn325DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -4765,15 +4626,14 @@ static void LimLaunchedRCTrackRightQuarterTurn325DegDownToRightBank( { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4784,7 +4644,7 @@ static void LimLaunchedRCTrackRightQuarterTurn325DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -4819,18 +4679,14 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -4840,36 +4696,33 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 1), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 8), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 15), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 22), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -4903,7 +4756,7 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -4913,30 +4766,28 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 3), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 28, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 10), { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 28, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 17), { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 28, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 24), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 28, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4947,7 +4798,7 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -4981,7 +4832,7 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -5015,7 +4866,7 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -5043,7 +4894,7 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5053,7 +4904,7 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -5088,18 +4939,14 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -5109,36 +4956,33 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 29), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 36), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 43), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 50), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5172,7 +5016,7 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -5182,30 +5026,28 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 31), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 28, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 38), { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 28, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 45), { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 28, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 52), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 28, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5216,7 +5058,7 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -5250,7 +5092,7 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -5284,7 +5126,7 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -5312,7 +5154,7 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5322,7 +5164,7 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -5351,8 +5193,7 @@ static void LimLaunchedRCTrackFlatTo60DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 0), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5361,8 +5202,7 @@ static void LimLaunchedRCTrackFlatTo60DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 1), { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5371,31 +5211,25 @@ static void LimLaunchedRCTrackFlatTo60DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 3), { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 5), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); } static void LimLaunchedRCTrack60DegUpToFlat( @@ -5431,21 +5265,17 @@ static void LimLaunchedRCTrack60DegUpToFlat( { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardFlat); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void LimLaunchedRCTrackFlatTo60DegDown( @@ -5485,7 +5315,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -5503,7 +5333,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -5522,29 +5352,29 @@ static void LimLaunchedRCTrackDiagFlatTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 13), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 7, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5555,7 +5385,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -5583,7 +5413,7 @@ static void LimLaunchedRCTrackDiag60DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -5601,7 +5431,7 @@ static void LimLaunchedRCTrackDiag60DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5620,29 +5450,29 @@ static void LimLaunchedRCTrackDiag60DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 17), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 20, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 20, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 20, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5653,7 +5483,7 @@ static void LimLaunchedRCTrackDiag60DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5681,7 +5511,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -5699,7 +5529,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -5718,29 +5548,29 @@ static void LimLaunchedRCTrackDiagFlatTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 19), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5751,7 +5581,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5779,7 +5609,7 @@ static void LimLaunchedRCTrackDiag60DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -5797,7 +5627,7 @@ static void LimLaunchedRCTrackDiag60DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -5816,29 +5646,29 @@ static void LimLaunchedRCTrackDiag60DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 15), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 5, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 5, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5849,7 +5679,7 @@ static void LimLaunchedRCTrackDiag60DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -5881,16 +5711,11 @@ static void LimLaunchedRCTrackBooster( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionLimLaunchedRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp index 671b679cd9..b7da1e4a20 100644 --- a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp @@ -12,19 +12,24 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + static constexpr auto SPR_LOOPING_RC_BOOSTER_NE_SW = 15010; static constexpr auto SPR_LOOPING_RC_BOOSTER_NW_SE = 15011; static constexpr auto SPR_LOOPING_RC_FLAT_CHAINED_SW_NE = 15016; static constexpr auto SPR_LOOPING_RC_FLAT_CHAINED_NW_SE = 15017; -static constexpr const uint32_t LoopingRCDiagBrakeImages[2 * NumOrthogonalDirections] = { +static constexpr const uint32_t LoopingRCDiagBrakeImages[2 * kNumOrthogonalDirections] = { SPR_G2_LOOPING_DIAG_BRAKES, SPR_G2_LOOPING_DIAG_BRAKES + 2, SPR_G2_LOOPING_DIAG_BRAKES, SPR_G2_LOOPING_DIAG_BRAKES + 2, SPR_G2_LOOPING_DIAG_BRAKES + 1, SPR_G2_LOOPING_DIAG_BRAKES + 3, SPR_G2_LOOPING_DIAG_BRAKES + 1, SPR_G2_LOOPING_DIAG_BRAKES + 3, @@ -62,8 +67,7 @@ static void LoopingRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else @@ -85,17 +89,12 @@ static void LoopingRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void LoopingRCTrackStation( @@ -122,11 +121,11 @@ static void LoopingRCTrackStation( PaintAddImageAsParentRotated( session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A6380 */ @@ -161,8 +160,7 @@ static void LoopingRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else @@ -192,24 +190,19 @@ static void LoopingRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6390 */ @@ -244,8 +237,7 @@ static void LoopingRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } else @@ -275,24 +267,19 @@ static void LoopingRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A63A0 */ @@ -327,8 +314,7 @@ static void LoopingRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else @@ -358,24 +344,19 @@ static void LoopingRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A63B0 */ @@ -416,8 +397,7 @@ static void LoopingRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } else @@ -453,24 +433,19 @@ static void LoopingRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A63C0 */ @@ -511,8 +486,7 @@ static void LoopingRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } else @@ -548,24 +522,19 @@ static void LoopingRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A63D0 */ @@ -600,8 +569,7 @@ static void LoopingRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } else @@ -631,24 +599,19 @@ static void LoopingRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A63E0 */ @@ -730,11 +693,10 @@ static void LoopingRCTrackLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -744,10 +706,10 @@ static void LoopingRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -781,7 +743,7 @@ static void LoopingRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -815,10 +777,10 @@ static void LoopingRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -852,7 +814,7 @@ static void LoopingRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -878,15 +840,14 @@ static void LoopingRCTrackLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -897,7 +858,7 @@ static void LoopingRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -907,7 +868,7 @@ static void LoopingRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LoopingRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -947,16 +908,11 @@ static void LoopingRCTrackFlatToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A6470 */ @@ -995,16 +951,11 @@ static void LoopingRCTrackFlatToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A6480 */ @@ -1043,16 +994,11 @@ static void LoopingRCTrackLeftBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A6490 */ @@ -1091,16 +1037,11 @@ static void LoopingRCTrackRightBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A64A0 */ @@ -1137,11 +1078,10 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1151,10 +1091,10 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1188,7 +1128,7 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1222,10 +1162,10 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1259,7 +1199,7 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1288,15 +1228,14 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1307,7 +1246,7 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1317,7 +1256,7 @@ static void LoopingRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LoopingRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1357,23 +1296,18 @@ static void LoopingRCTrackLeftBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A64D0 */ @@ -1412,23 +1346,18 @@ static void LoopingRCTrackRightBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A64E0 */ @@ -1467,23 +1396,18 @@ static void LoopingRCTrack25DegUpToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A64F0 */ @@ -1522,23 +1446,18 @@ static void LoopingRCTrack25DegUpToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A6500 */ @@ -1603,16 +1522,11 @@ static void LoopingRCTrackLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A6550 */ @@ -1654,11 +1568,10 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1668,10 +1581,10 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1703,7 +1616,7 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1736,10 +1649,10 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1771,7 +1684,7 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1797,15 +1710,14 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -1816,7 +1728,7 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1852,11 +1764,10 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1866,10 +1777,10 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1901,7 +1812,7 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1933,10 +1844,10 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1968,7 +1879,7 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1994,15 +1905,14 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -2013,7 +1923,7 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2023,7 +1933,7 @@ static void LoopingRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LoopingRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2032,7 +1942,7 @@ static void LoopingRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LoopingRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2067,11 +1977,10 @@ static void LoopingRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2081,7 +1990,7 @@ static void LoopingRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2090,13 +1999,13 @@ static void LoopingRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15261), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15265), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2117,7 +2026,7 @@ static void LoopingRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2136,13 +2045,13 @@ static void LoopingRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15261), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15265), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2153,7 +2062,7 @@ static void LoopingRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2179,15 +2088,14 @@ static void LoopingRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2198,7 +2106,7 @@ static void LoopingRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2234,11 +2142,10 @@ static void LoopingRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2248,7 +2155,7 @@ static void LoopingRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2258,15 +2165,14 @@ static void LoopingRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(15269), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15273), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2285,7 +2191,7 @@ static void LoopingRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2303,15 +2209,14 @@ static void LoopingRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(15269), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15273), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2322,7 +2227,7 @@ static void LoopingRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2348,15 +2253,14 @@ static void LoopingRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2367,7 +2271,7 @@ static void LoopingRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2401,7 +2305,7 @@ static void LoopingRCTrackLeftVerticalLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2411,7 +2315,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2441,7 +2345,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2498,7 +2402,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2528,13 +2432,13 @@ static void LoopingRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2564,7 +2468,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -2621,7 +2525,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2651,7 +2555,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -2676,10 +2580,10 @@ static void LoopingRCTrackLeftVerticalLoop( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } PaintUtilSetSegmentSupportHeight( @@ -2690,7 +2594,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2724,9 +2628,9 @@ static void LoopingRCTrackRightVerticalLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2748,7 +2652,7 @@ static void LoopingRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15369), { 0, 0, height }, { 32, 26, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2797,7 +2701,7 @@ static void LoopingRCTrackRightVerticalLoop( { { 16, 0, height }, { 2, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2819,13 +2723,13 @@ static void LoopingRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15371), { 0, 0, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2847,7 +2751,7 @@ static void LoopingRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15372), { 0, 16, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -2896,7 +2800,7 @@ static void LoopingRCTrackRightVerticalLoop( { { 10, 16, height }, { 4, 16, 119 } }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2918,7 +2822,7 @@ static void LoopingRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(15374), { 0, 6, height }, { 32, 26, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -2943,13 +2847,13 @@ static void LoopingRCTrackRightVerticalLoop( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } @@ -2987,11 +2891,10 @@ static void LoopingRCTrackLeftQuarterTurn3( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3001,10 +2904,10 @@ static void LoopingRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3038,7 +2941,7 @@ static void LoopingRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3064,15 +2967,14 @@ static void LoopingRCTrackLeftQuarterTurn3( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3083,7 +2985,7 @@ static void LoopingRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3093,7 +2995,7 @@ static void LoopingRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LoopingRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3131,11 +3033,10 @@ static void LoopingRCTrackLeftQuarterTurn3Bank( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3145,10 +3046,10 @@ static void LoopingRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3182,7 +3083,7 @@ static void LoopingRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3211,15 +3112,14 @@ static void LoopingRCTrackLeftQuarterTurn3Bank( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3230,7 +3130,7 @@ static void LoopingRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3240,7 +3140,7 @@ static void LoopingRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LoopingRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3271,11 +3171,10 @@ static void LoopingRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(15325), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3285,13 +3184,13 @@ static void LoopingRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -3313,15 +3212,14 @@ static void LoopingRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(15324), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3332,7 +3230,7 @@ static void LoopingRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3364,11 +3262,10 @@ static void LoopingRCTrackRightQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(15322), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3378,13 +3275,13 @@ static void LoopingRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -3393,34 +3290,34 @@ static void LoopingRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15317), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15319), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15321), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15323), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3431,7 +3328,7 @@ static void LoopingRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3441,7 +3338,7 @@ static void LoopingRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LoopingRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3450,7 +3347,7 @@ static void LoopingRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LoopingRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3488,11 +3385,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3502,10 +3398,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3539,7 +3435,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3568,15 +3464,14 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3587,7 +3482,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3616,15 +3511,14 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3635,10 +3529,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3672,7 +3566,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3701,11 +3595,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3715,7 +3608,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3754,11 +3647,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3768,10 +3660,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3805,7 +3697,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3834,15 +3726,14 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3853,7 +3744,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3882,15 +3773,14 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3901,10 +3791,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3938,7 +3828,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3967,11 +3857,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3981,7 +3870,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3996,7 +3885,7 @@ static void LoopingRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LoopingRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4010,7 +3899,7 @@ static void LoopingRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LoopingRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4048,11 +3937,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4062,10 +3950,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4099,7 +3987,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4133,10 +4021,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4170,7 +4058,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4199,15 +4087,14 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4218,7 +4105,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4247,15 +4134,14 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4266,10 +4152,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4303,7 +4189,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4336,10 +4222,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4373,7 +4259,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4402,11 +4288,10 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4416,7 +4301,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4455,11 +4340,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4469,10 +4353,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4506,7 +4390,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4539,10 +4423,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4576,7 +4460,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4605,15 +4489,14 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4624,7 +4507,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4653,15 +4536,14 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4672,10 +4554,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4709,7 +4591,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4743,10 +4625,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4780,7 +4662,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4809,11 +4691,10 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4823,7 +4704,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4838,7 +4719,7 @@ static void LoopingRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LoopingRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4852,7 +4733,7 @@ static void LoopingRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LoopingRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4896,9 +4777,10 @@ static void LoopingRCTrackLeftQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::StandardSlopeStart, +56, TunnelType::StandardSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A6730 */ @@ -4941,9 +4823,10 @@ static void LoopingRCTrackRightQuarterTurn160DegUp( { { 2, 2, height + 75 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::StandardSlopeStart, +56, TunnelType::StandardSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A6740 */ @@ -4990,16 +4873,11 @@ static void LoopingRCTrackBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A6A40 */ @@ -5032,23 +4910,18 @@ static void LoopingRCTrack25DegUpLeftBanked( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6A50 */ @@ -5081,23 +4954,18 @@ static void LoopingRCTrack25DegUpRightBanked( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6780 */ @@ -5105,7 +4973,7 @@ static void LoopingRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -5131,9 +4999,9 @@ static void LoopingRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A6A60 */ @@ -5183,18 +5051,14 @@ static void LoopingRCTrackLeftEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5228,7 +5092,7 @@ static void LoopingRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5262,7 +5126,7 @@ static void LoopingRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5273,7 +5137,7 @@ static void LoopingRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5283,28 +5147,28 @@ static void LoopingRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(15529), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15533), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15537), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15541), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5315,7 +5179,7 @@ static void LoopingRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5351,18 +5215,14 @@ static void LoopingRCTrackRightEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5396,7 +5256,7 @@ static void LoopingRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5430,7 +5290,7 @@ static void LoopingRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5441,7 +5301,7 @@ static void LoopingRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5451,28 +5311,28 @@ static void LoopingRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(15513), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15517), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15521), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15525), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5483,7 +5343,7 @@ static void LoopingRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5537,18 +5397,14 @@ static void LoopingRCTrackLeftEighthBankToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5582,7 +5438,7 @@ static void LoopingRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5616,7 +5472,7 @@ static void LoopingRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5627,7 +5483,7 @@ static void LoopingRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5637,28 +5493,28 @@ static void LoopingRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(15561), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15565), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15569), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15573), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5669,7 +5525,7 @@ static void LoopingRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5705,18 +5561,14 @@ static void LoopingRCTrackRightEighthBankToDiag( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5750,7 +5602,7 @@ static void LoopingRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5784,7 +5636,7 @@ static void LoopingRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5795,7 +5647,7 @@ static void LoopingRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5805,28 +5657,28 @@ static void LoopingRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(15545), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15549), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15553), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15557), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5837,7 +5689,7 @@ static void LoopingRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5865,172 +5717,13 @@ static void LoopingRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(15451), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(15423), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(15448), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(15420), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(15450), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(15422), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(15449), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(15421), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { 15420, 15421, 15422, 15423 }, + { 15448, 15449, 15450, 15451 }, + }; + + TrackPaintUtilDiagTilesPaintExtra( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], kSupportType); } static constexpr CoordsXYZ diagBrakeBoundsOffsets[4] = { @@ -6045,21 +5738,20 @@ static void LoopingRCTrackDiagBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, LoopingRCDiagBrakeImages, defaultDiagTileOffsets, - defaultDiagBoundLengths, nullptr); + session, 3, height, direction, trackSequence, LoopingRCDiagBrakeImages, defaultDiagTileOffsets, defaultDiagBoundLengths, + nullptr); TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, LoopingRCDiagBrakeImages + 4, - defaultDiagTileOffsets, defaultDiagBoundLengths, diagBrakeBoundsOffsets); + session, 3, height, direction, trackSequence, LoopingRCDiagBrakeImages + 4, defaultDiagTileOffsets, + defaultDiagBoundLengths, diagBrakeBoundsOffsets); if (trackSequence == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A67C0 */ @@ -6100,7 +5792,7 @@ static void LoopingRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -6132,7 +5824,7 @@ static void LoopingRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -6165,7 +5857,7 @@ static void LoopingRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -6174,24 +5866,22 @@ static void LoopingRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15461), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -6201,24 +5891,22 @@ static void LoopingRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15433), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -6230,7 +5918,7 @@ static void LoopingRCTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6273,7 +5961,7 @@ static void LoopingRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -6305,7 +5993,7 @@ static void LoopingRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -6338,7 +6026,7 @@ static void LoopingRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -6347,25 +6035,22 @@ static void LoopingRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 36, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15473), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 36, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -6375,25 +6060,22 @@ static void LoopingRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 36, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15445), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 36, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -6405,7 +6087,7 @@ static void LoopingRCTrackDiag60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -6448,7 +6130,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -6480,7 +6162,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -6513,7 +6195,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -6522,24 +6204,22 @@ static void LoopingRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15453), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -6549,24 +6229,22 @@ static void LoopingRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15425), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -6578,7 +6256,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6621,7 +6299,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -6653,7 +6331,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -6686,7 +6364,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -6695,25 +6373,22 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15465), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -6723,25 +6398,22 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15437), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -6753,7 +6425,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6796,7 +6468,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -6828,7 +6500,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -6861,7 +6533,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -6870,25 +6542,22 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15469), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -6898,25 +6567,22 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15441), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -6928,7 +6594,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6971,7 +6637,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7003,7 +6669,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7036,7 +6702,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7045,24 +6711,22 @@ static void LoopingRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15457), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7072,24 +6736,22 @@ static void LoopingRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15429), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7101,7 +6763,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7144,7 +6806,7 @@ static void LoopingRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7176,7 +6838,7 @@ static void LoopingRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7209,7 +6871,7 @@ static void LoopingRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7218,24 +6880,22 @@ static void LoopingRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15463), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7245,24 +6905,22 @@ static void LoopingRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15435), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7274,7 +6932,7 @@ static void LoopingRCTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7317,7 +6975,7 @@ static void LoopingRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -7349,7 +7007,7 @@ static void LoopingRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -7382,7 +7040,7 @@ static void LoopingRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -7391,25 +7049,22 @@ static void LoopingRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 28, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15475), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 28, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -7419,25 +7074,22 @@ static void LoopingRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 28, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15447), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 28, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -7449,7 +7101,7 @@ static void LoopingRCTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -7563,24 +7215,22 @@ static void LoopingRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15459), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7590,24 +7240,22 @@ static void LoopingRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15431), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7622,7 +7270,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6830 */ @@ -7663,7 +7311,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7695,7 +7343,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7728,7 +7376,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7737,25 +7385,22 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15471), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -7765,25 +7410,22 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15443), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -7795,7 +7437,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7838,7 +7480,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7870,7 +7512,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7903,7 +7545,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7912,24 +7554,22 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15467), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7939,24 +7579,22 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15439), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7968,7 +7606,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8011,7 +7649,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -8043,7 +7681,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -8076,7 +7714,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -8085,24 +7723,22 @@ static void LoopingRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15455), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -8112,24 +7748,22 @@ static void LoopingRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15427), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -8141,7 +7775,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8170,7 +7804,7 @@ static void LoopingRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8191,7 +7825,7 @@ static void LoopingRCTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8210,29 +7844,29 @@ static void LoopingRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15501), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8243,7 +7877,7 @@ static void LoopingRCTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8272,7 +7906,7 @@ static void LoopingRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8290,7 +7924,7 @@ static void LoopingRCTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8312,29 +7946,29 @@ static void LoopingRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15506), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8345,7 +7979,7 @@ static void LoopingRCTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8374,7 +8008,7 @@ static void LoopingRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8395,7 +8029,7 @@ static void LoopingRCTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8414,29 +8048,29 @@ static void LoopingRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15508), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8447,7 +8081,7 @@ static void LoopingRCTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8476,7 +8110,7 @@ static void LoopingRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8494,7 +8128,7 @@ static void LoopingRCTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8516,29 +8150,29 @@ static void LoopingRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15503), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8549,7 +8183,7 @@ static void LoopingRCTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8578,7 +8212,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8599,7 +8233,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8618,29 +8252,29 @@ static void LoopingRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15491), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8651,7 +8285,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8680,7 +8314,7 @@ static void LoopingRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8698,7 +8332,7 @@ static void LoopingRCTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8720,29 +8354,29 @@ static void LoopingRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15496), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8753,7 +8387,7 @@ static void LoopingRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8782,7 +8416,7 @@ static void LoopingRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -8803,7 +8437,7 @@ static void LoopingRCTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -8822,29 +8456,29 @@ static void LoopingRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15481), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8855,7 +8489,7 @@ static void LoopingRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -8884,7 +8518,7 @@ static void LoopingRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -8902,7 +8536,7 @@ static void LoopingRCTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -8924,29 +8558,29 @@ static void LoopingRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15486), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8957,7 +8591,7 @@ static void LoopingRCTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9030,22 +8664,22 @@ static void LoopingRCTrackDiagLeftBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15488), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9059,7 +8693,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6990 */ @@ -9130,22 +8764,22 @@ static void LoopingRCTrackDiagRightBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15483), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9159,7 +8793,7 @@ static void LoopingRCTrackDiagRightBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A69A0 */ @@ -9186,7 +8820,7 @@ static void LoopingRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9207,7 +8841,7 @@ static void LoopingRCTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9226,29 +8860,29 @@ static void LoopingRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15498), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9259,7 +8893,7 @@ static void LoopingRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9288,7 +8922,7 @@ static void LoopingRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9306,7 +8940,7 @@ static void LoopingRCTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9328,29 +8962,29 @@ static void LoopingRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15493), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9361,7 +8995,7 @@ static void LoopingRCTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9390,7 +9024,7 @@ static void LoopingRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9408,7 +9042,7 @@ static void LoopingRCTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9427,29 +9061,29 @@ static void LoopingRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15477), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9460,7 +9094,7 @@ static void LoopingRCTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9489,7 +9123,7 @@ static void LoopingRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9507,7 +9141,7 @@ static void LoopingRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9526,29 +9160,29 @@ static void LoopingRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15479), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9559,7 +9193,7 @@ static void LoopingRCTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9592,16 +9226,11 @@ static void LoopingRCTrackBlockBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A6BC0 */ @@ -9632,11 +9261,10 @@ static void LoopingRCTrackLeftBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(15687), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9646,13 +9274,13 @@ static void LoopingRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9676,15 +9304,14 @@ static void LoopingRCTrackLeftBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(15686), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9695,7 +9322,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9728,11 +9355,10 @@ static void LoopingRCTrackRightBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(15684), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9742,13 +9368,13 @@ static void LoopingRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9757,36 +9383,36 @@ static void LoopingRCTrackRightBankedQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15679), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15681), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15683), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15685), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9797,7 +9423,7 @@ static void LoopingRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9807,7 +9433,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LoopingRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -9816,7 +9442,7 @@ static void LoopingRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; LoopingRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -9851,11 +9477,10 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9865,10 +9490,10 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9901,7 +9526,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9934,10 +9559,10 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -9971,7 +9596,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -9997,15 +9622,14 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -10016,7 +9640,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10052,11 +9676,10 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -10066,10 +9689,10 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10102,7 +9725,7 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -10134,10 +9757,10 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -10171,7 +9794,7 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -10197,15 +9820,14 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -10216,7 +9838,7 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10226,7 +9848,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LoopingRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -10235,7 +9857,7 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; LoopingRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -10272,23 +9894,18 @@ static void LoopingRCTrack25DegUpToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6A90 */ @@ -10324,23 +9941,18 @@ static void LoopingRCTrack25DegUpToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6AA0 */ @@ -10376,23 +9988,18 @@ static void LoopingRCTrackLeftBanked25DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6AB0 */ @@ -10428,23 +10035,18 @@ static void LoopingRCTrackRightBanked25DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A6AC0 */ @@ -10509,23 +10111,18 @@ static void LoopingRCTrackLeftBankedFlatToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A6B10 */ @@ -10558,23 +10155,18 @@ static void LoopingRCTrackRightBankedFlatToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A6B40 */ @@ -10607,23 +10199,18 @@ static void LoopingRCTrackLeftBanked25DegUpToLeftBankedFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A6B50 */ @@ -10656,23 +10243,18 @@ static void LoopingRCTrackRightBanked25DegUpToRightBankedFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A6B60 */ @@ -10740,23 +10322,18 @@ static void LoopingRCTrackFlatToLeftBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A69D0 */ @@ -10792,23 +10369,18 @@ static void LoopingRCTrackFlatToRightBanked25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A69E0 */ @@ -10844,23 +10416,18 @@ static void LoopingRCTrackLeftBanked25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A69F0 */ @@ -10896,23 +10463,18 @@ static void LoopingRCTrackRightBanked25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A6A00 */ @@ -10968,16 +10530,11 @@ static void LoopingRCTrackBooster( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionLoopingRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/MineRide.cpp b/src/openrct2/ride/coaster/MineRide.cpp index 0e496f6ae2..32db36a387 100644 --- a/src/openrct2/ride/coaster/MineRide.cpp +++ b/src/openrct2/ride/coaster/MineRide.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Fork; + /** rct2: 0x008B08D0 */ static void MineRideTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -32,8 +37,7 @@ static void MineRideTrackFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -48,13 +52,9 @@ static void MineRideTrackFlat( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void MineRideTrackStation( @@ -76,9 +76,9 @@ static void MineRideTrackStation( { 32, 32, 1 }); DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008B08E0 */ @@ -94,8 +94,7 @@ static void MineRideTrack25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -114,8 +113,7 @@ static void MineRideTrack25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -131,18 +129,14 @@ static void MineRideTrack25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008B08F0 */ @@ -158,8 +152,7 @@ static void MineRideTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -178,8 +171,7 @@ static void MineRideTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -195,18 +187,14 @@ static void MineRideTrackFlatTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008B0900 */ @@ -222,8 +210,7 @@ static void MineRideTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -242,8 +229,7 @@ static void MineRideTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -259,18 +245,14 @@ static void MineRideTrack25DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008B0910 */ @@ -312,7 +294,7 @@ static void MineRideTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(19427), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -326,7 +308,7 @@ static void MineRideTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(19437), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -338,7 +320,7 @@ static void MineRideTrackLeftQuarterTurn5( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -348,10 +330,10 @@ static void MineRideTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -385,7 +367,7 @@ static void MineRideTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -419,10 +401,10 @@ static void MineRideTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -456,7 +438,7 @@ static void MineRideTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -473,7 +455,7 @@ static void MineRideTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(19428), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -487,16 +469,16 @@ static void MineRideTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(19418), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -507,7 +489,7 @@ static void MineRideTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -517,7 +499,7 @@ static void MineRideTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineRideTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -537,8 +519,7 @@ static void MineRideTrackFlatToLeftBank( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -560,8 +541,7 @@ static void MineRideTrackFlatToLeftBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -575,13 +555,9 @@ static void MineRideTrackFlatToLeftBank( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008B0970 */ @@ -597,8 +573,7 @@ static void MineRideTrackFlatToRightBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -620,8 +595,7 @@ static void MineRideTrackFlatToRightBank( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -638,13 +612,9 @@ static void MineRideTrackFlatToRightBank( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008B0980 */ @@ -663,8 +633,7 @@ static void MineRideTrackLeftBankToFlat( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -686,8 +655,7 @@ static void MineRideTrackLeftBankToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -701,13 +669,9 @@ static void MineRideTrackLeftBankToFlat( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008B0990 */ @@ -723,8 +687,7 @@ static void MineRideTrackRightBankToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -746,8 +709,7 @@ static void MineRideTrackRightBankToFlat( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -764,13 +726,9 @@ static void MineRideTrackRightBankToFlat( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008B09A0 */ @@ -791,7 +749,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(19458), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -805,7 +763,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(19457), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -817,7 +775,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -827,10 +785,10 @@ static void MineRideTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -864,7 +822,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -898,10 +856,10 @@ static void MineRideTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -935,7 +893,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -952,7 +910,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(19448), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -969,16 +927,16 @@ static void MineRideTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(19438), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -989,7 +947,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -999,7 +957,7 @@ static void MineRideTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineRideTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1019,8 +977,7 @@ static void MineRideTrackLeftBankTo25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -1042,8 +999,7 @@ static void MineRideTrackLeftBankTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -1059,18 +1015,14 @@ static void MineRideTrackLeftBankTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008B09D0 */ @@ -1086,8 +1038,7 @@ static void MineRideTrackRightBankTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -1109,8 +1060,7 @@ static void MineRideTrackRightBankTo25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -1129,18 +1079,14 @@ static void MineRideTrackRightBankTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008B09E0 */ @@ -1159,8 +1105,7 @@ static void MineRideTrack25DegUpToLeftBank( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -1182,8 +1127,7 @@ static void MineRideTrack25DegUpToLeftBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -1199,18 +1143,14 @@ static void MineRideTrack25DegUpToLeftBank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008B09F0 */ @@ -1226,8 +1166,7 @@ static void MineRideTrack25DegUpToRightBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -1249,8 +1188,7 @@ static void MineRideTrack25DegUpToRightBank( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -1269,18 +1207,14 @@ static void MineRideTrack25DegUpToRightBank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008B0A00 */ @@ -1328,8 +1262,7 @@ static void MineRideTrackLeftBank( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -1348,8 +1281,7 @@ static void MineRideTrackLeftBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -1363,13 +1295,9 @@ static void MineRideTrackLeftBank( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008B0A50 */ @@ -1395,7 +1323,7 @@ static void MineRideTrackSBendLeft( session, direction, session.TrackColours.WithIndex(19460), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1409,7 +1337,7 @@ static void MineRideTrackSBendLeft( session, direction, session.TrackColours.WithIndex(19463), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1421,7 +1349,7 @@ static void MineRideTrackSBendLeft( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1431,7 +1359,7 @@ static void MineRideTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1440,7 +1368,7 @@ static void MineRideTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19461), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1467,7 +1395,7 @@ static void MineRideTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1486,7 +1414,7 @@ static void MineRideTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19461), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1503,7 +1431,7 @@ static void MineRideTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1513,7 +1441,7 @@ static void MineRideTrackSBendLeft( session, direction, session.TrackColours.WithIndex(19463), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1527,7 +1455,7 @@ static void MineRideTrackSBendLeft( session, direction, session.TrackColours.WithIndex(19460), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1540,10 +1468,10 @@ static void MineRideTrackSBendLeft( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1554,7 +1482,7 @@ static void MineRideTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1574,7 +1502,7 @@ static void MineRideTrackSBendRight( session, direction, session.TrackColours.WithIndex(19468), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1588,7 +1516,7 @@ static void MineRideTrackSBendRight( session, direction, session.TrackColours.WithIndex(19471), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1600,7 +1528,7 @@ static void MineRideTrackSBendRight( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1610,7 +1538,7 @@ static void MineRideTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1620,7 +1548,7 @@ static void MineRideTrackSBendRight( session, direction, session.TrackColours.WithIndex(19469), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1647,7 +1575,7 @@ static void MineRideTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1665,7 +1593,7 @@ static void MineRideTrackSBendRight( session, direction, session.TrackColours.WithIndex(19469), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1684,7 +1612,7 @@ static void MineRideTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1694,7 +1622,7 @@ static void MineRideTrackSBendRight( session, direction, session.TrackColours.WithIndex(19471), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1708,7 +1636,7 @@ static void MineRideTrackSBendRight( session, direction, session.TrackColours.WithIndex(19468), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1721,10 +1649,10 @@ static void MineRideTrackSBendRight( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1735,7 +1663,7 @@ static void MineRideTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1755,7 +1683,7 @@ static void MineRideTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(19397), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1769,7 +1697,7 @@ static void MineRideTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(19403), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1781,7 +1709,7 @@ static void MineRideTrackLeftQuarterTurn3( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1791,10 +1719,10 @@ static void MineRideTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1828,7 +1756,7 @@ static void MineRideTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1845,7 +1773,7 @@ static void MineRideTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(19398), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1859,16 +1787,16 @@ static void MineRideTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(19392), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1879,7 +1807,7 @@ static void MineRideTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1889,7 +1817,7 @@ static void MineRideTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineRideTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1911,7 +1839,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(19416), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1925,7 +1853,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(19415), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1937,7 +1865,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1947,10 +1875,10 @@ static void MineRideTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1984,7 +1912,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2001,7 +1929,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(19410), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2018,16 +1946,16 @@ static void MineRideTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(19404), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2038,7 +1966,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2048,7 +1976,7 @@ static void MineRideTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineRideTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2070,7 +1998,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19502), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2084,7 +2012,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19501), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2096,7 +2024,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2106,10 +2034,10 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2143,7 +2071,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2160,7 +2088,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19496), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2177,16 +2105,16 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19490), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2197,7 +2125,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -2217,7 +2145,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19502), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2231,16 +2159,16 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19501), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2251,10 +2179,10 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -2288,7 +2216,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -2298,7 +2226,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19490), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2312,7 +2240,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19496), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2327,7 +2255,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2337,7 +2265,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2357,7 +2285,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19476), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2371,7 +2299,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19482), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2386,7 +2314,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2396,10 +2324,10 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2433,7 +2361,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2453,7 +2381,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19488), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2467,16 +2395,16 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19487), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2487,7 +2415,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -2504,7 +2432,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19482), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2521,16 +2449,16 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19476), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2541,10 +2469,10 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -2578,7 +2506,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -2591,7 +2519,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19488), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2605,7 +2533,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(19487), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2617,7 +2545,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2627,7 +2555,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2642,7 +2570,7 @@ static void MineRideTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineRideTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2656,7 +2584,7 @@ static void MineRideTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineRideTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2678,7 +2606,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19546), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2692,7 +2620,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19545), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2704,7 +2632,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2714,10 +2642,10 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2751,7 +2679,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2785,10 +2713,10 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -2822,7 +2750,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -2839,7 +2767,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19536), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2856,16 +2784,16 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19526), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2876,7 +2804,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -2896,7 +2824,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19546), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2910,16 +2838,16 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19545), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2930,10 +2858,10 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -2967,7 +2895,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -3000,10 +2928,10 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -3037,7 +2965,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -3047,7 +2975,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19526), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3061,7 +2989,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19536), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3076,7 +3004,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3086,7 +3014,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3106,7 +3034,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19504), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3120,7 +3048,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19514), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3135,7 +3063,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3145,10 +3073,10 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3182,7 +3110,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3215,10 +3143,10 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -3252,7 +3180,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3272,7 +3200,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19524), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3286,16 +3214,16 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19523), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3306,7 +3234,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3323,7 +3251,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19514), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3340,16 +3268,16 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19504), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3360,10 +3288,10 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -3397,7 +3325,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -3431,10 +3359,10 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -3468,7 +3396,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -3481,7 +3409,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19524), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3495,7 +3423,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19523), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3507,7 +3435,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3517,7 +3445,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3532,7 +3460,7 @@ static void MineRideTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineRideTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3546,7 +3474,7 @@ static void MineRideTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineRideTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3557,7 +3485,7 @@ static void MineRideTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Fork, 6); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType, 6); switch (direction) { @@ -3583,9 +3511,9 @@ static void MineRideTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008B0B90 */ @@ -3603,7 +3531,7 @@ static void MineRideTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(19564), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3617,7 +3545,7 @@ static void MineRideTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(19572), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3629,14 +3557,11 @@ static void MineRideTrackLeftEighthToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3670,7 +3595,7 @@ static void MineRideTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3704,7 +3629,7 @@ static void MineRideTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -3715,7 +3640,7 @@ static void MineRideTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3725,7 +3650,7 @@ static void MineRideTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(19567), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3739,7 +3664,7 @@ static void MineRideTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(19575), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3757,7 +3682,7 @@ static void MineRideTrackLeftEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3777,7 +3702,7 @@ static void MineRideTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(19548), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3791,7 +3716,7 @@ static void MineRideTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(19556), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3803,14 +3728,11 @@ static void MineRideTrackRightEighthToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3844,7 +3766,7 @@ static void MineRideTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3878,7 +3800,7 @@ static void MineRideTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -3889,7 +3811,7 @@ static void MineRideTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3899,7 +3821,7 @@ static void MineRideTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(19551), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3913,7 +3835,7 @@ static void MineRideTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(19559), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3931,7 +3853,7 @@ static void MineRideTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3969,7 +3891,7 @@ static void MineRideTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19596), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3983,7 +3905,7 @@ static void MineRideTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19604), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3995,14 +3917,11 @@ static void MineRideTrackLeftEighthBankToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4036,7 +3955,7 @@ static void MineRideTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4070,7 +3989,7 @@ static void MineRideTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -4081,7 +4000,7 @@ static void MineRideTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4091,7 +4010,7 @@ static void MineRideTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19599), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4105,7 +4024,7 @@ static void MineRideTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19607), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4123,7 +4042,7 @@ static void MineRideTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4143,7 +4062,7 @@ static void MineRideTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19580), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4157,7 +4076,7 @@ static void MineRideTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19588), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4169,14 +4088,11 @@ static void MineRideTrackRightEighthBankToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4210,7 +4126,7 @@ static void MineRideTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4244,7 +4160,7 @@ static void MineRideTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -4255,7 +4171,7 @@ static void MineRideTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4265,7 +4181,7 @@ static void MineRideTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19583), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4279,7 +4195,7 @@ static void MineRideTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19591), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4297,7 +4213,7 @@ static void MineRideTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4325,98 +4241,18 @@ static void MineRideTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19615), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19612), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19614), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19613), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[kNumOrthogonalDirections] = { 19612, 19613, 19614, 19615 }; + + TrackPaintUtilDiagTilesPaint( + session, 3, height, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + + if (trackSequence == 3) + MetalASupportsPaintSetupRotated( + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 6, height, session.SupportColours); + + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008B0C30 */ @@ -4443,7 +4279,7 @@ static void MineRideTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -4461,7 +4297,7 @@ static void MineRideTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -4480,14 +4316,14 @@ static void MineRideTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4498,7 +4334,7 @@ static void MineRideTrackDiag25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -4514,7 +4350,7 @@ static void MineRideTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -4543,7 +4379,7 @@ static void MineRideTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -4561,7 +4397,7 @@ static void MineRideTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4580,14 +4416,14 @@ static void MineRideTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4598,7 +4434,7 @@ static void MineRideTrackDiagFlatTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -4613,7 +4449,7 @@ static void MineRideTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4642,7 +4478,7 @@ static void MineRideTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -4660,7 +4496,7 @@ static void MineRideTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -4679,14 +4515,14 @@ static void MineRideTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4697,7 +4533,7 @@ static void MineRideTrackDiag25DegUpToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -4713,7 +4549,7 @@ static void MineRideTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -4742,7 +4578,7 @@ static void MineRideTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -4760,7 +4596,7 @@ static void MineRideTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -4779,14 +4615,14 @@ static void MineRideTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4797,7 +4633,7 @@ static void MineRideTrackDiag25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -4813,7 +4649,7 @@ static void MineRideTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -4883,7 +4719,7 @@ static void MineRideTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4894,7 +4730,7 @@ static void MineRideTrackDiagFlatTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -4913,7 +4749,7 @@ static void MineRideTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008B0C50 */ @@ -4940,7 +4776,7 @@ static void MineRideTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -4958,7 +4794,7 @@ static void MineRideTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -4977,14 +4813,14 @@ static void MineRideTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4995,7 +4831,7 @@ static void MineRideTrackDiag25DegDownToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -5010,7 +4846,7 @@ static void MineRideTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5039,7 +4875,7 @@ static void MineRideTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5060,7 +4896,7 @@ static void MineRideTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5079,14 +4915,14 @@ static void MineRideTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5097,7 +4933,7 @@ static void MineRideTrackDiagFlatToLeftBank( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -5112,7 +4948,7 @@ static void MineRideTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5141,7 +4977,7 @@ static void MineRideTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5159,7 +4995,7 @@ static void MineRideTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5181,14 +5017,14 @@ static void MineRideTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5199,7 +5035,7 @@ static void MineRideTrackDiagFlatToRightBank( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -5214,7 +5050,7 @@ static void MineRideTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5243,7 +5079,7 @@ static void MineRideTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5264,7 +5100,7 @@ static void MineRideTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5283,14 +5119,14 @@ static void MineRideTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5301,7 +5137,7 @@ static void MineRideTrackDiagLeftBankToFlat( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -5316,7 +5152,7 @@ static void MineRideTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5345,7 +5181,7 @@ static void MineRideTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5363,7 +5199,7 @@ static void MineRideTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5385,14 +5221,14 @@ static void MineRideTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5403,7 +5239,7 @@ static void MineRideTrackDiagRightBankToFlat( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -5418,7 +5254,7 @@ static void MineRideTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5447,7 +5283,7 @@ static void MineRideTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5468,7 +5304,7 @@ static void MineRideTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5487,14 +5323,14 @@ static void MineRideTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5505,7 +5341,7 @@ static void MineRideTrackDiagLeftBankTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -5520,7 +5356,7 @@ static void MineRideTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5549,7 +5385,7 @@ static void MineRideTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5567,7 +5403,7 @@ static void MineRideTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5589,14 +5425,14 @@ static void MineRideTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5607,7 +5443,7 @@ static void MineRideTrackDiagRightBankTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -5622,7 +5458,7 @@ static void MineRideTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5651,7 +5487,7 @@ static void MineRideTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -5672,7 +5508,7 @@ static void MineRideTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -5691,14 +5527,14 @@ static void MineRideTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5709,7 +5545,7 @@ static void MineRideTrackDiag25DegUpToLeftBank( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -5725,7 +5561,7 @@ static void MineRideTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -5754,7 +5590,7 @@ static void MineRideTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -5772,7 +5608,7 @@ static void MineRideTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -5794,14 +5630,14 @@ static void MineRideTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5812,7 +5648,7 @@ static void MineRideTrackDiag25DegUpToRightBank( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -5828,7 +5664,7 @@ static void MineRideTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -5901,7 +5737,7 @@ static void MineRideTrackDiagLeftBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5912,7 +5748,7 @@ static void MineRideTrackDiagLeftBankTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -5931,7 +5767,7 @@ static void MineRideTrackDiagLeftBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008B0D20 */ @@ -6002,7 +5838,7 @@ static void MineRideTrackDiagRightBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6013,7 +5849,7 @@ static void MineRideTrackDiagRightBankTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6032,7 +5868,7 @@ static void MineRideTrackDiagRightBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008B0D30 */ @@ -6059,7 +5895,7 @@ static void MineRideTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6080,7 +5916,7 @@ static void MineRideTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6099,14 +5935,14 @@ static void MineRideTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6117,7 +5953,7 @@ static void MineRideTrackDiag25DegDownToLeftBank( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6132,7 +5968,7 @@ static void MineRideTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6161,7 +5997,7 @@ static void MineRideTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -6179,7 +6015,7 @@ static void MineRideTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -6201,14 +6037,14 @@ static void MineRideTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6219,7 +6055,7 @@ static void MineRideTrackDiag25DegDownToRightBank( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6234,7 +6070,7 @@ static void MineRideTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6263,7 +6099,7 @@ static void MineRideTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6281,7 +6117,7 @@ static void MineRideTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6300,14 +6136,14 @@ static void MineRideTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6318,7 +6154,7 @@ static void MineRideTrackDiagLeftBank( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -6333,7 +6169,7 @@ static void MineRideTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6362,7 +6198,7 @@ static void MineRideTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6380,7 +6216,7 @@ static void MineRideTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6399,14 +6235,14 @@ static void MineRideTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6417,7 +6253,7 @@ static void MineRideTrackDiagRightBank( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -6432,7 +6268,7 @@ static void MineRideTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } diff --git a/src/openrct2/ride/coaster/MineTrainCoaster.cpp b/src/openrct2/ride/coaster/MineTrainCoaster.cpp index c3f7c17f3c..c876df0cc0 100644 --- a/src/openrct2/ride/coaster/MineTrainCoaster.cpp +++ b/src/openrct2/ride/coaster/MineTrainCoaster.cpp @@ -12,32 +12,37 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Mine; + static constexpr uint32_t MINE_TRAIN_BLOCK_BRAKE_SW_NE_OPEN = 20060; static constexpr uint32_t MINE_TRAIN_BLOCK_BRAKE_NW_SE_OPEN = 20061; static constexpr uint32_t MINE_TRAIN_BLOCK_BRAKE_SW_NE_CLOSED = 20062; static constexpr uint32_t MINE_TRAIN_BLOCK_BRAKE_NW_SE_CLOSED = 20063; -static constexpr uint32_t _MineTrainBlockBrakeImages[NumOrthogonalDirections][2] = { +static constexpr uint32_t _MineTrainBlockBrakeImages[kNumOrthogonalDirections][2] = { { MINE_TRAIN_BLOCK_BRAKE_SW_NE_OPEN, MINE_TRAIN_BLOCK_BRAKE_SW_NE_CLOSED }, { MINE_TRAIN_BLOCK_BRAKE_NW_SE_OPEN, MINE_TRAIN_BLOCK_BRAKE_NW_SE_CLOSED }, { MINE_TRAIN_BLOCK_BRAKE_SW_NE_OPEN, MINE_TRAIN_BLOCK_BRAKE_SW_NE_CLOSED }, { MINE_TRAIN_BLOCK_BRAKE_NW_SE_OPEN, MINE_TRAIN_BLOCK_BRAKE_NW_SE_CLOSED }, }; -static constexpr const uint32_t MinetrainRCDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr const uint32_t MinetrainRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_MINETRAIN_DIAG_BRAKES, SPR_G2_MINETRAIN_DIAG_BRAKES + 1, SPR_G2_MINETRAIN_DIAG_BRAKES, SPR_G2_MINETRAIN_DIAG_BRAKES + 1, }; -static constexpr const uint32_t MinetrainRCDiagBlockBrakeImages[2][NumOrthogonalDirections] = { +static constexpr const uint32_t MinetrainRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_MINETRAIN_DIAG_BRAKES + 3, SPR_G2_MINETRAIN_DIAG_BRAKES + 5, @@ -53,7 +58,7 @@ static constexpr const uint32_t MinetrainRCDiagBlockBrakeImages[2][NumOrthogonal }; // Magic number 4 refers to the number of track blocks in a diagonal track element -static constexpr const WoodenSupportSubType MineTrainRCDiagonalSupports[4][NumOrthogonalDirections] = { +static constexpr const WoodenSupportSubType MineTrainRCDiagonalSupports[4][kNumOrthogonalDirections] = { { WoodenSupportSubType::Null, WoodenSupportSubType::Null, WoodenSupportSubType::Null, WoodenSupportSubType::Null }, { WoodenSupportSubType::Corner0, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner3 }, @@ -75,29 +80,25 @@ static void MineTrainRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20054), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20055), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20056), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20057), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } } @@ -110,22 +111,20 @@ static void MineTrainRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20052), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20053), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C154, 0x0071C164, 0x0071C174 */ @@ -158,9 +157,9 @@ static void MineTrainRCTrackStation( } DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071BFB4 */ @@ -222,19 +221,19 @@ static void MineTrainRCTrack25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0071BFC4 */ @@ -267,19 +266,19 @@ static void MineTrainRCTrack60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x0071BFD4 */ @@ -341,19 +340,19 @@ static void MineTrainRCTrackFlatTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0071BFE4 */ @@ -392,19 +391,19 @@ static void MineTrainRCTrack25DegUpTo60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x0071BFF4 */ @@ -443,19 +442,19 @@ static void MineTrainRCTrack60DegUpTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x0071C004 */ @@ -517,19 +516,19 @@ static void MineTrainRCTrack25DegUpToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0071C014 */ @@ -595,36 +594,36 @@ static void MineTrainRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20155), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20160), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20165), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20150), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -633,7 +632,7 @@ static void MineTrainRCTrackLeftQuarterTurn5( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -642,27 +641,27 @@ static void MineTrainRCTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20154), { 0, 0, height }, { 32, 16, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20159), { 0, 0, height }, { 32, 16, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20164), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20149), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -673,7 +672,7 @@ static void MineTrainRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -683,27 +682,27 @@ static void MineTrainRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20153), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20158), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20163), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20148), { 0, 0, height }, { 16, 16, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -715,7 +714,7 @@ static void MineTrainRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -724,7 +723,7 @@ static void MineTrainRCTrackLeftQuarterTurn5( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -734,26 +733,26 @@ static void MineTrainRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20152), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20157), { 0, 0, height }, { 16, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20162), { 0, 0, height }, { 16, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20147), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -764,7 +763,7 @@ static void MineTrainRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -774,41 +773,41 @@ static void MineTrainRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20151), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20156), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20161), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20146), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -818,7 +817,7 @@ static void MineTrainRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineTrainRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -836,8 +835,7 @@ static void MineTrainRCTrackFlatToLeftBank( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20114), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -846,27 +844,24 @@ static void MineTrainRCTrackFlatToLeftBank( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20115), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20108), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20109), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C084 */ @@ -880,15 +875,13 @@ static void MineTrainRCTrackFlatToRightBank( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20110), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20111), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -897,8 +890,7 @@ static void MineTrainRCTrackFlatToRightBank( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20116), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -907,13 +899,12 @@ static void MineTrainRCTrackFlatToRightBank( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20117), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C094 */ @@ -930,8 +921,7 @@ static void MineTrainRCTrackLeftBankToFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20116), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -940,27 +930,24 @@ static void MineTrainRCTrackLeftBankToFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20117), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20110), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20111), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C0A4 */ @@ -974,15 +961,13 @@ static void MineTrainRCTrackRightBankToFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20108), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20109), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -991,8 +976,7 @@ static void MineTrainRCTrackRightBankToFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20114), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1001,13 +985,12 @@ static void MineTrainRCTrackRightBankToFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20115), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C0D4 */ @@ -1028,36 +1011,36 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20186), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20180), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20185), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20170), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -1066,7 +1049,7 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1075,28 +1058,28 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20174), { 0, 0, height }, { 32, 16, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20179), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20184), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20169), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1107,7 +1090,7 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1123,25 +1106,25 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20178), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20183), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20168), { 0, 0, height }, { 16, 16, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -1152,7 +1135,7 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -1161,7 +1144,7 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1171,27 +1154,27 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20172), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20177), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20182), { 0, 0, height }, { 16, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20167), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1202,7 +1185,7 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1212,14 +1195,14 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20171), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20176), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1229,27 +1212,27 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(20187), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20166), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1259,7 +1242,7 @@ static void MineTrainRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineTrainRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1299,19 +1282,19 @@ static void MineTrainRCTrackLeftBankTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0071C214 */ @@ -1350,19 +1333,19 @@ static void MineTrainRCTrackRightBankTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0071C224 */ @@ -1401,19 +1384,19 @@ static void MineTrainRCTrack25DegUpToLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0071C234 */ @@ -1452,19 +1435,19 @@ static void MineTrainRCTrack25DegUpToRightBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0071C244 */ @@ -1510,34 +1493,30 @@ static void MineTrainRCTrackLeftBank( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20142), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20143), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20144), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20145), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C314 */ @@ -1581,15 +1560,15 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -1598,7 +1577,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1608,28 +1587,28 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20251), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20256), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20261), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20266), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1640,7 +1619,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1650,28 +1629,28 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20252), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20257), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20262), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20267), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1683,7 +1662,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -1692,7 +1671,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1702,28 +1681,28 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20253), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20258), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20263), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20268), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1734,7 +1713,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1744,7 +1723,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20254), { 0, 0, height }, { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg, 3); break; case 1: @@ -1752,7 +1731,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20259), { 0, 0, height }, { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg, 0); break; case 2: @@ -1760,7 +1739,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20264), { 0, 0, height }, { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg, 1); break; case 3: @@ -1768,21 +1747,21 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20269), { 0, 0, height }, { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg, 2); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1820,15 +1799,15 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -1836,7 +1815,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1846,28 +1825,28 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20231), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20236), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20241), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20246), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1878,7 +1857,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1888,28 +1867,28 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20232), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20237), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20242), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20247), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1921,7 +1900,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -1929,7 +1908,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1939,28 +1918,28 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20233), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20238), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20243), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20248), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1971,7 +1950,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1981,7 +1960,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20234), { 0, 0, height }, { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg, 1); break; case 1: @@ -1989,7 +1968,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20239), { 0, 0, height }, { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg, 2); break; case 2: @@ -1997,7 +1976,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20244), { 0, 0, height }, { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg, 3); break; case 3: @@ -2005,21 +1984,21 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(20249), { 0, 0, height }, { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg, 0); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2029,7 +2008,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineTrainRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2038,7 +2017,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineTrainRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2057,36 +2036,36 @@ static void MineTrainRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(20270), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20274), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20273), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20277), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2095,27 +2074,27 @@ static void MineTrainRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20271), { 0, 0, height }, { 32, 26, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20275), { 0, 0, height }, { 32, 26, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20272), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20276), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2126,7 +2105,7 @@ static void MineTrainRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2136,26 +2115,26 @@ static void MineTrainRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(20272), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20276), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20271), { 0, 0, height }, { 32, 26, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20275), { 0, 0, height }, { 32, 26, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2166,7 +2145,7 @@ static void MineTrainRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2176,41 +2155,41 @@ static void MineTrainRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(20273), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20277), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20270), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20274), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2230,36 +2209,36 @@ static void MineTrainRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(20278), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20282), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20281), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20285), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2269,26 +2248,26 @@ static void MineTrainRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(20279), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20283), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20280), { 0, 0, height }, { 32, 26, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20284), { 0, 0, height }, { 32, 26, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2299,7 +2278,7 @@ static void MineTrainRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2308,27 +2287,27 @@ static void MineTrainRCTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20280), { 0, 0, height }, { 32, 26, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20284), { 0, 0, height }, { 32, 26, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20279), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20283), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2339,7 +2318,7 @@ static void MineTrainRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2349,41 +2328,41 @@ static void MineTrainRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(20281), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20285), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20278), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20282), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2403,42 +2382,42 @@ static void MineTrainRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(20193), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20196), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20199), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20190), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2471,7 +2450,7 @@ static void MineTrainRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2481,41 +2460,41 @@ static void MineTrainRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(20191), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20194), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20197), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20188), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2525,7 +2504,7 @@ static void MineTrainRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineTrainRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2547,42 +2526,42 @@ static void MineTrainRCTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(20212), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20208), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20211), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20202), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2616,7 +2595,7 @@ static void MineTrainRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2626,14 +2605,14 @@ static void MineTrainRCTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(20203), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20206), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2643,27 +2622,27 @@ static void MineTrainRCTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(20213), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20200), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2673,7 +2652,7 @@ static void MineTrainRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineTrainRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2691,39 +2670,39 @@ static void MineTrainRCTrackLeftQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20225), { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20227), { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20229), { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20223), { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -2734,7 +2713,7 @@ static void MineTrainRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -2743,38 +2722,38 @@ static void MineTrainRCTrackLeftQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20224), { 6, 0, height }, { 20, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20226), { 6, 0, height }, { 20, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20228), { 6, 0, height }, { 20, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20222), { 6, 0, height }, { 20, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2793,39 +2772,39 @@ static void MineTrainRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20214), { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20216), { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20218), { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20220), { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -2836,7 +2815,7 @@ static void MineTrainRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -2845,38 +2824,38 @@ static void MineTrainRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20215), { 6, 0, height }, { 20, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20217), { 6, 0, height }, { 20, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20219), { 6, 0, height }, { 20, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20221), { 6, 0, height }, { 20, 32, 1 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2886,7 +2865,7 @@ static void MineTrainRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineTrainRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2895,7 +2874,7 @@ static void MineTrainRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineTrainRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2917,33 +2896,33 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20312), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20308), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20311), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20302), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2961,13 +2940,13 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3001,7 +2980,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3011,14 +2990,14 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20303), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20306), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3028,23 +3007,23 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20313), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20300), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3063,7 +3042,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3073,7 +3052,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20302), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3083,30 +3062,30 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20312), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20308), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20311), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3125,12 +3104,12 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3164,7 +3143,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3174,21 +3153,21 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20300), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20303), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20306), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3198,12 +3177,12 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20313), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3221,7 +3200,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3241,21 +3220,21 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20286), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20289), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20292), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3265,12 +3244,12 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20299), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3288,13 +3267,13 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3328,7 +3307,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3338,7 +3317,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20288), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3348,30 +3327,30 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20298), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20294), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20297), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3390,7 +3369,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3400,14 +3379,14 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20289), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20292), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3417,23 +3396,23 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20299), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20286), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3452,13 +3431,13 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3492,7 +3471,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3505,33 +3484,33 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(20298), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20294), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20297), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20288), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3549,7 +3528,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3564,7 +3543,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineTrainRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3578,7 +3557,7 @@ static void MineTrainRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MineTrainRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3600,33 +3579,33 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20356), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20350), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20355), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20340), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3644,7 +3623,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -3653,7 +3632,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3663,28 +3642,28 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20344), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20349), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20354), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20339), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3695,7 +3674,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3705,7 +3684,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20343), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3715,21 +3694,21 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20178), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20353), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20338), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3748,7 +3727,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -3757,7 +3736,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -3767,7 +3746,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20342), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3777,21 +3756,21 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20177), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20352), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20337), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3802,7 +3781,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3812,14 +3791,14 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20341), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20346), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3829,23 +3808,23 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20357), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20336), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3864,7 +3843,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3874,7 +3853,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20340), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3884,30 +3863,30 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20356), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20350), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20355), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3926,7 +3905,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: PaintUtilSetSegmentSupportHeight( @@ -3934,7 +3913,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -3944,28 +3923,28 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20339), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20344), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20349), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20354), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3976,7 +3955,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -3986,14 +3965,14 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20338), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20343), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4003,14 +3982,14 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20178), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20353), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4028,7 +4007,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: PaintUtilSetSegmentSupportHeight( @@ -4036,7 +4015,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4046,14 +4025,14 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20337), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20342), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4063,14 +4042,14 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20177), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20352), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4081,7 +4060,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4091,21 +4070,21 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20336), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20341), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20346), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4115,12 +4094,12 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20357), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4138,7 +4117,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4158,21 +4137,21 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20314), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20319), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20324), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4182,12 +4161,12 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20335), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4205,7 +4184,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -4213,7 +4192,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4223,28 +4202,28 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20315), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20320), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20325), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20330), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4255,7 +4234,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4265,28 +4244,28 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20316), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20321), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20326), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20331), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4304,7 +4283,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -4312,7 +4291,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4322,28 +4301,28 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20317), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20322), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20327), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20332), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4354,7 +4333,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4364,7 +4343,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20318), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4374,30 +4353,30 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20334), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20328), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20333), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4416,7 +4395,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4426,14 +4405,14 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20319), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20324), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4443,23 +4422,23 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20335), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20314), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4478,7 +4457,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: PaintUtilSetSegmentSupportHeight( @@ -4487,7 +4466,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4497,28 +4476,28 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20320), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20325), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20330), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20315), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4529,7 +4508,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4539,28 +4518,28 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20321), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20326), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20331), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20316), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4579,7 +4558,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: PaintUtilSetSegmentSupportHeight( @@ -4588,7 +4567,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4598,28 +4577,28 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20322), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20327), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20332), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20317), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4630,7 +4609,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4643,33 +4622,33 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(20334), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20328), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20333), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20318), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4687,7 +4666,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4702,7 +4681,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineTrainRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4716,7 +4695,7 @@ static void MineTrainRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MineTrainRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4732,21 +4711,19 @@ static void MineTrainRCTrackBrakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20058), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20059), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C334 */ @@ -4760,35 +4737,31 @@ static void MineTrainRCTrackOnRidePhoto( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20052), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20053), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20052), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20053), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 2, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0071C354 */ @@ -4806,36 +4779,36 @@ static void MineTrainRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(20452), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20456), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20460), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20464), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4845,32 +4818,32 @@ static void MineTrainRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(20453), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20457), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20461), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20465), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4880,39 +4853,39 @@ static void MineTrainRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(20454), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20458), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20462), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20466), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4939,7 +4912,7 @@ static void MineTrainRCTrackLeftEighthToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4959,36 +4932,36 @@ static void MineTrainRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(20436), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20440), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20444), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20448), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4998,32 +4971,32 @@ static void MineTrainRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(20437), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20441), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20445), { 0, 0, height }, { { 0, 0, height }, { 34, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20449), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5033,39 +5006,39 @@ static void MineTrainRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(20438), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20442), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20446), { 0, 0, height }, { { 4, 4, height }, { 28, 28, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20450), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5092,7 +5065,7 @@ static void MineTrainRCTrackRightEighthToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5130,36 +5103,36 @@ static void MineTrainRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(20484), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20488), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20492), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20496), { 0, 0, height }, { { 0, 27, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5169,32 +5142,32 @@ static void MineTrainRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(20485), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20489), { 0, 0, height }, { { 0, 0, height + 27 }, { 34, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20493), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20497), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5204,39 +5177,39 @@ static void MineTrainRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(20486), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20490), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20494), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20498), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5263,7 +5236,7 @@ static void MineTrainRCTrackLeftEighthBankToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5283,36 +5256,36 @@ static void MineTrainRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(20468), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20472), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20476), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20480), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5322,32 +5295,32 @@ static void MineTrainRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(20469), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20473), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20477), { 0, 0, height }, { { 0, 0, height + 27 }, { 34, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20481), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5357,39 +5330,39 @@ static void MineTrainRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(20470), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20474), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20478), { 0, 0, height }, { { 4, 4, height + 27 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(20482), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5416,7 +5389,7 @@ static void MineTrainRCTrackRightEighthBankToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5444,63 +5417,29 @@ static void MineTrainRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { 20358, 20359, 20360, 20361 }, + { 20386, 20387, 20388, 20389 }, + }; + + TrackPaintUtilDiagTilesPaint( + session, 1, height, direction, trackSequence, images[trackElement.HasChain()], defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); + switch (trackSequence) { - case 0: - if (direction == 3) - { - ImageIndex imageIndex = trackElement.HasChain() ? 20389 : 20361; - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 1 } }); - } - - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; case 1: - if (direction == 0) - { - ImageIndex imageIndex = trackElement.HasChain() ? 20386 : 20358; - PaintAddImageAsParent( - session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 1 } }); - } - WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); - - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); break; case 2: - if (direction == 2) - { - ImageIndex imageIndex = trackElement.HasChain() ? 20388 : 20360; - PaintAddImageAsParent( - session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 1 } }); - } - WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); - - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (direction == 1) - { - ImageIndex imageIndex = trackElement.HasChain() ? 20387 : 20359; - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 1 } }); - } - - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); break; } + + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void MineTrainRCTrackDiagBrakes( @@ -5508,17 +5447,17 @@ static void MineTrainRCTrackDiagBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, MinetrainRCDiagBrakeImages, defaultDiagTileOffsets, + session, 1, height, direction, trackSequence, MinetrainRCDiagBrakeImages, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (MineTrainRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) { WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, MineTrainRCDiagonalSupports[trackSequence][0], height, session.SupportColours); + session, kSupportType, MineTrainRCDiagonalSupports[trackSequence][0], height, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void MineTrainRCTrackDiagBlockBrakes( @@ -5526,19 +5465,17 @@ static void MineTrainRCTrackDiagBlockBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 13, height, direction, trackSequence, session.TrackColours, - MinetrainRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 13, height, direction, trackSequence, MinetrainRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (MineTrainRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) { WoodenASupportsPaintSetup( - session, WoodenSupportType::Mine, MineTrainRCDiagonalSupports[trackSequence][direction], height, - session.SupportColours); + session, kSupportType, MineTrainRCDiagonalSupports[trackSequence][direction], height, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C414 */ @@ -5558,7 +5495,7 @@ static void MineTrainRCTrackDiag25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (direction == 0) @@ -5570,11 +5507,10 @@ static void MineTrainRCTrackDiag25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (direction == 2) @@ -5586,11 +5522,10 @@ static void MineTrainRCTrackDiag25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (direction == 1) @@ -5602,7 +5537,7 @@ static void MineTrainRCTrackDiag25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -5622,7 +5557,7 @@ static void MineTrainRCTrackDiag60DegUp( { { -16, -16, height }, { 32, 32, 1 } }); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (direction == 0) @@ -5633,11 +5568,10 @@ static void MineTrainRCTrackDiag60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (direction == 2) @@ -5648,11 +5582,10 @@ static void MineTrainRCTrackDiag60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (direction == 1) @@ -5663,7 +5596,7 @@ static void MineTrainRCTrackDiag60DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -5685,7 +5618,7 @@ static void MineTrainRCTrackDiagFlatTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (direction == 0) @@ -5697,10 +5630,10 @@ static void MineTrainRCTrackDiagFlatTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (direction == 2) @@ -5712,10 +5645,10 @@ static void MineTrainRCTrackDiagFlatTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (direction == 1) @@ -5727,7 +5660,7 @@ static void MineTrainRCTrackDiagFlatTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5748,7 +5681,7 @@ static void MineTrainRCTrackDiag25DegUpTo60DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (direction == 0) @@ -5759,11 +5692,10 @@ static void MineTrainRCTrackDiag25DegUpTo60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (direction == 2) @@ -5774,11 +5706,10 @@ static void MineTrainRCTrackDiag25DegUpTo60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (direction == 1) @@ -5789,7 +5720,7 @@ static void MineTrainRCTrackDiag25DegUpTo60DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5811,7 +5742,7 @@ static void MineTrainRCTrackDiag60DegUpTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (direction == 0) @@ -5822,11 +5753,10 @@ static void MineTrainRCTrackDiag60DegUpTo25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (direction == 2) @@ -5837,11 +5767,10 @@ static void MineTrainRCTrackDiag60DegUpTo25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (direction == 1) @@ -5852,7 +5781,7 @@ static void MineTrainRCTrackDiag60DegUpTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -5874,7 +5803,7 @@ static void MineTrainRCTrackDiag25DegUpToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (direction == 0) @@ -5886,11 +5815,10 @@ static void MineTrainRCTrackDiag25DegUpToFlat( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (direction == 2) @@ -5902,11 +5830,10 @@ static void MineTrainRCTrackDiag25DegUpToFlat( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (direction == 1) @@ -5918,7 +5845,7 @@ static void MineTrainRCTrackDiag25DegUpToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -5940,7 +5867,7 @@ static void MineTrainRCTrackDiag25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (direction == 0) @@ -5952,11 +5879,10 @@ static void MineTrainRCTrackDiag25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (direction == 2) @@ -5968,11 +5894,10 @@ static void MineTrainRCTrackDiag25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (direction == 1) @@ -5984,7 +5909,7 @@ static void MineTrainRCTrackDiag25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6005,7 +5930,7 @@ static void MineTrainRCTrackDiag60DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (direction == 0) @@ -6016,11 +5941,10 @@ static void MineTrainRCTrackDiag60DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (direction == 2) @@ -6031,11 +5955,10 @@ static void MineTrainRCTrackDiag60DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (direction == 1) @@ -6046,7 +5969,7 @@ static void MineTrainRCTrackDiag60DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -6079,8 +6002,7 @@ static void MineTrainRCTrackDiagFlatTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; @@ -6094,8 +6016,7 @@ static void MineTrainRCTrackDiagFlatTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; @@ -6112,7 +6033,7 @@ static void MineTrainRCTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0071C484 */ @@ -6131,7 +6052,7 @@ static void MineTrainRCTrackDiag25DegDownTo60DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (direction == 0) @@ -6142,11 +6063,10 @@ static void MineTrainRCTrackDiag25DegDownTo60DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (direction == 2) @@ -6157,11 +6077,10 @@ static void MineTrainRCTrackDiag25DegDownTo60DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (direction == 1) @@ -6172,7 +6091,7 @@ static void MineTrainRCTrackDiag25DegDownTo60DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6193,7 +6112,7 @@ static void MineTrainRCTrackDiag60DegDownTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (direction == 0) @@ -6204,11 +6123,10 @@ static void MineTrainRCTrackDiag60DegDownTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (direction == 2) @@ -6219,11 +6137,10 @@ static void MineTrainRCTrackDiag60DegDownTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (direction == 1) @@ -6234,7 +6151,7 @@ static void MineTrainRCTrackDiag60DegDownTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6256,7 +6173,7 @@ static void MineTrainRCTrackDiag25DegDownToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (direction == 0) @@ -6268,10 +6185,10 @@ static void MineTrainRCTrackDiag25DegDownToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (direction == 2) @@ -6283,10 +6200,10 @@ static void MineTrainRCTrackDiag25DegDownToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (direction == 1) @@ -6298,7 +6215,7 @@ static void MineTrainRCTrackDiag25DegDownToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6319,7 +6236,7 @@ static void MineTrainRCTrackDiagFlatToLeftBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (direction == 0) @@ -6333,10 +6250,10 @@ static void MineTrainRCTrackDiagFlatToLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (direction == 2) @@ -6347,10 +6264,10 @@ static void MineTrainRCTrackDiagFlatToLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (direction == 1) @@ -6361,7 +6278,7 @@ static void MineTrainRCTrackDiagFlatToLeftBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6382,7 +6299,7 @@ static void MineTrainRCTrackDiagFlatToRightBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (direction == 0) @@ -6393,10 +6310,10 @@ static void MineTrainRCTrackDiagFlatToRightBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (direction == 2) @@ -6410,10 +6327,10 @@ static void MineTrainRCTrackDiagFlatToRightBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (direction == 1) @@ -6424,7 +6341,7 @@ static void MineTrainRCTrackDiagFlatToRightBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6445,7 +6362,7 @@ static void MineTrainRCTrackDiagLeftBankToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (direction == 0) @@ -6459,10 +6376,10 @@ static void MineTrainRCTrackDiagLeftBankToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (direction == 2) @@ -6473,10 +6390,10 @@ static void MineTrainRCTrackDiagLeftBankToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (direction == 1) @@ -6487,7 +6404,7 @@ static void MineTrainRCTrackDiagLeftBankToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6508,7 +6425,7 @@ static void MineTrainRCTrackDiagRightBankToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (direction == 0) @@ -6519,10 +6436,10 @@ static void MineTrainRCTrackDiagRightBankToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (direction == 2) @@ -6536,10 +6453,10 @@ static void MineTrainRCTrackDiagRightBankToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (direction == 1) @@ -6550,7 +6467,7 @@ static void MineTrainRCTrackDiagRightBankToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6571,7 +6488,7 @@ static void MineTrainRCTrackDiagLeftBankTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (direction == 0) @@ -6585,10 +6502,10 @@ static void MineTrainRCTrackDiagLeftBankTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (direction == 2) @@ -6599,10 +6516,10 @@ static void MineTrainRCTrackDiagLeftBankTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (direction == 1) @@ -6613,7 +6530,7 @@ static void MineTrainRCTrackDiagLeftBankTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6634,7 +6551,7 @@ static void MineTrainRCTrackDiagRightBankTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (direction == 0) @@ -6645,10 +6562,10 @@ static void MineTrainRCTrackDiagRightBankTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (direction == 2) @@ -6662,10 +6579,10 @@ static void MineTrainRCTrackDiagRightBankTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (direction == 1) @@ -6676,7 +6593,7 @@ static void MineTrainRCTrackDiagRightBankTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6697,7 +6614,7 @@ static void MineTrainRCTrackDiag25DegUpToLeftBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (direction == 0) @@ -6711,11 +6628,10 @@ static void MineTrainRCTrackDiag25DegUpToLeftBank( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (direction == 2) @@ -6726,11 +6642,10 @@ static void MineTrainRCTrackDiag25DegUpToLeftBank( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (direction == 1) @@ -6741,7 +6656,7 @@ static void MineTrainRCTrackDiag25DegUpToLeftBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6763,7 +6678,7 @@ static void MineTrainRCTrackDiag25DegUpToRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (direction == 0) @@ -6774,11 +6689,10 @@ static void MineTrainRCTrackDiag25DegUpToRightBank( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (direction == 2) @@ -6792,11 +6706,10 @@ static void MineTrainRCTrackDiag25DegUpToRightBank( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (direction == 1) @@ -6807,7 +6720,7 @@ static void MineTrainRCTrackDiag25DegUpToRightBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6841,8 +6754,7 @@ static void MineTrainRCTrackDiagLeftBankTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); break; case 2: @@ -6854,8 +6766,7 @@ static void MineTrainRCTrackDiagLeftBankTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); break; case 3: @@ -6870,7 +6781,7 @@ static void MineTrainRCTrackDiagLeftBankTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0071C544 */ @@ -6898,8 +6809,7 @@ static void MineTrainRCTrackDiagRightBankTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); break; case 2: @@ -6914,8 +6824,7 @@ static void MineTrainRCTrackDiagRightBankTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); break; case 3: @@ -6930,7 +6839,7 @@ static void MineTrainRCTrackDiagRightBankTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0071C554 */ @@ -6949,7 +6858,7 @@ static void MineTrainRCTrackDiag25DegDownToLeftBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (direction == 0) @@ -6963,10 +6872,10 @@ static void MineTrainRCTrackDiag25DegDownToLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (direction == 2) @@ -6977,10 +6886,10 @@ static void MineTrainRCTrackDiag25DegDownToLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (direction == 1) @@ -6991,7 +6900,7 @@ static void MineTrainRCTrackDiag25DegDownToLeftBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7012,7 +6921,7 @@ static void MineTrainRCTrackDiag25DegDownToRightBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (direction == 0) @@ -7023,10 +6932,10 @@ static void MineTrainRCTrackDiag25DegDownToRightBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (direction == 2) @@ -7040,10 +6949,10 @@ static void MineTrainRCTrackDiag25DegDownToRightBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (direction == 1) @@ -7054,7 +6963,7 @@ static void MineTrainRCTrackDiag25DegDownToRightBank( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7074,15 +6983,6 @@ static void MineTrainRCTrackDiagLeftBank( { { -16, -16, height }, { 32, 32, 3 } }); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); break; case 1: if (direction == 0) @@ -7093,16 +6993,8 @@ static void MineTrainRCTrackDiagLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); break; case 2: if (direction == 2) @@ -7113,17 +7005,8 @@ static void MineTrainRCTrackDiagLeftBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); break; case 3: if (direction == 1) @@ -7133,17 +7016,12 @@ static void MineTrainRCTrackDiagLeftBank( { { -16, -16, height }, { 32, 32, 3 } }); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); break; } + + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0071C3E4 */ @@ -7169,7 +7047,7 @@ static void MineTrainRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (direction == 0) @@ -7180,7 +7058,7 @@ static void MineTrainRCTrackDiagRightBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -7189,7 +7067,7 @@ static void MineTrainRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (direction == 2) @@ -7200,7 +7078,7 @@ static void MineTrainRCTrackDiagRightBank( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -7210,7 +7088,7 @@ static void MineTrainRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (direction == 1) @@ -7228,7 +7106,7 @@ static void MineTrainRCTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7243,10 +7121,10 @@ static void MineTrainRCTrackBlockBrakes( session, direction, session.TrackColours.WithIndex(_MineTrainBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Mine, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionMineTrainRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp index 650b0b2ca6..bef2ddeebb 100644 --- a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp @@ -12,18 +12,23 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Fork; + static constexpr uint32_t MINI_RC_BLOCK_BRAKE_SW_NE_OPEN = 18742; static constexpr uint32_t MINI_RC_BLOCK_BRAKE_NW_SE_OPEN = 18743; static constexpr uint32_t MINI_RC_BLOCK_BRAKE_SW_NE_CLOSED = 18744; static constexpr uint32_t MINI_RC_BLOCK_BRAKE_NW_SE_CLOSED = 18745; -static constexpr uint32_t _MiniRCBlockBrakeImages[NumOrthogonalDirections][2] = { +static constexpr uint32_t _MiniRCBlockBrakeImages[kNumOrthogonalDirections][2] = { { MINI_RC_BLOCK_BRAKE_SW_NE_OPEN, MINI_RC_BLOCK_BRAKE_SW_NE_CLOSED }, { MINI_RC_BLOCK_BRAKE_NW_SE_OPEN, MINI_RC_BLOCK_BRAKE_NW_SE_CLOSED }, { MINI_RC_BLOCK_BRAKE_SW_NE_OPEN, MINI_RC_BLOCK_BRAKE_SW_NE_CLOSED }, @@ -46,7 +51,7 @@ static void MiniRCTrackFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -66,7 +71,7 @@ static void MiniRCTrackFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -93,7 +98,7 @@ static void MiniRCTrackFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -109,13 +114,9 @@ static void MiniRCTrackFlat( break; } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void MiniRCTrackStation( @@ -147,9 +148,9 @@ static void MiniRCTrackStation( { 32, 32, 1 }); DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A4ACC */ @@ -168,7 +169,7 @@ static void MiniRCTrack25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -188,7 +189,7 @@ static void MiniRCTrack25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -214,7 +215,7 @@ static void MiniRCTrack25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -234,7 +235,7 @@ static void MiniRCTrack25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -251,18 +252,14 @@ static void MiniRCTrack25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A4ADC */ @@ -278,8 +275,7 @@ static void MiniRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 38, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 38, height, session.SupportColours); } break; case 1: @@ -298,8 +294,7 @@ static void MiniRCTrack60DegUp( { { 0, 27, height }, { 32, 1, 98 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 38, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 38, height, session.SupportColours); } break; case 3: @@ -315,18 +310,14 @@ static void MiniRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A4AEC */ @@ -345,7 +336,7 @@ static void MiniRCTrackFlatTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -365,7 +356,7 @@ static void MiniRCTrackFlatTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -391,7 +382,7 @@ static void MiniRCTrackFlatTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -411,7 +402,7 @@ static void MiniRCTrackFlatTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -428,18 +419,14 @@ static void MiniRCTrackFlatTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A4AFC */ @@ -455,8 +442,7 @@ static void MiniRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 18, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 18, height, session.SupportColours); } break; case 1: @@ -481,8 +467,7 @@ static void MiniRCTrack25DegUpTo60DegUp( { { 0, 27, height }, { 32, 1, 66 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 18, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 18, height, session.SupportColours); } break; case 3: @@ -498,18 +483,14 @@ static void MiniRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A4B0C */ @@ -525,8 +506,7 @@ static void MiniRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 26, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 26, height, session.SupportColours); } break; case 1: @@ -551,8 +531,7 @@ static void MiniRCTrack60DegUpTo25DegUp( { { 0, 27, height }, { 32, 1, 66 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 26, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 26, height, session.SupportColours); } break; case 3: @@ -568,18 +547,14 @@ static void MiniRCTrack60DegUpTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A4B1C */ @@ -598,7 +573,7 @@ static void MiniRCTrack25DegUpToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -618,7 +593,7 @@ static void MiniRCTrack25DegUpToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -644,7 +619,7 @@ static void MiniRCTrack25DegUpToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -664,7 +639,7 @@ static void MiniRCTrack25DegUpToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -681,18 +656,14 @@ static void MiniRCTrack25DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A4B2C */ @@ -758,7 +729,7 @@ static void MiniRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(18851), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -772,7 +743,7 @@ static void MiniRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(18861), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -784,7 +755,7 @@ static void MiniRCTrackLeftQuarterTurn5( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -794,10 +765,10 @@ static void MiniRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -831,7 +802,7 @@ static void MiniRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -865,10 +836,10 @@ static void MiniRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -902,7 +873,7 @@ static void MiniRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -919,7 +890,7 @@ static void MiniRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(18852), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -933,16 +904,16 @@ static void MiniRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(18842), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -953,7 +924,7 @@ static void MiniRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -963,7 +934,7 @@ static void MiniRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -983,8 +954,7 @@ static void MiniRCTrackFlatToLeftBank( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -1006,8 +976,7 @@ static void MiniRCTrackFlatToLeftBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -1021,13 +990,9 @@ static void MiniRCTrackFlatToLeftBank( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A4BBC */ @@ -1043,8 +1008,7 @@ static void MiniRCTrackFlatToRightBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -1066,8 +1030,7 @@ static void MiniRCTrackFlatToRightBank( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -1084,13 +1047,9 @@ static void MiniRCTrackFlatToRightBank( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A4BCC */ @@ -1109,8 +1068,7 @@ static void MiniRCTrackLeftBankToFlat( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -1132,8 +1090,7 @@ static void MiniRCTrackLeftBankToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -1147,13 +1104,9 @@ static void MiniRCTrackLeftBankToFlat( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A4BDC */ @@ -1169,8 +1122,7 @@ static void MiniRCTrackRightBankToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -1192,8 +1144,7 @@ static void MiniRCTrackRightBankToFlat( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -1210,13 +1161,9 @@ static void MiniRCTrackRightBankToFlat( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A4BEC */ @@ -1237,7 +1184,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(18882), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1251,7 +1198,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(18881), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1263,7 +1210,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1273,10 +1220,10 @@ static void MiniRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1310,7 +1257,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1344,10 +1291,10 @@ static void MiniRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1381,7 +1328,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1398,7 +1345,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(18872), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1415,16 +1362,16 @@ static void MiniRCTrackBankedLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(18862), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1435,7 +1382,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1445,7 +1392,7 @@ static void MiniRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1465,8 +1412,7 @@ static void MiniRCTrackLeftBankTo25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -1488,8 +1434,7 @@ static void MiniRCTrackLeftBankTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -1505,18 +1450,14 @@ static void MiniRCTrackLeftBankTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A4C1C */ @@ -1532,8 +1473,7 @@ static void MiniRCTrackRightBankTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -1555,8 +1495,7 @@ static void MiniRCTrackRightBankTo25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -1575,18 +1514,14 @@ static void MiniRCTrackRightBankTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A4C2C */ @@ -1605,8 +1540,7 @@ static void MiniRCTrack25DegUpToLeftBank( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -1628,8 +1562,7 @@ static void MiniRCTrack25DegUpToLeftBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -1645,18 +1578,14 @@ static void MiniRCTrack25DegUpToLeftBank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A4C3C */ @@ -1672,8 +1601,7 @@ static void MiniRCTrack25DegUpToRightBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -1695,8 +1623,7 @@ static void MiniRCTrack25DegUpToRightBank( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -1715,18 +1642,14 @@ static void MiniRCTrack25DegUpToRightBank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A4C4C */ @@ -1774,8 +1697,7 @@ static void MiniRCTrackLeftBank( { { 0, 27, height }, { 32, 1, 26 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -1794,8 +1716,7 @@ static void MiniRCTrackLeftBank( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 3: @@ -1809,13 +1730,9 @@ static void MiniRCTrackLeftBank( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A4C9C */ @@ -1841,7 +1758,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(18936), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1855,7 +1772,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(18946), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1867,7 +1784,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1877,10 +1794,10 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1912,7 +1829,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1945,10 +1862,10 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -1980,7 +1897,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -1997,7 +1914,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(18945), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2011,16 +1928,16 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(18955), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -2031,7 +1948,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2051,7 +1968,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(18916), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2065,7 +1982,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(18926), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2077,7 +1994,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2087,10 +2004,10 @@ static void MiniRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2122,7 +2039,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -2154,10 +2071,10 @@ static void MiniRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -2189,7 +2106,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -2206,7 +2123,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(18925), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2220,16 +2137,16 @@ static void MiniRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(18935), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -2240,7 +2157,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2250,7 +2167,7 @@ static void MiniRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2259,7 +2176,7 @@ static void MiniRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2278,7 +2195,7 @@ static void MiniRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(18900), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2292,7 +2209,7 @@ static void MiniRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(18903), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2304,7 +2221,7 @@ static void MiniRCTrackSBendLeft( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2314,7 +2231,7 @@ static void MiniRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2323,7 +2240,7 @@ static void MiniRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18901), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2350,7 +2267,7 @@ static void MiniRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2369,7 +2286,7 @@ static void MiniRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18901), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2386,7 +2303,7 @@ static void MiniRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2396,7 +2313,7 @@ static void MiniRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(18903), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2410,7 +2327,7 @@ static void MiniRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(18900), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2423,10 +2340,10 @@ static void MiniRCTrackSBendLeft( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2437,7 +2354,7 @@ static void MiniRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2457,7 +2374,7 @@ static void MiniRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(18908), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2471,7 +2388,7 @@ static void MiniRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(18911), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2483,7 +2400,7 @@ static void MiniRCTrackSBendRight( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2493,7 +2410,7 @@ static void MiniRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2503,7 +2420,7 @@ static void MiniRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(18909), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2530,7 +2447,7 @@ static void MiniRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2548,7 +2465,7 @@ static void MiniRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(18909), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2567,7 +2484,7 @@ static void MiniRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2577,7 +2494,7 @@ static void MiniRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(18911), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2591,7 +2508,7 @@ static void MiniRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(18908), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2604,10 +2521,10 @@ static void MiniRCTrackSBendRight( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2618,7 +2535,7 @@ static void MiniRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2638,7 +2555,7 @@ static void MiniRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(18821), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2652,7 +2569,7 @@ static void MiniRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(18827), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2664,7 +2581,7 @@ static void MiniRCTrackLeftQuarterTurn3( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2674,10 +2591,10 @@ static void MiniRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2711,7 +2628,7 @@ static void MiniRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2728,7 +2645,7 @@ static void MiniRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(18822), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2742,16 +2659,16 @@ static void MiniRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(18816), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2762,7 +2679,7 @@ static void MiniRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2772,7 +2689,7 @@ static void MiniRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2794,7 +2711,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(18840), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2808,7 +2725,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(18839), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2820,7 +2737,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2830,10 +2747,10 @@ static void MiniRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2867,7 +2784,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2884,7 +2801,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(18834), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2901,16 +2818,16 @@ static void MiniRCTrackLeftQuarterTurn3Bank( session, direction, session.TrackColours.WithIndex(18828), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2921,7 +2838,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2931,7 +2848,7 @@ static void MiniRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2949,7 +2866,7 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18967), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2961,7 +2878,7 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18971), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2972,7 +2889,7 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2982,13 +2899,13 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -3003,7 +2920,7 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18968), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3015,16 +2932,16 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18964), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3035,7 +2952,7 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3054,7 +2971,7 @@ static void MiniRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18956), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3066,7 +2983,7 @@ static void MiniRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18960), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3077,7 +2994,7 @@ static void MiniRCTrackRightQuarterTurn325DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3087,13 +3004,13 @@ static void MiniRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -3108,7 +3025,7 @@ static void MiniRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18959), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3120,16 +3037,16 @@ static void MiniRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(18963), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3140,7 +3057,7 @@ static void MiniRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3150,7 +3067,7 @@ static void MiniRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3159,7 +3076,7 @@ static void MiniRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3181,7 +3098,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18998), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3195,7 +3112,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18997), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3207,7 +3124,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3217,10 +3134,10 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3254,7 +3171,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3271,7 +3188,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18992), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3288,16 +3205,16 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18986), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3308,7 +3225,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3328,7 +3245,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18998), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3342,16 +3259,16 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18997), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3362,10 +3279,10 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3399,7 +3316,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3409,7 +3326,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18986), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3423,7 +3340,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18992), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3438,7 +3355,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3448,7 +3365,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3468,7 +3385,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18972), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3482,7 +3399,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18978), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3497,7 +3414,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3507,10 +3424,10 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3544,7 +3461,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3564,7 +3481,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18984), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3578,16 +3495,16 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18983), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3598,7 +3515,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -3615,7 +3532,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18978), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3632,16 +3549,16 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18972), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3652,10 +3569,10 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3689,7 +3606,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -3702,7 +3619,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18984), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3716,7 +3633,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, direction, session.TrackColours.WithIndex(18983), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3728,7 +3645,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3738,7 +3655,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3753,7 +3670,7 @@ static void MiniRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3767,7 +3684,7 @@ static void MiniRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3789,7 +3706,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19042), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3803,7 +3720,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19041), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3815,7 +3732,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3825,10 +3742,10 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3862,7 +3779,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3896,10 +3813,10 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -3933,7 +3850,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -3950,7 +3867,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19032), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3967,16 +3884,16 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19022), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3987,7 +3904,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4007,7 +3924,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19042), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4021,16 +3938,16 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19041), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4041,10 +3958,10 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4078,7 +3995,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4111,10 +4028,10 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4148,7 +4065,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4158,7 +4075,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19022), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4172,7 +4089,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19032), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4187,7 +4104,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4197,7 +4114,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4217,7 +4134,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19000), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4231,7 +4148,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19010), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4246,7 +4163,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4256,10 +4173,10 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4293,7 +4210,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4326,10 +4243,10 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4363,7 +4280,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4383,7 +4300,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19020), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4397,16 +4314,16 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19019), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4417,7 +4334,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4434,7 +4351,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19010), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4451,16 +4368,16 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19000), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4471,10 +4388,10 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4508,7 +4425,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4542,10 +4459,10 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4579,7 +4496,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4592,7 +4509,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19020), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4606,7 +4523,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, direction, session.TrackColours.WithIndex(19019), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4618,7 +4535,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4628,7 +4545,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4643,7 +4560,7 @@ static void MiniRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4657,7 +4574,7 @@ static void MiniRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4701,9 +4618,10 @@ static void MiniRCTrackLeftQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A4E3C */ @@ -4746,9 +4664,10 @@ static void MiniRCTrackRightQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A4E4C */ @@ -4781,8 +4700,7 @@ static void MiniRCTrackBrakes( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -4797,13 +4715,9 @@ static void MiniRCTrackBrakes( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A50CC */ @@ -4819,8 +4733,7 @@ static void MiniRCTrack25DegUpLeftBanked( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -4839,8 +4752,7 @@ static void MiniRCTrack25DegUpLeftBanked( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -4856,18 +4768,14 @@ static void MiniRCTrack25DegUpLeftBanked( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A50DC */ @@ -4883,8 +4791,7 @@ static void MiniRCTrack25DegUpRightBanked( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -4903,8 +4810,7 @@ static void MiniRCTrack25DegUpRightBanked( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -4920,18 +4826,14 @@ static void MiniRCTrack25DegUpRightBanked( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A4E8C */ @@ -4941,7 +4843,7 @@ static void MiniRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Fork, 6); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType, 6); switch (direction) { @@ -4967,9 +4869,9 @@ static void MiniRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A50EC */ @@ -5003,7 +4905,7 @@ static void MiniRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(19076), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5017,7 +4919,7 @@ static void MiniRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(19084), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5029,14 +4931,11 @@ static void MiniRCTrackLeftEighthToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5070,7 +4969,7 @@ static void MiniRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5104,7 +5003,7 @@ static void MiniRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5115,7 +5014,7 @@ static void MiniRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5125,7 +5024,7 @@ static void MiniRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(19079), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5139,7 +5038,7 @@ static void MiniRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(19087), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5157,7 +5056,7 @@ static void MiniRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5177,7 +5076,7 @@ static void MiniRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(19060), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5191,7 +5090,7 @@ static void MiniRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(19068), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5203,14 +5102,11 @@ static void MiniRCTrackRightEighthToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5244,7 +5140,7 @@ static void MiniRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5278,7 +5174,7 @@ static void MiniRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5289,7 +5185,7 @@ static void MiniRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5299,7 +5195,7 @@ static void MiniRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(19063), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5313,7 +5209,7 @@ static void MiniRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(19071), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5331,7 +5227,7 @@ static void MiniRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5369,7 +5265,7 @@ static void MiniRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19108), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5383,7 +5279,7 @@ static void MiniRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19116), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5395,14 +5291,11 @@ static void MiniRCTrackLeftEighthBankToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5436,7 +5329,7 @@ static void MiniRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5470,7 +5363,7 @@ static void MiniRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5481,7 +5374,7 @@ static void MiniRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5491,7 +5384,7 @@ static void MiniRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19111), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5505,7 +5398,7 @@ static void MiniRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19119), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5523,7 +5416,7 @@ static void MiniRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5543,7 +5436,7 @@ static void MiniRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19092), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5557,7 +5450,7 @@ static void MiniRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19100), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5569,14 +5462,11 @@ static void MiniRCTrackRightEighthBankToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5610,7 +5500,7 @@ static void MiniRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5644,7 +5534,7 @@ static void MiniRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5655,7 +5545,7 @@ static void MiniRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5665,7 +5555,7 @@ static void MiniRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19095), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5679,7 +5569,7 @@ static void MiniRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(19103), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5697,7 +5587,7 @@ static void MiniRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5725,172 +5615,22 @@ static void MiniRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19189), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19127), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19186), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19124), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19188), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19126), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19187), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopCorner, 6, height, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomCorner, 6, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(19125), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopCorner, 6, height, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomCorner, 6, height, - session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { 19124, 19125, 19126, 19127 }, + { 19186, 19187, 19188, 19189 }, + }; + + TrackPaintUtilDiagTilesPaint( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); + + if (trackSequence == 3) + MetalASupportsPaintSetupRotated( + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 6, height, session.SupportColours); + + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A4F4C */ @@ -5931,7 +5671,7 @@ static void MiniRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -5963,7 +5703,7 @@ static void MiniRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -5996,7 +5736,7 @@ static void MiniRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -6005,7 +5745,7 @@ static void MiniRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6017,8 +5757,7 @@ static void MiniRCTrackDiag25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6033,7 +5772,7 @@ static void MiniRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6045,8 +5784,7 @@ static void MiniRCTrackDiag25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6063,7 +5801,7 @@ static void MiniRCTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6092,7 +5830,7 @@ static void MiniRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -6110,7 +5848,7 @@ static void MiniRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -6129,14 +5867,14 @@ static void MiniRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 38, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 38, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6147,7 +5885,7 @@ static void MiniRCTrackDiag60DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 38, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 38, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6163,7 +5901,7 @@ static void MiniRCTrackDiag60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -6206,7 +5944,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -6238,7 +5976,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -6271,7 +6009,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -6280,7 +6018,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6292,7 +6030,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6307,7 +6045,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6319,7 +6057,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6336,7 +6074,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6365,7 +6103,7 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -6383,7 +6121,7 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -6402,14 +6140,14 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 22, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 22, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6420,7 +6158,7 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 22, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 22, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6436,7 +6174,7 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6465,7 +6203,7 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -6483,7 +6221,7 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -6502,14 +6240,14 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 27, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 27, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6520,7 +6258,7 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 27, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 27, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6536,7 +6274,7 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -6579,7 +6317,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -6611,7 +6349,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -6644,7 +6382,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -6653,7 +6391,7 @@ static void MiniRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6665,8 +6403,7 @@ static void MiniRCTrackDiag25DegUpToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6681,7 +6418,7 @@ static void MiniRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6693,8 +6430,7 @@ static void MiniRCTrackDiag25DegUpToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6711,7 +6447,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6754,7 +6490,7 @@ static void MiniRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -6786,7 +6522,7 @@ static void MiniRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -6819,7 +6555,7 @@ static void MiniRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -6828,7 +6564,7 @@ static void MiniRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6840,8 +6576,7 @@ static void MiniRCTrackDiag25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6856,7 +6591,7 @@ static void MiniRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6868,8 +6603,7 @@ static void MiniRCTrackDiag25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6886,7 +6620,7 @@ static void MiniRCTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6915,7 +6649,7 @@ static void MiniRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -6933,7 +6667,7 @@ static void MiniRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -6952,14 +6686,14 @@ static void MiniRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 30, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 30, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6970,7 +6704,7 @@ static void MiniRCTrackDiag60DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 30, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 30, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -6986,7 +6720,7 @@ static void MiniRCTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -7100,7 +6834,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7112,8 +6846,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -7128,7 +6861,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7140,8 +6873,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -7161,7 +6893,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A4FBC */ @@ -7188,7 +6920,7 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -7206,7 +6938,7 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7225,14 +6957,14 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 23, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 23, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7243,7 +6975,7 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 23, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 23, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -7259,7 +6991,7 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7288,7 +7020,7 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -7306,7 +7038,7 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7325,14 +7057,14 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7343,7 +7075,7 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 14, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -7359,7 +7091,7 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7402,7 +7134,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -7434,7 +7166,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -7467,7 +7199,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -7476,7 +7208,7 @@ static void MiniRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7488,7 +7220,7 @@ static void MiniRCTrackDiag25DegDownToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -7503,7 +7235,7 @@ static void MiniRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7515,7 +7247,7 @@ static void MiniRCTrackDiag25DegDownToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -7532,7 +7264,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -7561,7 +7293,7 @@ static void MiniRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7582,7 +7314,7 @@ static void MiniRCTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7601,14 +7333,14 @@ static void MiniRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7619,7 +7351,7 @@ static void MiniRCTrackDiagFlatToLeftBank( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -7634,7 +7366,7 @@ static void MiniRCTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7663,7 +7395,7 @@ static void MiniRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7681,7 +7413,7 @@ static void MiniRCTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7703,14 +7435,14 @@ static void MiniRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7721,7 +7453,7 @@ static void MiniRCTrackDiagFlatToRightBank( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -7736,7 +7468,7 @@ static void MiniRCTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7765,7 +7497,7 @@ static void MiniRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7786,7 +7518,7 @@ static void MiniRCTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7805,14 +7537,14 @@ static void MiniRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7823,7 +7555,7 @@ static void MiniRCTrackDiagLeftBankToFlat( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -7838,7 +7570,7 @@ static void MiniRCTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7867,7 +7599,7 @@ static void MiniRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7885,7 +7617,7 @@ static void MiniRCTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7907,14 +7639,14 @@ static void MiniRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7925,7 +7657,7 @@ static void MiniRCTrackDiagRightBankToFlat( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -7940,7 +7672,7 @@ static void MiniRCTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7969,7 +7701,7 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -7990,7 +7722,7 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8009,14 +7741,14 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8027,7 +7759,7 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -8042,7 +7774,7 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8071,7 +7803,7 @@ static void MiniRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8089,7 +7821,7 @@ static void MiniRCTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8111,14 +7843,14 @@ static void MiniRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8129,7 +7861,7 @@ static void MiniRCTrackDiagRightBankTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -8144,7 +7876,7 @@ static void MiniRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8173,7 +7905,7 @@ static void MiniRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -8194,7 +7926,7 @@ static void MiniRCTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -8213,14 +7945,14 @@ static void MiniRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8231,7 +7963,7 @@ static void MiniRCTrackDiag25DegUpToLeftBank( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -8247,7 +7979,7 @@ static void MiniRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -8276,7 +8008,7 @@ static void MiniRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -8294,7 +8026,7 @@ static void MiniRCTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -8316,14 +8048,14 @@ static void MiniRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8334,7 +8066,7 @@ static void MiniRCTrackDiag25DegUpToRightBank( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -8350,7 +8082,7 @@ static void MiniRCTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -8423,7 +8155,7 @@ static void MiniRCTrackDiagLeftBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8434,7 +8166,7 @@ static void MiniRCTrackDiagLeftBankTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -8453,7 +8185,7 @@ static void MiniRCTrackDiagLeftBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A509C */ @@ -8524,7 +8256,7 @@ static void MiniRCTrackDiagRightBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 10, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8535,7 +8267,7 @@ static void MiniRCTrackDiagRightBankTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 10, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -8554,7 +8286,7 @@ static void MiniRCTrackDiagRightBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A50AC */ @@ -8581,7 +8313,7 @@ static void MiniRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8602,7 +8334,7 @@ static void MiniRCTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8621,14 +8353,14 @@ static void MiniRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8639,7 +8371,7 @@ static void MiniRCTrackDiag25DegDownToLeftBank( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -8654,7 +8386,7 @@ static void MiniRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8683,7 +8415,7 @@ static void MiniRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8701,7 +8433,7 @@ static void MiniRCTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8723,14 +8455,14 @@ static void MiniRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8741,7 +8473,7 @@ static void MiniRCTrackDiag25DegDownToRightBank( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -8756,7 +8488,7 @@ static void MiniRCTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8785,7 +8517,7 @@ static void MiniRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8803,7 +8535,7 @@ static void MiniRCTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8822,14 +8554,14 @@ static void MiniRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8840,7 +8572,7 @@ static void MiniRCTrackDiagLeftBank( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -8855,7 +8587,7 @@ static void MiniRCTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8884,7 +8616,7 @@ static void MiniRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8902,7 +8634,7 @@ static void MiniRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8921,14 +8653,14 @@ static void MiniRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8939,7 +8671,7 @@ static void MiniRCTrackDiagRightBank( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -8954,7 +8686,7 @@ static void MiniRCTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8974,8 +8706,7 @@ static void MiniRCTrackBlockBrakes( case 2: if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -8987,13 +8718,9 @@ static void MiniRCTrackBlockBrakes( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A510C */ @@ -9010,7 +8737,7 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19317), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9023,7 +8750,7 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19321), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9034,7 +8761,7 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9044,13 +8771,13 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9066,7 +8793,7 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(19318), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9079,16 +8806,16 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19314), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9099,7 +8826,7 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9118,7 +8845,7 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19306), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9131,7 +8858,7 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(19310), { 0, 6, height }, { { 0, 27, height }, { 32, 1, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9142,7 +8869,7 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9152,13 +8879,13 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9174,7 +8901,7 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(19309), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9187,16 +8914,16 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19313), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9207,7 +8934,7 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9217,7 +8944,7 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -9226,7 +8953,7 @@ static void MiniRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -9245,7 +8972,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(19286), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9259,7 +8986,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(19296), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9271,7 +8998,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9281,10 +9008,10 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9317,7 +9044,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9350,10 +9077,10 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -9387,7 +9114,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -9404,7 +9131,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(19295), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9418,16 +9145,16 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(19305), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9438,7 +9165,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9458,7 +9185,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(19266), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9472,7 +9199,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(19276), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9484,7 +9211,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9494,10 +9221,10 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9530,7 +9257,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9562,10 +9289,10 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -9599,7 +9326,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -9616,7 +9343,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(19275), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9630,16 +9357,16 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(19285), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9650,7 +9377,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9660,7 +9387,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -9669,7 +9396,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -9686,8 +9413,7 @@ static void MiniRCTrack25DegUpToLeftBanked25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -9709,8 +9435,7 @@ static void MiniRCTrack25DegUpToLeftBanked25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -9726,18 +9451,14 @@ static void MiniRCTrack25DegUpToLeftBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A519C */ @@ -9753,8 +9474,7 @@ static void MiniRCTrack25DegUpToRightBanked25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -9776,8 +9496,7 @@ static void MiniRCTrack25DegUpToRightBanked25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -9793,18 +9512,14 @@ static void MiniRCTrack25DegUpToRightBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A51AC */ @@ -9820,8 +9535,7 @@ static void MiniRCTrackLeftBanked25DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -9843,8 +9557,7 @@ static void MiniRCTrackLeftBanked25DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -9860,18 +9573,14 @@ static void MiniRCTrackLeftBanked25DegUpTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A51BC */ @@ -9887,8 +9596,7 @@ static void MiniRCTrackRightBanked25DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 1: @@ -9910,8 +9618,7 @@ static void MiniRCTrackRightBanked25DegUpTo25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); } break; case 3: @@ -9927,18 +9634,14 @@ static void MiniRCTrackRightBanked25DegUpTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A51CC */ @@ -9986,8 +9689,7 @@ static void MiniRCTrackLeftBankedFlatToLeftBanked25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -10006,8 +9708,7 @@ static void MiniRCTrackLeftBankedFlatToLeftBanked25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -10023,18 +9724,14 @@ static void MiniRCTrackLeftBankedFlatToLeftBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A521C */ @@ -10050,8 +9747,7 @@ static void MiniRCTrackRightBankedFlatToRightBanked25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -10070,8 +9766,7 @@ static void MiniRCTrackRightBankedFlatToRightBanked25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -10087,18 +9782,14 @@ static void MiniRCTrackRightBankedFlatToRightBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A524C */ @@ -10114,8 +9805,7 @@ static void MiniRCTrackLeftBanked25DegUpToLeftBankedFlat( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -10134,8 +9824,7 @@ static void MiniRCTrackLeftBanked25DegUpToLeftBankedFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -10151,18 +9840,14 @@ static void MiniRCTrackLeftBanked25DegUpToLeftBankedFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A525C */ @@ -10178,8 +9863,7 @@ static void MiniRCTrackRightBanked25DegUpToRightBankedFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -10198,8 +9882,7 @@ static void MiniRCTrackRightBanked25DegUpToRightBankedFlat( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -10215,18 +9898,14 @@ static void MiniRCTrackRightBanked25DegUpToRightBankedFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A526C */ @@ -10274,8 +9953,7 @@ static void MiniRCTrackFlatToLeftBanked25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -10297,8 +9975,7 @@ static void MiniRCTrackFlatToLeftBanked25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -10314,18 +9991,14 @@ static void MiniRCTrackFlatToLeftBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A529C */ @@ -10341,8 +10014,7 @@ static void MiniRCTrackFlatToRightBanked25DegUp( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 1: @@ -10364,8 +10036,7 @@ static void MiniRCTrackFlatToRightBanked25DegUp( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } break; case 3: @@ -10381,18 +10052,14 @@ static void MiniRCTrackFlatToRightBanked25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A52AC */ @@ -10408,8 +10075,7 @@ static void MiniRCTrackLeftBanked25DegUpToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -10431,8 +10097,7 @@ static void MiniRCTrackLeftBanked25DegUpToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -10448,18 +10113,14 @@ static void MiniRCTrackLeftBanked25DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A52BC */ @@ -10475,8 +10136,7 @@ static void MiniRCTrackRightBanked25DegUpToFlat( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 1: @@ -10498,8 +10158,7 @@ static void MiniRCTrackRightBanked25DegUpToFlat( { { 0, 27, height }, { 32, 1, 34 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } break; case 3: @@ -10515,18 +10174,14 @@ static void MiniRCTrackRightBanked25DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A52CC */ @@ -10574,7 +10229,7 @@ static void MiniRCTrackLeftCurvedLiftHill( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19333), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -10586,7 +10241,7 @@ static void MiniRCTrackLeftCurvedLiftHill( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19337), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -10597,7 +10252,7 @@ static void MiniRCTrackLeftCurvedLiftHill( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10607,13 +10262,13 @@ static void MiniRCTrackLeftCurvedLiftHill( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -10628,7 +10283,7 @@ static void MiniRCTrackLeftCurvedLiftHill( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19334), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 17, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -10640,16 +10295,16 @@ static void MiniRCTrackLeftCurvedLiftHill( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19330), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 17, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -10660,7 +10315,7 @@ static void MiniRCTrackLeftCurvedLiftHill( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10678,7 +10333,7 @@ static void MiniRCTrackRightCurvedLiftHill( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19322), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -10690,7 +10345,7 @@ static void MiniRCTrackRightCurvedLiftHill( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19326), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -10701,7 +10356,7 @@ static void MiniRCTrackRightCurvedLiftHill( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10711,13 +10366,13 @@ static void MiniRCTrackRightCurvedLiftHill( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -10732,7 +10387,7 @@ static void MiniRCTrackRightCurvedLiftHill( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19325), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 17, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -10744,16 +10399,16 @@ static void MiniRCTrackRightCurvedLiftHill( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(19329), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 17, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -10764,7 +10419,7 @@ static void MiniRCTrackRightCurvedLiftHill( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10782,8 +10437,7 @@ static void MiniRCTrackBooster( { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } break; case 1: @@ -10798,13 +10452,9 @@ static void MiniRCTrackBooster( } break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp index 76c5b93f6e..0f56de3a48 100644 --- a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp @@ -12,12 +12,22 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Fork; + +static constexpr ImageIndex kMiniSuspendedRCFlatImages[2][kNumOrthogonalDirections] = { + { 28491, 28492, 28493, 28494 }, + { 28507, 28508, 28509, 28510 }, +}; + /** rct2: 0x008AFE9C */ static void MiniSuspendedRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -56,11 +66,7 @@ static void MiniSuspendedRCTrackFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) @@ -68,7 +74,7 @@ static void MiniSuspendedRCTrackFlat( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -78,8 +84,8 @@ static void MiniSuspendedRCTrackFlat( } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AFF4C, 0x008AFF5C, 0x008AFF6C */ @@ -104,9 +110,9 @@ static void MiniSuspendedRCTrackStation( { { 0, 2, height }, { 32, 20, 1 } }); DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AFEAC */ @@ -167,18 +173,14 @@ static void MiniSuspendedRCTrack25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopRightSide, 0, height + 46, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 46, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -187,7 +189,7 @@ static void MiniSuspendedRCTrack25DegUp( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomLeftSide, 0, height + 46, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 46, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -198,13 +200,13 @@ static void MiniSuspendedRCTrack25DegUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AFEBC */ @@ -265,18 +267,14 @@ static void MiniSuspendedRCTrackFlatTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopRightSide, 0, height + 38, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -285,7 +283,7 @@ static void MiniSuspendedRCTrackFlatTo25DegUp( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomLeftSide, 0, height + 38, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -296,13 +294,13 @@ static void MiniSuspendedRCTrackFlatTo25DegUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008AFECC */ @@ -363,18 +361,14 @@ static void MiniSuspendedRCTrack25DegUpToFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopRightSide, 0, height + 38, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 38, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -383,7 +377,7 @@ static void MiniSuspendedRCTrack25DegUpToFlat( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomLeftSide, 0, height + 38, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 38, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -394,13 +388,13 @@ static void MiniSuspendedRCTrack25DegUpToFlat( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AFEDC */ @@ -468,7 +462,7 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -479,12 +473,12 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -514,7 +508,7 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -544,10 +538,10 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -577,7 +571,7 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -618,20 +612,20 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( case 1: case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -641,7 +635,7 @@ static void MiniSuspendedRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MiniSuspendedRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -686,7 +680,7 @@ static void MiniSuspendedRCTrackSBendLeft( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -697,9 +691,9 @@ static void MiniSuspendedRCTrackSBendLeft( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -734,8 +728,7 @@ static void MiniSuspendedRCTrackSBendLeft( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 0, height + 30, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 30, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -744,7 +737,7 @@ static void MiniSuspendedRCTrackSBendLeft( break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -779,8 +772,7 @@ static void MiniSuspendedRCTrackSBendLeft( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 0, height + 30, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 30, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -789,7 +781,7 @@ static void MiniSuspendedRCTrackSBendLeft( break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -825,7 +817,7 @@ static void MiniSuspendedRCTrackSBendLeft( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -837,13 +829,13 @@ static void MiniSuspendedRCTrackSBendLeft( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -889,7 +881,7 @@ static void MiniSuspendedRCTrackSBendRight( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -900,9 +892,9 @@ static void MiniSuspendedRCTrackSBendRight( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -937,8 +929,7 @@ static void MiniSuspendedRCTrackSBendRight( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 0, height + 30, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 30, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -947,7 +938,7 @@ static void MiniSuspendedRCTrackSBendRight( break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -982,8 +973,7 @@ static void MiniSuspendedRCTrackSBendRight( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 0, height + 30, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 30, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -992,7 +982,7 @@ static void MiniSuspendedRCTrackSBendRight( break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -1028,7 +1018,7 @@ static void MiniSuspendedRCTrackSBendRight( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -1040,13 +1030,13 @@ static void MiniSuspendedRCTrackSBendRight( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1092,7 +1082,7 @@ static void MiniSuspendedRCTrackLeftQuarterTurn3( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -1103,12 +1093,12 @@ static void MiniSuspendedRCTrackLeftQuarterTurn3( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1138,7 +1128,7 @@ static void MiniSuspendedRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1179,20 +1169,20 @@ static void MiniSuspendedRCTrackLeftQuarterTurn3( case 1: case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1202,7 +1192,7 @@ static void MiniSuspendedRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MiniSuspendedRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1251,7 +1241,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -1262,9 +1252,9 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -1298,7 +1288,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1332,7 +1322,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1343,7 +1333,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -1382,8 +1372,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomCorner, 0, height + 30, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 30, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -1392,7 +1381,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopCorner, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 30, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -1401,7 +1390,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1451,7 +1440,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( case 0: case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 30, session.SupportColours); break; case 1: case 3: @@ -1462,9 +1451,9 @@ static void MiniSuspendedRCTrackRightEighthToDiag( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -1498,7 +1487,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1532,7 +1521,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1543,7 +1532,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -1582,7 +1571,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 30, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 30, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -1591,8 +1580,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 30, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 30, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -1601,7 +1589,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1629,164 +1617,18 @@ static void MiniSuspendedRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28510), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 1 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28494), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 1 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28507), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 1 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28491), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 1 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28509), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 1 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28493), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 1 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28508), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 1 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28492), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 1 } }); - break; - } - } + const auto* images = kMiniSuspendedRCFlatImages[trackElement.HasChain()]; + TrackPaintUtilDiagTilesPaint( + session, 1, height + 24, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 30, session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopCorner, 0, height + 30, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 30, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomCorner, 0, height + 30, - session.SupportColours); - break; - } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } + if (trackSequence == 3) + MetalASupportsPaintSetupRotated( + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 0, height + 30, session.SupportColours); + + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008B000C */ @@ -1827,7 +1669,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -1859,7 +1701,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -1892,7 +1734,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -1930,7 +1772,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -1939,8 +1781,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -1949,7 +1790,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1992,7 +1833,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -2024,7 +1865,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -2057,7 +1898,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -2095,7 +1936,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 34, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 34, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -2104,8 +1945,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 34, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 34, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -2114,7 +1954,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -2157,7 +1997,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -2189,7 +2029,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -2222,7 +2062,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -2260,7 +2100,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -2269,8 +2109,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -2279,7 +2118,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2322,7 +2161,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -2354,7 +2193,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -2387,7 +2226,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -2425,7 +2264,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -2434,8 +2273,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -2444,7 +2282,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2587,7 +2425,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -2596,8 +2434,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -2608,7 +2445,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008B002C */ @@ -2649,7 +2486,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -2681,7 +2518,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -2714,7 +2551,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -2752,7 +2589,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::LeftCorner, 0, height + 34, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 34, session.SupportColours); break; case 1: MetalASupportsPaintSetup( @@ -2761,8 +2598,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::RightCorner, 0, height + 34, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 34, session.SupportColours); break; case 3: MetalASupportsPaintSetup( @@ -2771,7 +2607,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } diff --git a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp index 8fd95f3711..016c8368b7 100644 --- a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::TubesInverted; + static constexpr uint32_t MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_OPEN = 15812; static constexpr uint32_t MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_OPEN = 15813; static constexpr uint32_t MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_CLOSED = 15814; @@ -33,7 +38,7 @@ static constexpr uint32_t MULTI_DIM_INVERTED_BLOCK_BRAKE_NW_SE_OPEN = 26552; static constexpr uint32_t MULTI_DIM_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED = 26553; static constexpr uint32_t MULTI_DIM_INVERTED_BLOCK_BRAKE_NW_SE_CLOSED = 26554; -static constexpr const uint32_t MultidimDiagBrakeImages[2][NumOrthogonalDirections] = { +static constexpr const uint32_t MultidimDiagBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_MULTIDIM_UPRIGHT_DIAG_BRAKES, SPR_G2_MULTIDIM_UPRIGHT_DIAG_BRAKES + 1, @@ -48,7 +53,7 @@ static constexpr const uint32_t MultidimDiagBrakeImages[2][NumOrthogonalDirectio }, }; -static constexpr const uint32_t MultidimDiagBlockBrakeImages[2][2][NumOrthogonalDirections] = { +static constexpr const uint32_t MultidimDiagBlockBrakeImages[2][2][kNumOrthogonalDirections] = { { { SPR_G2_MULTIDIM_UPRIGHT_DIAG_BRAKES + 3, @@ -105,8 +110,7 @@ static void MultiDimensionRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else @@ -128,13 +132,12 @@ static void MultiDimensionRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -155,18 +158,14 @@ static void MultiDimensionRCTrackFlat( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -175,7 +174,7 @@ static void MultiDimensionRCTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr uint32_t imageIds[NumOrthogonalDirections][3] = { + 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 }, @@ -196,7 +195,7 @@ static void MultiDimensionRCTrackStation( session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 3, height + 3 }, { 32, 26, 1 } }); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); auto stationColour = GetStationColourScheme(session, trackElement); const auto* stationObj = ride.GetStationObject(); @@ -223,9 +222,9 @@ static void MultiDimensionRCTrackStation( TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height, stationColour); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00792D98 */ @@ -262,8 +261,7 @@ static void MultiDimensionRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else @@ -293,20 +291,19 @@ static void MultiDimensionRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } else { @@ -335,46 +332,39 @@ static void MultiDimensionRCTrack25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } } @@ -410,19 +400,18 @@ static void MultiDimensionRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 24, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 24, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } else { @@ -451,18 +440,15 @@ static void MultiDimensionRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } } @@ -500,8 +486,7 @@ static void MultiDimensionRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else @@ -531,20 +516,19 @@ static void MultiDimensionRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -573,46 +557,39 @@ static void MultiDimensionRCTrackFlatTo25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 46, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 46, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 46, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 46, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } } @@ -654,19 +631,18 @@ static void MultiDimensionRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } else { @@ -701,18 +677,15 @@ static void MultiDimensionRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -754,19 +727,18 @@ static void MultiDimensionRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } else { @@ -801,46 +773,39 @@ static void MultiDimensionRCTrack60DegUpTo25DegUp( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 68, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 68, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 68, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 68, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 68, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 68, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 68, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 68, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } } @@ -878,8 +843,7 @@ static void MultiDimensionRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } else @@ -909,20 +873,19 @@ static void MultiDimensionRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -951,46 +914,39 @@ static void MultiDimensionRCTrack25DegUpToFlat( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } } @@ -1075,17 +1031,16 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1119,7 +1074,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1153,10 +1108,10 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1190,7 +1145,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1216,15 +1171,14 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1235,7 +1189,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1277,17 +1231,16 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1321,7 +1274,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1355,10 +1308,10 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1392,7 +1345,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1428,19 +1381,18 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1451,7 +1403,7 @@ static void MultiDimensionRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MultiDimensionRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1493,12 +1445,11 @@ static void MultiDimensionRCTrackFlatToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -1536,12 +1487,11 @@ static void MultiDimensionRCTrackFlatToLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -1583,12 +1533,11 @@ static void MultiDimensionRCTrackFlatToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -1626,12 +1575,11 @@ static void MultiDimensionRCTrackFlatToRightBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -1673,12 +1621,11 @@ static void MultiDimensionRCTrackLeftBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -1716,12 +1663,11 @@ static void MultiDimensionRCTrackLeftBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -1763,12 +1709,11 @@ static void MultiDimensionRCTrackRightBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -1806,12 +1751,11 @@ static void MultiDimensionRCTrackRightBankToFlat( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -1851,17 +1795,16 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1895,7 +1838,7 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1929,10 +1872,10 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1966,7 +1909,7 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1995,15 +1938,14 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2014,7 +1956,7 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2056,17 +1998,16 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2098,7 +2039,7 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2131,10 +2072,10 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -2166,7 +2107,7 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -2202,19 +2143,18 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2225,7 +2165,7 @@ static void MultiDimensionRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MultiDimensionRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2267,19 +2207,18 @@ static void MultiDimensionRCTrackLeftBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -2321,36 +2260,32 @@ static void MultiDimensionRCTrackLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } } @@ -2392,19 +2327,18 @@ static void MultiDimensionRCTrackRightBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -2446,36 +2380,32 @@ static void MultiDimensionRCTrackRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } } @@ -2517,19 +2447,18 @@ static void MultiDimensionRCTrack25DegUpToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -2571,36 +2500,32 @@ static void MultiDimensionRCTrack25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } } @@ -2642,19 +2567,18 @@ static void MultiDimensionRCTrack25DegUpToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } else { @@ -2696,36 +2620,32 @@ static void MultiDimensionRCTrack25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } } @@ -2793,12 +2713,11 @@ static void MultiDimensionRCTrackLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -2836,12 +2755,11 @@ static void MultiDimensionRCTrackLeftBank( 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -2886,14 +2804,13 @@ static void MultiDimensionRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2902,15 +2819,13 @@ static void MultiDimensionRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15817), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15821), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 1, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2924,7 +2839,7 @@ static void MultiDimensionRCTrackSBendLeft( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2943,19 +2858,17 @@ static void MultiDimensionRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15817), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15821), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 1, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2981,19 +2894,18 @@ static void MultiDimensionRCTrackSBendLeft( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3035,14 +2947,13 @@ static void MultiDimensionRCTrackSBendLeft( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3081,17 +2992,15 @@ static void MultiDimensionRCTrackSBendLeft( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3130,17 +3039,15 @@ static void MultiDimensionRCTrackSBendLeft( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3176,19 +3083,18 @@ static void MultiDimensionRCTrackSBendLeft( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3227,14 +3133,13 @@ static void MultiDimensionRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3244,16 +3149,14 @@ static void MultiDimensionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(15825), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15829), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3265,7 +3168,7 @@ static void MultiDimensionRCTrackSBendRight( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3283,20 +3186,18 @@ static void MultiDimensionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(15825), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15829), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3322,19 +3223,18 @@ static void MultiDimensionRCTrackSBendRight( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3376,14 +3276,13 @@ static void MultiDimensionRCTrackSBendRight( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3422,17 +3321,15 @@ static void MultiDimensionRCTrackSBendRight( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3471,17 +3368,15 @@ static void MultiDimensionRCTrackSBendRight( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3517,19 +3412,18 @@ static void MultiDimensionRCTrackSBendRight( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3568,17 +3462,16 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3612,7 +3505,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3638,15 +3531,14 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3657,7 +3549,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3699,17 +3591,16 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3743,7 +3634,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3779,19 +3670,18 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3802,7 +3692,7 @@ static void MultiDimensionRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MultiDimensionRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3842,17 +3732,16 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3886,7 +3775,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3915,15 +3804,14 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3934,7 +3822,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3976,17 +3864,16 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4020,7 +3907,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4056,19 +3943,18 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4079,7 +3965,7 @@ static void MultiDimensionRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MultiDimensionRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4117,17 +4003,16 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4161,7 +4046,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4190,15 +4075,14 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4209,7 +4093,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4238,22 +4122,21 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4287,7 +4170,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4316,14 +4199,13 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4362,17 +4244,16 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4406,7 +4287,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4435,19 +4316,18 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4476,15 +4356,14 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4495,10 +4374,10 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4532,7 +4411,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4561,14 +4440,13 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4583,7 +4461,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MultiDimensionRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4597,7 +4475,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; MultiDimensionRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4635,17 +4513,16 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4679,7 +4556,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4713,10 +4590,10 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4750,7 +4627,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4779,15 +4656,14 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4798,7 +4674,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4827,22 +4703,21 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4876,7 +4751,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4909,10 +4784,10 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4946,7 +4821,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4975,14 +4850,13 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5021,17 +4895,16 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5065,7 +4938,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5098,10 +4971,10 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -5135,7 +5008,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -5164,19 +5037,18 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -5205,15 +5077,14 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5224,10 +5095,10 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -5261,7 +5132,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -5295,10 +5166,10 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -5332,7 +5203,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -5361,14 +5232,13 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5383,7 +5253,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MultiDimensionRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -5397,7 +5267,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; MultiDimensionRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -5425,12 +5295,11 @@ static void MultiDimensionRCTrackBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { @@ -5451,18 +5320,14 @@ static void MultiDimensionRCTrackBrakes( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -5473,7 +5338,7 @@ static void MultiDimensionRCTrackOnRidePhoto( { if (!trackElement.IsInverted()) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -5499,9 +5364,9 @@ static void MultiDimensionRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } else { @@ -5511,11 +5376,9 @@ static void MultiDimensionRCTrackOnRidePhoto( PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(26227), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); @@ -5524,11 +5387,9 @@ static void MultiDimensionRCTrackOnRidePhoto( PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height, session.SupportColours); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(26228), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); @@ -5537,11 +5398,9 @@ static void MultiDimensionRCTrackOnRidePhoto( PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(26227), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); @@ -5550,20 +5409,18 @@ static void MultiDimensionRCTrackOnRidePhoto( PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height, session.SupportColours); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(26228), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } } @@ -5602,12 +5459,8 @@ static void MultiDimensionRCTrack90DegUp( } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -5643,12 +5496,8 @@ static void MultiDimensionRCTrack90DegUp( } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -5699,16 +5548,12 @@ static void MultiDimensionRCTrack60DegUpTo90DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: break; @@ -5744,16 +5589,12 @@ static void MultiDimensionRCTrack60DegUpTo90DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: break; @@ -5802,18 +5643,15 @@ static void MultiDimensionRCTrack90DegUpTo60DegUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); } else { @@ -5843,18 +5681,15 @@ static void MultiDimensionRCTrack90DegUpTo60DegUp( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::InvertedSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::InvertedSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); } } @@ -5893,15 +5728,11 @@ static void MultiDimensionRCTrack60DegDownTo90DegDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: break; @@ -5937,15 +5768,11 @@ static void MultiDimensionRCTrack60DegDownTo90DegDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::InvertedSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -5986,14 +5813,13 @@ static void MultiDimensionRCTrackLeftEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6020,7 +5846,7 @@ static void MultiDimensionRCTrackLeftEighthToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6054,7 +5880,7 @@ static void MultiDimensionRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6065,7 +5891,7 @@ static void MultiDimensionRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6075,36 +5901,32 @@ static void MultiDimensionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(15999), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16003), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16007), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16011), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6138,20 +5960,15 @@ static void MultiDimensionRCTrackLeftEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6185,7 +6002,7 @@ static void MultiDimensionRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6219,7 +6036,7 @@ static void MultiDimensionRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6230,7 +6047,7 @@ static void MultiDimensionRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6269,27 +6086,23 @@ static void MultiDimensionRCTrackLeftEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6328,14 +6141,13 @@ static void MultiDimensionRCTrackRightEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6362,7 +6174,7 @@ static void MultiDimensionRCTrackRightEighthToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6396,7 +6208,7 @@ static void MultiDimensionRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6407,7 +6219,7 @@ static void MultiDimensionRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6417,36 +6229,32 @@ static void MultiDimensionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(15983), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15987), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15991), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(15995), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6480,20 +6288,15 @@ static void MultiDimensionRCTrackRightEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6527,7 +6330,7 @@ static void MultiDimensionRCTrackRightEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6561,7 +6364,7 @@ static void MultiDimensionRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6572,7 +6375,7 @@ static void MultiDimensionRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6611,27 +6414,23 @@ static void MultiDimensionRCTrackRightEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6688,14 +6487,13 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6722,7 +6520,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6756,7 +6554,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6767,7 +6565,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6777,36 +6575,32 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(16031), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16035), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16039), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16043), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6848,14 +6642,13 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6889,7 +6682,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6923,7 +6716,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6934,7 +6727,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6974,27 +6767,23 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7033,14 +6822,13 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7067,7 +6855,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7101,7 +6889,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -7112,7 +6900,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -7122,36 +6910,32 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(16015), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16019), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16023), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16027), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7193,14 +6977,13 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -7234,7 +7017,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -7268,7 +7051,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -7279,7 +7062,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -7318,27 +7101,23 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7402,7 +7181,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (trackElement.HasChain()) @@ -7435,7 +7214,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (trackElement.HasChain()) @@ -7468,7 +7247,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (trackElement.HasChain()) @@ -7477,26 +7256,22 @@ static void MultiDimensionRCTrackDiagFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16107), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -7506,26 +7281,22 @@ static void MultiDimensionRCTrackDiagFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16045), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -7537,7 +7308,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7576,7 +7347,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: if (trackElement.HasChain()) @@ -7609,7 +7380,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: if (trackElement.HasChain()) @@ -7642,7 +7413,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: if (trackElement.HasChain()) @@ -7680,27 +7451,23 @@ static void MultiDimensionRCTrackDiagFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7710,37 +7477,36 @@ static void MultiDimensionRCTrackDiagBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; if (trackElement.IsInverted()) { TrackPaintUtilDiagTilesPaint( - session, -3, height + 24, direction, trackSequence, session.TrackColours, MultidimDiagBrakeImages[1], - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, -3, height + 24, direction, trackSequence, MultidimDiagBrakeImages[1], defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 36, - session.SupportColours); + session, kSupportType, kDiagSupportPlacement[direction], 0, height + 36, session.SupportColours); } } else { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, MultidimDiagBrakeImages[0], - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 3, height, direction, trackSequence, MultidimDiagBrakeImages[0], defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height, session.SupportColours); + session, kSupportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -7748,39 +7514,36 @@ static void MultiDimensionRCTrackDiagBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; if (trackElement.IsInverted()) { TrackPaintUtilDiagTilesPaint( - session, -3, height + 24, direction, trackSequence, session.TrackColours, - MultidimDiagBlockBrakeImages[1][trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, -3, height + 24, direction, trackSequence, MultidimDiagBlockBrakeImages[1][trackElement.IsBrakeClosed()], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 36, - session.SupportColours); + session, kSupportType, kDiagSupportPlacement[direction], 0, height + 36, session.SupportColours); } } else { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, - MultidimDiagBlockBrakeImages[0][trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 3, height, direction, trackSequence, MultidimDiagBlockBrakeImages[0][trackElement.IsBrakeClosed()], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height, session.SupportColours); + session, kSupportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -7824,7 +7587,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7857,7 +7620,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7890,7 +7653,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7899,26 +7662,22 @@ static void MultiDimensionRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16119), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7928,26 +7687,22 @@ static void MultiDimensionRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16057), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7959,7 +7714,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7998,7 +7753,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -8031,7 +7786,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -8064,7 +7819,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -8102,27 +7857,23 @@ static void MultiDimensionRCTrackDiag25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -8154,7 +7905,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -8173,7 +7924,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -8192,33 +7943,29 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16069), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8229,7 +7976,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -8254,7 +8001,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -8273,7 +8020,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -8292,7 +8039,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -8316,27 +8063,23 @@ static void MultiDimensionRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height + 36, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height + 36, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height + 36, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -8382,7 +8125,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -8415,7 +8158,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -8448,7 +8191,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -8457,26 +8200,22 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16111), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -8486,26 +8225,22 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16049), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -8517,7 +8252,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8556,7 +8291,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -8589,7 +8324,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -8622,7 +8357,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -8660,27 +8395,23 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 40, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 40, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 40, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 40, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8712,7 +8443,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -8731,7 +8462,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -8750,33 +8481,29 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16061), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8787,7 +8514,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8812,7 +8539,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -8831,7 +8558,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -8850,7 +8577,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -8874,27 +8601,23 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height + 36, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height + 36, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height + 36, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8926,7 +8649,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -8945,7 +8668,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -8964,33 +8687,29 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16065), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9001,7 +8720,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9026,7 +8745,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -9045,7 +8764,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9064,7 +8783,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9088,27 +8807,23 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height + 36, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height + 36, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height + 36, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9154,7 +8869,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -9187,7 +8902,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -9220,7 +8935,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -9229,26 +8944,22 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16115), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -9258,26 +8969,22 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16053), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -9289,7 +8996,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9328,7 +9035,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -9361,7 +9068,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -9394,7 +9101,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -9432,27 +9139,23 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9498,7 +9201,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -9531,7 +9234,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -9564,7 +9267,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -9573,26 +9276,22 @@ static void MultiDimensionRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16121), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -9602,26 +9301,22 @@ static void MultiDimensionRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16059), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -9633,7 +9328,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9658,7 +9353,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -9677,7 +9372,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -9696,7 +9391,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -9720,27 +9415,23 @@ static void MultiDimensionRCTrackDiag25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9772,7 +9463,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -9791,7 +9482,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -9810,33 +9501,29 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16071), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9847,7 +9534,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -9872,7 +9559,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -9891,7 +9578,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -9910,7 +9597,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -9934,27 +9621,23 @@ static void MultiDimensionRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height + 36, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height + 36, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height + 36, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -10072,26 +9755,22 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16117), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -10101,26 +9780,22 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16055), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -10156,7 +9831,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -10175,7 +9850,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -10194,7 +9869,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -10218,30 +9893,26 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } break; } } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x007931C8 */ @@ -10270,7 +9941,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -10289,7 +9960,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10308,33 +9979,29 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16067), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -10345,7 +10012,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10370,7 +10037,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -10389,7 +10056,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10408,7 +10075,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -10432,27 +10099,23 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height + 36, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height + 36, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height + 36, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10484,7 +10147,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -10503,7 +10166,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10522,33 +10185,29 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16063), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -10559,7 +10218,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10584,7 +10243,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -10603,7 +10262,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10622,7 +10281,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -10646,27 +10305,23 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height + 36, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height + 36, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height + 36, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10712,7 +10367,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -10745,7 +10400,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -10778,7 +10433,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -10787,26 +10442,22 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16113), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -10816,26 +10467,22 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16051), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -10847,7 +10494,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10872,7 +10519,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -10891,7 +10538,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -10910,7 +10557,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -10934,27 +10581,23 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 40, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 40, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 40, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 40, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10986,7 +10629,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11008,7 +10651,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -11027,33 +10670,29 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16077), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11064,7 +10703,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11089,7 +10728,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11108,7 +10747,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -11127,7 +10766,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -11151,27 +10790,23 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11203,7 +10838,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11222,7 +10857,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -11244,33 +10879,29 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16082), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11281,7 +10912,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11306,7 +10937,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11325,7 +10956,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -11344,7 +10975,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -11368,27 +10999,23 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11420,7 +11047,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11442,7 +11069,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -11461,33 +11088,29 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16084), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11498,7 +11121,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11523,7 +11146,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11542,7 +11165,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -11561,7 +11184,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -11585,27 +11208,23 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11637,7 +11256,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11656,7 +11275,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -11678,33 +11297,29 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16079), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11715,7 +11330,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11740,7 +11355,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11759,7 +11374,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -11778,7 +11393,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -11802,27 +11417,23 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11854,7 +11465,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -11876,7 +11487,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -11895,33 +11506,29 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16097), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -11932,7 +11539,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11957,7 +11564,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -11976,7 +11583,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -11995,7 +11602,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -12019,27 +11626,23 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 40, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 40, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 40, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 40, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12071,7 +11674,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12090,7 +11693,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -12112,33 +11715,29 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16102), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12149,7 +11748,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12174,7 +11773,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12193,7 +11792,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -12212,7 +11811,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -12236,27 +11835,23 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 40, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 40, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 40, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 40, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12288,7 +11883,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12310,7 +11905,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12329,33 +11924,29 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16087), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12366,7 +11957,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12391,7 +11982,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12410,7 +12001,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12429,7 +12020,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -12453,27 +12044,23 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12505,7 +12092,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12524,7 +12111,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12546,33 +12133,29 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16092), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12583,7 +12166,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12608,7 +12191,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12627,7 +12210,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12646,7 +12229,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -12670,27 +12253,23 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12767,26 +12346,22 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16094), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12880,30 +12455,26 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } break; } } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x007932A8 */ @@ -12977,26 +12548,22 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16089), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13090,30 +12657,26 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } break; } } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x007932B8 */ @@ -13142,7 +12705,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13164,7 +12727,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13183,33 +12746,29 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16104), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13220,7 +12779,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13245,7 +12804,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13264,7 +12823,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13283,7 +12842,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13307,27 +12866,23 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 40, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 40, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 40, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 40, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13359,7 +12914,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13378,7 +12933,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13400,33 +12955,29 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16099), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13437,7 +12988,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13462,7 +13013,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13481,7 +13032,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13500,7 +13051,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13524,27 +13075,23 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 40, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 40, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 40, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 40, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 40, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13576,7 +13123,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13595,7 +13142,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -13614,33 +13161,29 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16073), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13651,7 +13194,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -13676,7 +13219,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13695,7 +13238,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -13714,7 +13257,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -13738,27 +13281,23 @@ static void MultiDimensionRCTrackDiagLeftBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -13790,7 +13329,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13809,7 +13348,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -13828,33 +13367,29 @@ static void MultiDimensionRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(16075), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13865,7 +13400,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -13890,7 +13425,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13909,7 +13444,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -13928,7 +13463,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -13952,27 +13487,23 @@ static void MultiDimensionRCTrackDiagRightBank( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 36, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 36, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 36, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 36, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 36, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14005,11 +13536,10 @@ static void MultiDimensionRCTrackLeftFlyerTwistUp( session, direction, session.TrackColours.WithIndex(26373), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14019,7 +13549,7 @@ static void MultiDimensionRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14050,7 +13580,7 @@ static void MultiDimensionRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14082,19 +13612,18 @@ static void MultiDimensionRCTrackLeftFlyerTwistUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14126,11 +13655,10 @@ static void MultiDimensionRCTrackRightFlyerTwistUp( session, direction, session.TrackColours.WithIndex(26385), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14140,7 +13668,7 @@ static void MultiDimensionRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14170,7 +13698,7 @@ static void MultiDimensionRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14201,19 +13729,18 @@ static void MultiDimensionRCTrackRightFlyerTwistUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14255,14 +13782,13 @@ static void MultiDimensionRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14293,7 +13819,7 @@ static void MultiDimensionRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14315,15 +13841,14 @@ static void MultiDimensionRCTrackLeftFlyerTwistDown( session, direction, session.TrackColours.WithIndex(26374), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -14334,7 +13859,7 @@ static void MultiDimensionRCTrackLeftFlyerTwistDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14375,14 +13900,13 @@ static void MultiDimensionRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -14412,7 +13936,7 @@ static void MultiDimensionRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -14434,15 +13958,14 @@ static void MultiDimensionRCTrackRightFlyerTwistDown( session, direction, session.TrackColours.WithIndex(26386), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -14453,7 +13976,7 @@ static void MultiDimensionRCTrackRightFlyerTwistDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14493,7 +14016,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14501,7 +14024,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -14533,7 +14056,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 2: switch (direction) @@ -14565,7 +14088,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: break; @@ -14601,7 +14124,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14609,7 +14132,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -14641,7 +14164,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -14673,7 +14196,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: break; @@ -14690,7 +14213,7 @@ static void MultiDimensionRCTrackBlockBrakes( if (!trackElement.IsInverted()) { - static constexpr uint32_t imageIds[NumOrthogonalDirections][2] = { + static constexpr uint32_t imageIds[kNumOrthogonalDirections][2] = { { MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED }, { MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_NW_SE_CLOSED }, { MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED }, @@ -14700,15 +14223,14 @@ static void MultiDimensionRCTrackBlockBrakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIds[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } else { - static constexpr uint32_t imageIds[NumOrthogonalDirections][2] = { + static constexpr uint32_t imageIds[kNumOrthogonalDirections][2] = { { MULTI_DIM_INVERTED_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED }, { MULTI_DIM_INVERTED_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_INVERTED_BLOCK_BRAKE_NW_SE_CLOSED }, { MULTI_DIM_INVERTED_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED }, @@ -14720,18 +14242,14 @@ static void MultiDimensionRCTrackBlockBrakes( { { 0, 6, height + 24 }, { 32, 20, 3 } }); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 36, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } } @@ -14774,7 +14292,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -14806,7 +14324,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -14834,7 +14352,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14842,7 +14360,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -14880,7 +14398,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -14912,7 +14430,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -14940,7 +14458,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14948,7 +14466,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -14989,7 +14507,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 32, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14997,7 +14515,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -15029,7 +14547,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 2: switch (direction) @@ -15061,7 +14579,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: break; @@ -15097,7 +14615,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -15105,7 +14623,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -15137,7 +14655,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -15169,7 +14687,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: break; @@ -15216,7 +14734,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -15248,7 +14766,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -15276,7 +14794,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -15284,7 +14802,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -15322,7 +14840,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -15354,7 +14872,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -15382,7 +14900,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -15390,7 +14908,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } diff --git a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp index 35ed6c1575..5458e858ed 100644 --- a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + enum { SPR_REVERSE_FREEFALL_RC_STATION_SW_NE = 22162, @@ -203,19 +208,19 @@ static void PaintReverseFreefallRCFlat( { auto imageId = session.TrackColours.WithIndex(SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { auto imageId = session.TrackColours.WithIndex(SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintReverseFreefallRCStation( @@ -235,8 +240,8 @@ static void PaintReverseFreefallRCStation( PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } else if (direction == 1 || direction == 3) { @@ -249,14 +254,14 @@ static void PaintReverseFreefallRCStation( PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 5, trackElement); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintReverseFreefallRCSlope( @@ -291,11 +296,11 @@ static void PaintReverseFreefallRCSlope( int32_t tunnelOffset = tunnelOffsets03[trackSequence]; if (direction & 1) { - PaintUtilPushTunnelRight(session, height + tunnelOffset, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + tunnelOffset, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelLeft(session, height + tunnelOffset, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + tunnelOffset, TunnelType::SquareFlat); } } else @@ -308,13 +313,13 @@ static void PaintReverseFreefallRCSlope( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); break; case 5: if (WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours)) + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours)) { ImageId floorImageId; if (direction & 1) @@ -337,7 +342,7 @@ static void PaintReverseFreefallRCSlope( { { isDirection03 ? 3 : 11, 3, height }, { isDirection03 ? 26 : 18, 26, 126 } }); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); break; case 6: if (isDirection03) @@ -355,9 +360,9 @@ static void PaintReverseFreefallRCSlope( session, direction, supportsImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); break; } } @@ -373,7 +378,7 @@ static void PaintReverseFreefallRCVertical( supportsImageId = session.SupportColours.WithIndex(reverse_freefall_rc_track_pieces_vertical_supports[direction]); PaintAddImageAsParent(session, supportsImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 79 } }); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: trackImageId = session.TrackColours.WithIndex(reverse_freefall_rc_track_pieces_vertical[direction]); @@ -389,7 +394,7 @@ static void PaintReverseFreefallRCVertical( } PaintUtilSetVerticalTunnel(session, height + 80); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; } } @@ -417,13 +422,13 @@ static void PaintReverseFreefallRCOnridePhoto( session, direction, colour.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionReverseFreefallRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp b/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp index 2d6d65f8f5..1792d4abef 100644 --- a/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp @@ -13,6 +13,9 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" @@ -21,6 +24,8 @@ #include "../Vehicle.h" #include "../VehiclePaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + #ifndef NO_VEHICLES /** * @@ -59,16 +64,14 @@ static void ReverserRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21520), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21521), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } } @@ -81,22 +84,20 @@ static void ReverserRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21504), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21505), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ReverserRCTrackStation( @@ -117,11 +118,11 @@ static void ReverserRCTrackStation( session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0086E66C */ @@ -138,7 +139,7 @@ static void ReverserRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21530), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -146,7 +147,7 @@ static void ReverserRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21531), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -154,7 +155,7 @@ static void ReverserRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21532), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -162,7 +163,7 @@ static void ReverserRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21533), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } @@ -176,7 +177,7 @@ static void ReverserRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21516), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -184,7 +185,7 @@ static void ReverserRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21517), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -192,7 +193,7 @@ static void ReverserRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21518), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -200,21 +201,21 @@ static void ReverserRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21519), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0086E67C */ @@ -231,7 +232,7 @@ static void ReverserRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21522), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 1: @@ -239,7 +240,7 @@ static void ReverserRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21523), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 2: @@ -247,7 +248,7 @@ static void ReverserRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21524), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 3: @@ -255,7 +256,7 @@ static void ReverserRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21525), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; } @@ -269,7 +270,7 @@ static void ReverserRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21508), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 1: @@ -277,7 +278,7 @@ static void ReverserRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21509), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 2: @@ -285,7 +286,7 @@ static void ReverserRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21510), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 3: @@ -293,21 +294,21 @@ static void ReverserRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21511), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0086E68C */ @@ -324,7 +325,7 @@ static void ReverserRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21526), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 1: @@ -332,7 +333,7 @@ static void ReverserRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21527), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 2: @@ -340,7 +341,7 @@ static void ReverserRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21528), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 3: @@ -348,7 +349,7 @@ static void ReverserRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21529), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; } @@ -362,7 +363,7 @@ static void ReverserRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21512), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 1: @@ -370,7 +371,7 @@ static void ReverserRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21513), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 2: @@ -378,7 +379,7 @@ static void ReverserRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21514), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 3: @@ -386,21 +387,21 @@ static void ReverserRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21515), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0086E69C */ @@ -441,33 +442,33 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21543), { 0, 2, height }, { 32, 27, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21548), { 0, 2, height }, { 32, 27, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21553), { 0, 2, height }, { 32, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21538), { 0, 2, height }, { 32, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -476,7 +477,7 @@ static void ReverserRCTrackLeftQuarterTurn5( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -485,25 +486,25 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21542), { 0, 0, height }, { 32, 16, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21547), { 0, 0, height }, { 32, 16, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21552), { 0, 16, height }, { 32, 16, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21537), { 0, 16, height }, { 32, 16, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -514,7 +515,7 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -523,25 +524,25 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21541), { 0, 16, height }, { 16, 16, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21546), { 16, 16, height }, { 16, 16, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21551), { 16, 0, height }, { 16, 16, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21536), { 0, 0, height }, { 16, 16, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -553,7 +554,7 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -562,7 +563,7 @@ static void ReverserRCTrackLeftQuarterTurn5( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -571,25 +572,25 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21540), { 16, 0, height }, { 16, 34, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21545), { 0, 0, height }, { 16, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21550), { 0, 0, height }, { 16, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21535), { 16, 0, height }, { 16, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -600,7 +601,7 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -609,38 +610,38 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21539), { 2, 0, height }, { 32, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21544), { 2, 0, height }, { 27, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21549), { 2, 0, height }, { 27, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21534), { 2, 0, height }, { 32, 32, 2 }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -650,7 +651,7 @@ static void ReverserRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; ReverserRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -669,36 +670,36 @@ static void ReverserRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21566), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21570), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21569), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21573), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -708,28 +709,28 @@ static void ReverserRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21567), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21571), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21568), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21572), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -740,7 +741,7 @@ static void ReverserRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -750,28 +751,28 @@ static void ReverserRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21568), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21572), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21567), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21571), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -782,7 +783,7 @@ static void ReverserRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -792,41 +793,41 @@ static void ReverserRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21569), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21573), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21566), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21570), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -846,36 +847,36 @@ static void ReverserRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21574), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21578), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21577), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21581), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -885,28 +886,28 @@ static void ReverserRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21575), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21579), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21576), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21580), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -917,7 +918,7 @@ static void ReverserRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -927,28 +928,28 @@ static void ReverserRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21576), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21580), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21575), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21579), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -959,7 +960,7 @@ static void ReverserRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -969,41 +970,41 @@ static void ReverserRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21577), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21581), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21574), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21578), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1023,39 +1024,39 @@ static void ReverserRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21559), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21562), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21565), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21556), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1089,7 +1090,7 @@ static void ReverserRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1099,41 +1100,41 @@ static void ReverserRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21557), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21560), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21563), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21554), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1143,7 +1144,7 @@ static void ReverserRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; ReverserRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1159,21 +1160,19 @@ static void ReverserRCTrackBrakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21506), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21507), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0086E76C */ @@ -1191,36 +1190,36 @@ static void ReverserRCTrackLeftReverser( session, direction, session.TrackColours.WithIndex(21582), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21588), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21594), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21600), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1230,32 +1229,32 @@ static void ReverserRCTrackLeftReverser( session, direction, session.TrackColours.WithIndex(21585), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21591), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21597), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21603), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1265,32 +1264,32 @@ static void ReverserRCTrackLeftReverser( session, direction, session.TrackColours.WithIndex(21586), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21592), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21598), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21604), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1300,32 +1299,32 @@ static void ReverserRCTrackLeftReverser( session, direction, session.TrackColours.WithIndex(21587), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21593), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21599), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21605), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1335,32 +1334,32 @@ static void ReverserRCTrackLeftReverser( session, direction, session.TrackColours.WithIndex(21583), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21589), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21595), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21601), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1370,41 +1369,41 @@ static void ReverserRCTrackLeftReverser( session, direction, session.TrackColours.WithIndex(21584), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21590), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21596), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21602), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1424,36 +1423,36 @@ static void ReverserRCTrackRightReverser( session, direction, session.TrackColours.WithIndex(21596), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21602), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21584), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21590), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1463,32 +1462,32 @@ static void ReverserRCTrackRightReverser( session, direction, session.TrackColours.WithIndex(21599), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21605), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21587), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21593), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1498,32 +1497,32 @@ static void ReverserRCTrackRightReverser( session, direction, session.TrackColours.WithIndex(21598), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21604), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21586), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21592), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1533,32 +1532,32 @@ static void ReverserRCTrackRightReverser( session, direction, session.TrackColours.WithIndex(21597), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21603), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21585), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21591), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1568,32 +1567,32 @@ static void ReverserRCTrackRightReverser( session, direction, session.TrackColours.WithIndex(21595), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21601), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21583), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21589), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1603,41 +1602,41 @@ static void ReverserRCTrackRightReverser( session, direction, session.TrackColours.WithIndex(21594), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21600), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21582), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21588), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } diff --git a/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp b/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp index 377e8a3501..251b0e4971 100644 --- a/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + constexpr int32_t SPR_SIDE_FRICTION_60_DEG_UP_DIR_0_B = 21658; constexpr int32_t SPR_SIDE_FRICTION_60_DEG_UP_DIR_1_A = 21647; constexpr int32_t SPR_SIDE_FRICTION_60_DEG_UP_DIR_1_B = 21659; @@ -81,8 +86,7 @@ static void SideFrictionRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21664), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -91,8 +95,7 @@ static void SideFrictionRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21665), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -101,8 +104,7 @@ static void SideFrictionRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21668), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -111,8 +113,7 @@ static void SideFrictionRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21669), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } } @@ -128,8 +129,7 @@ static void SideFrictionRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21608), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: case 3: @@ -139,14 +139,13 @@ static void SideFrictionRCTrackFlat( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21609), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x007784AC, 0x007784BC, 0x007784CC */ @@ -165,11 +164,11 @@ static void SideFrictionRCTrackStation( session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x007783AC */ @@ -189,7 +188,7 @@ static void SideFrictionRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21690), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -200,7 +199,7 @@ static void SideFrictionRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21691), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -211,7 +210,7 @@ static void SideFrictionRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21692), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -222,7 +221,7 @@ static void SideFrictionRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21693), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } @@ -239,7 +238,7 @@ static void SideFrictionRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21634), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -250,7 +249,7 @@ static void SideFrictionRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21635), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -261,7 +260,7 @@ static void SideFrictionRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21636), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -272,21 +271,21 @@ static void SideFrictionRCTrack25DegUp( session, direction, session.TrackColours.WithIndex(21637), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x007783CC */ @@ -306,7 +305,7 @@ static void SideFrictionRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21682), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 1: @@ -317,7 +316,7 @@ static void SideFrictionRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21683), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 2: @@ -328,7 +327,7 @@ static void SideFrictionRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21684), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 3: @@ -339,7 +338,7 @@ static void SideFrictionRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21685), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; } @@ -356,7 +355,7 @@ static void SideFrictionRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21626), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 1: @@ -367,7 +366,7 @@ static void SideFrictionRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21627), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 2: @@ -378,7 +377,7 @@ static void SideFrictionRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21628), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 3: @@ -389,21 +388,21 @@ static void SideFrictionRCTrackFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21629), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x007783FC */ @@ -423,7 +422,7 @@ static void SideFrictionRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21686), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 1: @@ -434,7 +433,7 @@ static void SideFrictionRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21687), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 2: @@ -445,7 +444,7 @@ static void SideFrictionRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21688), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 3: @@ -456,7 +455,7 @@ static void SideFrictionRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21689), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; } @@ -473,7 +472,7 @@ static void SideFrictionRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21630), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 1: @@ -484,7 +483,7 @@ static void SideFrictionRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21631), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 2: @@ -495,7 +494,7 @@ static void SideFrictionRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21632), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 3: @@ -506,21 +505,21 @@ static void SideFrictionRCTrack25DegUpToFlat( session, direction, session.TrackColours.WithIndex(21633), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0077840C */ @@ -564,7 +563,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21747), { 0, 2, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -573,7 +572,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21752), { 0, 2, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -582,7 +581,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21757), { 0, 2, height }, { { 0, 2, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -591,15 +590,15 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21742), { 0, 2, height }, { { 0, 2, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -608,7 +607,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -620,7 +619,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21746), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -629,7 +628,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21751), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -638,7 +637,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21756), { 0, 16, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -647,7 +646,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21741), { 0, 16, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -658,7 +657,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -670,7 +669,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21745), { 0, 16, height }, { { 0, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -679,7 +678,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21750), { 16, 16, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -688,7 +687,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21755), { 16, 0, height }, { { 16, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -697,7 +696,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21740), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -709,7 +708,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -718,7 +717,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -730,7 +729,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21744), { 16, 0, height }, { { 16, 0, height + 27 }, { 16, 34, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -739,7 +738,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21749), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -748,7 +747,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21754), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -757,7 +756,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21739), { 16, 0, height }, { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -768,7 +767,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -780,7 +779,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21743), { 2, 0, height }, { { 2, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -789,7 +788,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21748), { 2, 0, height }, { { 2, 0, height + 27 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -798,7 +797,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21753), { 2, 0, height }, { { 2, 0, height + 27 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -807,20 +806,20 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(21738), { 2, 0, height }, { { 2, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -830,7 +829,7 @@ static void SideFrictionRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; SideFrictionRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -852,7 +851,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21904), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -862,7 +861,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21908), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -872,7 +871,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21907), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -882,15 +881,15 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21911), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -903,7 +902,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21905), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -913,7 +912,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21909), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -923,7 +922,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21906), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -933,7 +932,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21910), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -944,7 +943,7 @@ static void SideFrictionRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -957,7 +956,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21906), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -967,7 +966,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21910), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -977,7 +976,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21905), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -987,7 +986,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21909), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -998,7 +997,7 @@ static void SideFrictionRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1011,7 +1010,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21907), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1021,7 +1020,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21911), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1031,7 +1030,7 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21904), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1041,20 +1040,20 @@ static void SideFrictionRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(21908), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1077,7 +1076,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21912), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1087,7 +1086,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21916), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1097,7 +1096,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21915), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1107,15 +1106,15 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21919), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1128,7 +1127,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21913), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1138,7 +1137,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21917), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1148,7 +1147,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21914), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1158,7 +1157,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21918), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1169,7 +1168,7 @@ static void SideFrictionRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1182,7 +1181,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21914), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1192,7 +1191,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21918), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1202,7 +1201,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21913), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1212,7 +1211,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21917), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1223,7 +1222,7 @@ static void SideFrictionRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1236,7 +1235,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21915), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1246,7 +1245,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21919), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1256,7 +1255,7 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21912), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1266,20 +1265,20 @@ static void SideFrictionRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(21916), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1302,7 +1301,7 @@ static void SideFrictionRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21711), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1312,7 +1311,7 @@ static void SideFrictionRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21714), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1322,7 +1321,7 @@ static void SideFrictionRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21717), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1332,18 +1331,18 @@ static void SideFrictionRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21708), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1389,7 +1388,7 @@ static void SideFrictionRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1402,7 +1401,7 @@ static void SideFrictionRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21709), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1412,7 +1411,7 @@ static void SideFrictionRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21712), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1422,7 +1421,7 @@ static void SideFrictionRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21715), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1432,20 +1431,20 @@ static void SideFrictionRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(21706), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1455,7 +1454,7 @@ static void SideFrictionRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; SideFrictionRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1474,8 +1473,7 @@ static void SideFrictionRCTrackBrakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21612), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: case 3: @@ -1485,13 +1483,12 @@ static void SideFrictionRCTrackBrakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21613), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x007785DC */ @@ -1512,7 +1509,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21806), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1522,7 +1519,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21810), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1532,7 +1529,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21814), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1542,15 +1539,15 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21818), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1563,7 +1560,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21807), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1573,7 +1570,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21811), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1583,7 +1580,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21815), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1593,11 +1590,11 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21819), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1610,7 +1607,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21808), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1620,7 +1617,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21812), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1630,7 +1627,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21816), { 0, 0, height }, { { 16, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1640,34 +1637,34 @@ static void SideFrictionRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(21820), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1706,7 +1703,7 @@ static void SideFrictionRCTrackLeftEighthToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1729,7 +1726,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21774), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1739,7 +1736,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21778), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1749,7 +1746,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21782), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1759,15 +1756,15 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21786), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1780,7 +1777,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21775), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1790,7 +1787,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21779), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1800,7 +1797,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21783), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1810,11 +1807,11 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21787), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1827,7 +1824,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21776), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1837,7 +1834,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21780), { 0, 0, height }, { { 16, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1847,7 +1844,7 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21784), { 0, 0, height }, { { 4, 4, height + 27 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1857,34 +1854,34 @@ static void SideFrictionRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(21788), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1923,7 +1920,7 @@ static void SideFrictionRCTrackRightEighthToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1951,181 +1948,47 @@ static void SideFrictionRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { 21822, 21823, 21824, 21825 }, + { 21846, 21847, 21848, 21849 }, + }; + const ImageIndex additionalImages[2][kNumOrthogonalDirections] = { + { 21826, ImageIndexUndefined, 21827, ImageIndexUndefined }, + { 21850, ImageIndexUndefined, 21851, ImageIndexUndefined }, + }; + + TrackPaintUtilDiagTilesPaint( + session, 2, height, direction, trackSequence, images[trackElement.HasChain()], defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); + switch (trackSequence) { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21849), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 2 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21825), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 2 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; case 1: - if (trackElement.HasChain()) + if (direction == 0) { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21846), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 2 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21850), { -16, -16, height }, - { { -16, -16, height + 27 }, { 32, 32, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - break; - case 2: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - break; - } + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(additionalImages[trackElement.HasChain()][direction]), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21822), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 2 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21826), { -16, -16, height }, - { { -16, -16, height + 27 }, { 32, 32, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - break; - case 2: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + + WoodenASupportsPaintSetupRotated( + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); break; case 2: - if (trackElement.HasChain()) + if (direction == 2) { - switch (direction) - { - case 0: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21848), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 2 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21851), { -16, -16, height }, - { { -16, -16, height + 27 }, { 32, 32, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - break; - } + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(additionalImages[trackElement.HasChain()][direction]), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); } - else - { - switch (direction) - { - case 0: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21824), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 2 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21827), { -16, -16, height }, - { { -16, -16, height + 27 }, { 32, 32, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21847), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 2 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(21823), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 2 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + + WoodenASupportsPaintSetupRotated( + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); break; } + + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0077853C */ @@ -2159,7 +2022,7 @@ static void SideFrictionRCTrackDiag25DegUp( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2192,11 +2055,10 @@ static void SideFrictionRCTrackDiag25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2229,11 +2091,10 @@ static void SideFrictionRCTrackDiag25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2259,7 +2120,7 @@ static void SideFrictionRCTrackDiag25DegUp( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2295,7 +2156,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -2310,19 +2171,19 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21856), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } @@ -2338,24 +2199,24 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21832), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -2364,11 +2225,11 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2378,11 +2239,11 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21857), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } @@ -2392,11 +2253,11 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2406,16 +2267,16 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( session, direction, session.TrackColours.WithIndex(21833), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -2441,7 +2302,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2477,7 +2338,7 @@ static void SideFrictionRCTrackDiag25DegUpToFlat( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2510,11 +2371,10 @@ static void SideFrictionRCTrackDiag25DegUpToFlat( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2547,11 +2407,10 @@ static void SideFrictionRCTrackDiag25DegUpToFlat( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2577,7 +2436,7 @@ static void SideFrictionRCTrackDiag25DegUpToFlat( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2613,7 +2472,7 @@ static void SideFrictionRCTrackDiag25DegDown( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2646,11 +2505,10 @@ static void SideFrictionRCTrackDiag25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2683,11 +2541,10 @@ static void SideFrictionRCTrackDiag25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2713,7 +2570,7 @@ static void SideFrictionRCTrackDiag25DegDown( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2780,8 +2637,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); break; case 2: @@ -2815,8 +2671,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); break; case 3: @@ -2846,7 +2701,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0077858C */ @@ -2880,7 +2735,7 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -2895,19 +2750,19 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( session, direction, session.TrackColours.WithIndex(21857), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } @@ -2923,24 +2778,24 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( session, direction, session.TrackColours.WithIndex(21833), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -2949,11 +2804,11 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2963,11 +2818,11 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( session, direction, session.TrackColours.WithIndex(21856), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } @@ -2977,11 +2832,11 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2991,16 +2846,16 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( session, direction, session.TrackColours.WithIndex(21832), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -3026,7 +2881,7 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3045,7 +2900,7 @@ static void SideFrictionRCTrack60DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_0_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); break; case 1: @@ -3058,7 +2913,7 @@ static void SideFrictionRCTrack60DegUp( { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); break; case 2: @@ -3070,7 +2925,7 @@ static void SideFrictionRCTrack60DegUp( { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); break; case 3: @@ -3081,21 +2936,21 @@ static void SideFrictionRCTrack60DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_3_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void SideFrictionRCTrack60DegDown( @@ -3119,7 +2974,7 @@ static void SideFrictionRCTrack25DegUpTo60DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_0_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); break; case 1: @@ -3130,7 +2985,7 @@ static void SideFrictionRCTrack25DegUpTo60DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_1_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); break; case 2: @@ -3141,7 +2996,7 @@ static void SideFrictionRCTrack25DegUpTo60DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_2_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); break; case 3: @@ -3152,21 +3007,21 @@ static void SideFrictionRCTrack25DegUpTo60DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_3_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void SideFrictionRCTrack60DegDownTo25DegDown( @@ -3190,7 +3045,7 @@ static void SideFrictionRCTrack60DegUpTo25DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_0_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); break; case 1: @@ -3201,7 +3056,7 @@ static void SideFrictionRCTrack60DegUpTo25DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_1_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); break; case 2: @@ -3212,7 +3067,7 @@ static void SideFrictionRCTrack60DegUpTo25DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_2_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); break; case 3: @@ -3223,21 +3078,21 @@ static void SideFrictionRCTrack60DegUpTo25DegUp( session, direction, session.TrackColours.WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_3_B), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void SideFrictionRCTrack25DegDownTo60DegDown( @@ -3263,7 +3118,7 @@ static void SideFrictionRCTrackDiag60DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -3279,11 +3134,10 @@ static void SideFrictionRCTrackDiag60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -3299,11 +3153,10 @@ static void SideFrictionRCTrackDiag60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -3316,7 +3169,7 @@ static void SideFrictionRCTrackDiag60DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -3345,7 +3198,7 @@ static void SideFrictionRCTrackDiag60DegUpTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3363,11 +3216,10 @@ static void SideFrictionRCTrackDiag60DegUpTo25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3385,11 +3237,10 @@ static void SideFrictionRCTrackDiag60DegUpTo25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3402,7 +3253,7 @@ static void SideFrictionRCTrackDiag60DegUpTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3431,7 +3282,7 @@ static void SideFrictionRCTrackDiag25DegUpTo60DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3448,11 +3299,10 @@ static void SideFrictionRCTrackDiag25DegUpTo60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3469,11 +3319,10 @@ static void SideFrictionRCTrackDiag25DegUpTo60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3486,7 +3335,7 @@ static void SideFrictionRCTrackDiag25DegUpTo60DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } diff --git a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp index 58cbb86ee4..e4e41c9c93 100644 --- a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp @@ -18,12 +18,17 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + namespace SingleRailRC { static void TrackFlat( @@ -57,8 +62,7 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else @@ -80,17 +84,13 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackStation( @@ -119,11 +119,11 @@ namespace SingleRailRC 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::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 4, 7); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void Track25DegUp( @@ -157,8 +157,7 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else @@ -188,24 +187,20 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void Track60DegUp( @@ -239,8 +234,7 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } else @@ -270,24 +264,20 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void TrackFlatTo25DegUp( @@ -321,8 +311,7 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else @@ -352,24 +341,20 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void Track25DegUpTo60DegUp( @@ -409,8 +394,7 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } else @@ -446,24 +430,20 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void Track60DegUpTo25DegUp( @@ -503,8 +483,7 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } else @@ -540,24 +519,20 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void Track25DegUpToFlat( @@ -591,8 +566,7 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } else @@ -622,24 +596,20 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void Track25DegDown( @@ -716,12 +686,8 @@ namespace SingleRailRC } PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: break; @@ -768,20 +734,16 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 36, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 36, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetVerticalTunnel(session, height + 56); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: break; @@ -825,18 +787,15 @@ namespace SingleRailRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 48, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 48, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); } static void Track60DegDownTo90DegDown( @@ -871,15 +830,11 @@ namespace SingleRailRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 48, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: break; @@ -916,11 +871,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -930,10 +884,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -967,7 +921,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -993,15 +947,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1012,7 +965,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1021,7 +974,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1055,11 +1008,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1069,10 +1021,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1106,7 +1058,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1140,10 +1092,10 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1177,7 +1129,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1203,15 +1155,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1222,7 +1173,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1231,7 +1182,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1265,19 +1216,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1311,7 +1257,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1345,7 +1291,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1356,7 +1302,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1366,30 +1312,28 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 3)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 7)), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 11)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 15)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1400,7 +1344,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1435,19 +1379,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1481,7 +1420,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1515,7 +1454,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1526,7 +1465,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1536,30 +1475,28 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 19)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 23)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 27)), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 31)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1570,7 +1507,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1595,185 +1532,15 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 3)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 2)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 0, SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 1, + SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 0, SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 1 }, + { SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 0, SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 1, + SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 2, SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 3 }, + }; + + TrackPaintUtilDiagTilesPaintExtra( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], kSupportType); } static void TrackDiagBrakes( @@ -1799,7 +1566,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1818,7 +1585,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1837,31 +1604,29 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BRAKE_DIAGONAL + 1)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1872,7 +1637,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1901,7 +1666,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1921,7 +1686,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1941,14 +1706,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1956,17 +1721,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE_DIAGONAL + 1)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -1977,7 +1740,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2021,7 +1784,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2056,7 +1819,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2091,7 +1854,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2100,8 +1863,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2109,18 +1871,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 1)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); break; } } @@ -2130,8 +1889,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2139,18 +1897,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 1)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); break; } } @@ -2162,7 +1917,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2206,7 +1961,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2241,7 +1996,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2276,7 +2031,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2285,8 +2040,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2294,18 +2048,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 5)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; } } @@ -2315,8 +2066,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2324,18 +2074,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 5)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; } } @@ -2347,7 +2094,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2391,7 +2138,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -2426,7 +2173,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -2461,7 +2208,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -2470,8 +2217,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 2, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2479,18 +2225,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 1)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 2, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -2500,8 +2243,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 2, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2509,18 +2251,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 1)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 2, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 2, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 2, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 2, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 2, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 2, height, session.SupportColours); break; } } @@ -2532,7 +2271,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2576,7 +2315,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2611,7 +2350,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2646,7 +2385,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2655,8 +2394,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2664,18 +2402,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 11)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -2685,8 +2420,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2694,18 +2428,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 11)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -2717,7 +2448,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2837,8 +2568,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2846,18 +2576,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 7)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -2867,8 +2594,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2876,18 +2602,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 7)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -2902,7 +2625,7 @@ namespace SingleRailRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiag25DegDownToFlat( @@ -2944,7 +2667,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -2979,7 +2702,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -3014,7 +2737,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -3023,8 +2746,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3032,18 +2754,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 3)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -3053,8 +2772,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3062,18 +2780,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 3)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -3085,7 +2800,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3129,7 +2844,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -3164,7 +2879,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -3199,7 +2914,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -3208,8 +2923,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 38, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 38, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3217,18 +2931,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 9)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 38, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 38, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -3238,8 +2949,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 38, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 38, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3247,18 +2957,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 9)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 38, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 38, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -3270,7 +2977,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -3314,7 +3021,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -3349,7 +3056,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -3384,7 +3091,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -3393,8 +3100,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3402,18 +3108,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 1)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -3423,8 +3126,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3432,18 +3134,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 1)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -3455,7 +3154,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3499,7 +3198,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -3534,7 +3233,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -3569,7 +3268,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -3578,8 +3277,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3587,18 +3285,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 5)), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -3608,8 +3303,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3617,18 +3311,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 5)), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -3640,7 +3331,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3684,7 +3375,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -3719,7 +3410,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -3754,7 +3445,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -3763,8 +3454,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3772,18 +3462,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 11)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -3793,8 +3480,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3802,18 +3488,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 11)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -3825,7 +3508,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -3869,7 +3552,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -3904,7 +3587,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -3939,7 +3622,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -3948,8 +3631,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3957,18 +3639,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 7)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -3978,8 +3657,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3987,18 +3665,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 7)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -4010,7 +3685,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -4054,7 +3729,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -4089,7 +3764,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -4124,7 +3799,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -4133,8 +3808,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4142,18 +3816,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 3)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -4163,8 +3834,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4172,18 +3842,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 3)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -4195,7 +3862,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -4235,16 +3902,12 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackFlatToRightBank( @@ -4282,16 +3945,12 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackLeftBankToFlat( @@ -4343,23 +4002,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackRightBankTo25DegUp( @@ -4397,23 +4052,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void Track25DegUpToLeftBank( @@ -4451,23 +4102,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void Track25DegUpToRightBank( @@ -4505,23 +4152,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackLeftBankTo25DegDown( @@ -4581,16 +4224,12 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackRightBank( @@ -4624,7 +4263,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4648,7 +4287,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4668,14 +4307,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4683,17 +4322,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 2)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4704,7 +4341,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4733,7 +4370,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4753,7 +4390,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4777,14 +4414,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4792,17 +4429,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 6)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4813,7 +4448,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4842,7 +4477,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4866,7 +4501,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4886,14 +4521,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4901,17 +4536,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 9)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -4922,7 +4555,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4951,7 +4584,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -4971,7 +4604,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4995,14 +4628,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5010,17 +4643,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 4)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5031,7 +4662,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5060,7 +4691,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5084,7 +4715,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5104,14 +4735,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5119,17 +4750,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 12)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5140,7 +4769,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5169,7 +4798,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5189,7 +4818,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5213,14 +4842,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5228,17 +4857,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 16)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5249,7 +4876,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5278,7 +4905,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -5302,7 +4929,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -5322,14 +4949,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5337,17 +4964,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 22)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5358,7 +4983,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -5387,7 +5012,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -5407,7 +5032,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -5431,14 +5056,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5446,17 +5071,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 26)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5467,7 +5090,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -5544,7 +5167,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5552,17 +5175,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 29)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5576,7 +5197,7 @@ namespace SingleRailRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiagRightBankTo25DegDown( @@ -5651,7 +5272,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5659,17 +5280,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 24)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5683,7 +5302,7 @@ namespace SingleRailRC break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackDiag25DegDownToLeftBank( @@ -5710,7 +5329,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5734,7 +5353,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5754,14 +5373,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5769,17 +5388,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 19)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5790,7 +5407,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5819,7 +5436,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -5839,7 +5456,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -5863,14 +5480,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5878,17 +5495,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 14)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5899,7 +5514,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -5928,7 +5543,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5948,7 +5563,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5968,14 +5583,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5983,17 +5598,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 31)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6004,7 +5617,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6033,7 +5646,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6053,7 +5666,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6073,14 +5686,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6088,17 +5701,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 33)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6109,7 +5720,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6152,11 +5763,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6166,10 +5776,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6207,7 +5817,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6241,15 +5851,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6260,7 +5869,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6269,7 +5878,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -6311,11 +5920,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6325,10 +5933,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6366,7 +5974,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6404,10 +6012,10 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -6445,7 +6053,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -6479,15 +6087,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6498,7 +6105,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6507,7 +6114,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -6545,19 +6152,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6595,7 +6197,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6633,7 +6235,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6644,7 +6246,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6655,8 +6257,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 3)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6664,7 +6265,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 7)), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6672,7 +6273,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 11)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6680,8 +6281,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 15)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6692,7 +6292,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6731,19 +6331,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6781,7 +6376,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6819,7 +6414,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6830,7 +6425,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6841,7 +6436,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 19)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6849,7 +6444,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 23)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6857,8 +6452,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 27)), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6866,8 +6460,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 31)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6878,7 +6471,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6933,11 +6526,10 @@ namespace SingleRailRC { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -6947,13 +6539,13 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -6983,15 +6575,14 @@ namespace SingleRailRC { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -7002,7 +6593,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7041,11 +6632,10 @@ namespace SingleRailRC { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -7055,13 +6645,13 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -7072,7 +6662,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE + 9)), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7080,7 +6670,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE + 11)), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7088,7 +6678,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE + 13)), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7096,16 +6686,16 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE + 15)), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -7116,7 +6706,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7125,7 +6715,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackRightQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -7133,7 +6723,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -7171,11 +6761,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -7185,10 +6774,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7226,7 +6815,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -7264,10 +6853,10 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -7305,7 +6894,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -7335,15 +6924,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -7354,7 +6942,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7393,11 +6981,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -7407,10 +6994,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -7448,7 +7035,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -7486,10 +7073,10 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -7527,7 +7114,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -7557,15 +7144,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -7576,7 +7162,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7585,7 +7171,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -7593,7 +7179,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -7636,9 +7222,10 @@ namespace SingleRailRC { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::StandardSlopeStart, +56, TunnelType::StandardSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void TrackRightQuarterTurn160DegUp( @@ -7680,9 +7267,10 @@ namespace SingleRailRC { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::StandardSlopeStart, +56, TunnelType::StandardSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void TrackLeftQuarterTurn160DegDown( @@ -7737,12 +7325,8 @@ namespace SingleRailRC } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -7787,12 +7371,8 @@ namespace SingleRailRC } PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96); break; case 1: break; @@ -7845,23 +7425,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void Track25DegUpToRightBanked25DegUp( @@ -7896,23 +7472,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackLeftBanked25DegUpTo25DegUp( @@ -7947,23 +7519,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackRightBanked25DegUpTo25DegUp( @@ -7998,23 +7566,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void TrackLeftBanked25DegDownTo25DegDown( @@ -8074,23 +7638,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackRightBankedFlatToRightBanked25DegUp( @@ -8122,23 +7682,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackLeftBanked25DegUpToLeftBankedFlat( @@ -8170,23 +7726,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackRightBanked25DegUpToRightBankedFlat( @@ -8218,23 +7770,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackLeftBankedFlatToLeftBanked25DegDown( @@ -8294,23 +7842,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void Track25DegUpRightBanked( @@ -8342,23 +7886,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void Track25DegDownLeftBanked( @@ -8407,23 +7947,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackFlatToRightBanked25DegUp( @@ -8458,23 +7994,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackLeftBanked25DegUpToFlat( @@ -8509,23 +8041,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackRightBanked25DegUpToFlat( @@ -8560,23 +8088,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void TrackFlatToLeftBanked25DegDown( @@ -8641,11 +8165,10 @@ namespace SingleRailRC { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -8655,13 +8178,13 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -8691,15 +8214,14 @@ namespace SingleRailRC { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -8710,7 +8232,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8749,11 +8271,10 @@ namespace SingleRailRC { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -8763,13 +8284,13 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -8780,7 +8301,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 9)), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8788,7 +8309,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 11)), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8796,7 +8317,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 13)), { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8804,16 +8325,16 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 15)), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -8824,7 +8345,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8833,7 +8354,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackRightBankedQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -8841,7 +8362,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftBankedQuarterTurn3Tile25DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -8879,11 +8400,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -8893,10 +8413,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -8934,7 +8454,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -8972,10 +8492,10 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -9013,7 +8533,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -9043,15 +8563,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9062,7 +8581,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9101,11 +8620,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -9115,10 +8633,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -9156,7 +8674,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -9194,10 +8712,10 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -9235,7 +8753,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -9265,15 +8783,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -9284,7 +8801,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -9293,7 +8810,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -9301,7 +8818,7 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -9335,11 +8852,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -9349,7 +8865,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9359,16 +8875,14 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 1)), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 5)), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height - 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height - 1, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9389,7 +8903,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9409,16 +8923,14 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 1)), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 5)), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height - 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height - 1, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9429,7 +8941,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -9455,15 +8967,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -9474,7 +8985,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9509,11 +9020,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -9523,7 +9033,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9533,16 +9043,14 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 9)), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 13)), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9563,7 +9071,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9583,16 +9091,14 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 9)), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 13)), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9603,7 +9109,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -9629,15 +9135,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -9648,7 +9153,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9686,11 +9191,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -9700,10 +9204,10 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9737,7 +9241,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -9766,15 +9270,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -9785,7 +9288,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9814,15 +9317,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -9833,10 +9335,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -9870,7 +9372,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -9899,11 +9401,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -9913,7 +9414,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9951,11 +9452,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -9965,10 +9465,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10002,7 +9502,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -10031,15 +9531,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10050,7 +9549,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -10079,15 +9578,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10098,10 +9596,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -10135,7 +9633,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -10164,11 +9662,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10178,7 +9675,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -10192,7 +9689,7 @@ namespace SingleRailRC trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -10205,7 +9702,7 @@ namespace SingleRailRC trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; TrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -10242,11 +9739,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10256,10 +9752,10 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10293,7 +9789,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -10327,10 +9823,10 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -10364,7 +9860,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -10393,15 +9889,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10412,7 +9907,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -10441,15 +9936,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10460,10 +9954,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -10497,7 +9991,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -10531,10 +10025,10 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -10568,7 +10062,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -10597,11 +10091,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10611,7 +10104,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -10648,11 +10141,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -10662,10 +10154,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -10699,7 +10191,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -10733,10 +10225,10 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -10770,7 +10262,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -10780,7 +10272,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 26)), { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -10790,30 +10282,30 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 32)), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 37)), { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 43)), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10824,7 +10316,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -10853,15 +10345,14 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -10872,10 +10363,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -10909,7 +10400,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -10943,10 +10434,10 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -10980,7 +10471,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -10993,33 +10484,33 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 32)), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 37)), { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 43)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 26)), { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -11029,7 +10520,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -11043,7 +10534,7 @@ namespace SingleRailRC trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -11056,7 +10547,7 @@ namespace SingleRailRC trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; TrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -11077,8 +10568,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 1)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height + 1, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -11088,8 +10578,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 7)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height + 1, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11099,8 +10588,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 13)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 1, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -11110,12 +10598,12 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 19)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -11125,7 +10613,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11171,7 +10659,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -11212,10 +10700,10 @@ namespace SingleRailRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -11226,7 +10714,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11248,7 +10736,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 25)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -11258,8 +10746,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 31)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 1, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11269,8 +10756,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 37)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height + 1, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -11280,13 +10766,12 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 43)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height + 1, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height + 1, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -11296,7 +10781,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11342,7 +10827,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -11383,10 +10868,10 @@ namespace SingleRailRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -11397,7 +10882,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11446,19 +10931,14 @@ namespace SingleRailRC { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -11468,32 +10948,32 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 5)), { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 9)), { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 13)), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11527,7 +11007,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -11555,15 +11035,11 @@ namespace SingleRailRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11596,23 +11072,19 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -11638,9 +11110,9 @@ namespace SingleRailRC break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void TrackFlatTo60DegUpLongBase( @@ -11676,19 +11148,15 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -11717,15 +11185,11 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -11754,15 +11218,11 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -11791,24 +11251,20 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 19, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 19, height, session.SupportColours); } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; } } @@ -11845,19 +11301,15 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 24, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 24, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: switch (direction) @@ -11886,15 +11338,11 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 18, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 18, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 2: switch (direction) @@ -11923,15 +11371,11 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 13, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 13, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -11960,24 +11404,20 @@ namespace SingleRailRC if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 5, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -12017,16 +11457,12 @@ namespace SingleRailRC } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void TrackLeftCorkscrewUp( @@ -12060,12 +11496,11 @@ namespace SingleRailRC break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12075,7 +11510,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12102,7 +11537,7 @@ namespace SingleRailRC break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12138,18 +11573,18 @@ namespace SingleRailRC direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12184,11 +11619,10 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12198,7 +11632,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12225,7 +11659,7 @@ namespace SingleRailRC break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12261,18 +11695,18 @@ namespace SingleRailRC direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12322,12 +11756,11 @@ namespace SingleRailRC break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12337,7 +11770,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -12347,32 +11780,28 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 34, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 34, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 6)), { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 22, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 22, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 11)), { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 24, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 16)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12383,7 +11812,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12417,10 +11846,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -12438,36 +11867,32 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 3)), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 56, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 8)), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 56, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 13)), { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 56, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 18)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 56, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: switch (direction) @@ -12505,13 +11930,13 @@ namespace SingleRailRC switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12547,12 +11972,11 @@ namespace SingleRailRC break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -12562,7 +11986,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -12572,32 +11996,28 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 21)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 26)), { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 24, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 31)), { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 22, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 22, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 36)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 34, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 34, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12608,7 +12028,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12642,10 +12062,10 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -12663,35 +12083,31 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 23)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 56, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 28)), { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 56, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 33)), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 56, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 38)), { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 56, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 5: switch (direction) @@ -12729,13 +12145,13 @@ namespace SingleRailRC switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12787,20 +12203,15 @@ namespace SingleRailRC break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12837,7 +12248,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::topCorner), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -12847,16 +12258,14 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 2)), { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 7)), { 0, 0, height }, { { 29, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -12864,8 +12273,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 12)), { 0, 0, height }, { { 31, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 18, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 18, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -12873,8 +12281,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 17)), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 14, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -12885,7 +12292,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 3: switch (direction) @@ -12921,7 +12328,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 4: switch (direction) @@ -12961,9 +12368,9 @@ namespace SingleRailRC if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13003,20 +12410,15 @@ namespace SingleRailRC break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13055,7 +12457,7 @@ namespace SingleRailRC PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13066,8 +12468,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 22)), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13075,8 +12476,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 27)), { 0, 0, height }, { { 30, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 18, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 18, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13084,8 +12484,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 32)), { 0, 0, height }, { { 29, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13093,8 +12492,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 37)), { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 14, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 14, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -13105,7 +12503,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 3: switch (direction) @@ -13144,7 +12542,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 144); break; case 4: switch (direction) @@ -13185,9 +12583,9 @@ namespace SingleRailRC 0xFFFF, 0); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13223,7 +12621,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 1)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13233,35 +12631,31 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 5)), { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 8)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 12)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -13295,7 +12689,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13330,10 +12724,10 @@ namespace SingleRailRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -13345,8 +12739,8 @@ namespace SingleRailRC direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13365,14 +12759,14 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 16)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 14, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 14, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 20)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13382,7 +12776,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 25)), { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13392,20 +12786,16 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 29)), { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; case 1: switch (direction) @@ -13439,7 +12829,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -13474,10 +12864,10 @@ namespace SingleRailRC switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -13489,8 +12879,8 @@ namespace SingleRailRC direction), 0xFFFF, 0); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 38, session.SupportColours); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13547,19 +12937,14 @@ namespace SingleRailRC { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 25, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 25, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -13594,12 +12979,8 @@ namespace SingleRailRC break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13641,7 +13022,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -13660,8 +13041,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 4)), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 28, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13669,8 +13049,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 8)), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 28, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13682,8 +13061,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 14)), { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 28, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13691,20 +13069,19 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 19)), { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 28, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13747,19 +13124,14 @@ namespace SingleRailRC { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 25, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 25, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -13794,12 +13166,8 @@ namespace SingleRailRC break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -13842,7 +13210,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -13861,8 +13229,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 24)), { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 28, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13874,8 +13241,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 30)), { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 28, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13883,8 +13249,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 34)), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 28, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13892,20 +13257,19 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 39)), { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 28, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -13960,7 +13324,7 @@ namespace SingleRailRC EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -13992,7 +13356,7 @@ namespace SingleRailRC EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -14020,7 +13384,7 @@ namespace SingleRailRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14028,7 +13392,7 @@ namespace SingleRailRC EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -14078,11 +13442,10 @@ namespace SingleRailRC { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14092,13 +13455,13 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14129,14 +13492,14 @@ namespace SingleRailRC break; } MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -14147,7 +13510,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14190,11 +13553,10 @@ namespace SingleRailRC { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14204,13 +13566,13 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14241,14 +13603,14 @@ namespace SingleRailRC break; } MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -14259,7 +13621,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14299,10 +13661,10 @@ namespace SingleRailRC break; } MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -14312,13 +13674,13 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14352,15 +13714,14 @@ namespace SingleRailRC { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -14371,7 +13732,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14411,10 +13772,10 @@ namespace SingleRailRC break; } MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height - 6, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -14424,13 +13785,13 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -14464,15 +13825,14 @@ namespace SingleRailRC { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -14483,7 +13843,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14518,19 +13878,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -14540,37 +13895,33 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 1)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 8)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 15)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 22)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -14604,7 +13955,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -14614,32 +13965,28 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 3)), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 28, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 10)), { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 28, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 17)), { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 28, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 24)), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 28, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14650,7 +13997,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -14684,7 +14031,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -14718,7 +14065,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -14746,7 +14093,7 @@ namespace SingleRailRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -14756,7 +14103,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -14791,19 +14138,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -14813,37 +14155,33 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 29)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 36)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 43)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 9, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 50)), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -14877,7 +14215,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -14887,32 +14225,28 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 31)), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 28, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 38)), { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 28, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 28, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 45)), { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 28, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 52)), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 28, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14923,7 +14257,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 4: switch (direction) @@ -14957,7 +14291,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); break; case 5: switch (direction) @@ -14991,7 +14325,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 224); break; case 6: switch (direction) @@ -15019,7 +14353,7 @@ namespace SingleRailRC } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -15029,7 +14363,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); break; } } @@ -15062,7 +14396,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 0)), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15074,7 +14408,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 1)), { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -15086,7 +14420,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 3)), { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -15094,7 +14428,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 5)), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; } } @@ -15107,7 +14441,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 0)), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15117,7 +14451,7 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 1)), { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -15127,31 +14461,28 @@ namespace SingleRailRC session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 3)), { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height + 4, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 5)), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); } static void Track60DegUpToFlat( @@ -15195,8 +14526,7 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); } else { @@ -15229,23 +14559,19 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void TrackFlatTo60DegDown( @@ -15301,7 +14627,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -15336,7 +14662,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -15371,7 +14697,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -15380,8 +14706,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 7, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15389,18 +14714,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 13)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 7, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 7, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 7, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 7, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); break; } } @@ -15410,8 +14732,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 7, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 7, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15419,18 +14740,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 13)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 7, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 7, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 7, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 7, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 7, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 7, height, session.SupportColours); break; } } @@ -15442,7 +14760,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -15486,7 +14804,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -15521,7 +14839,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -15556,7 +14874,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -15565,8 +14883,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15574,18 +14891,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 17)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 20, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 20, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 20, height, session.SupportColours); break; } } @@ -15595,8 +14909,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15604,18 +14917,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 17)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 20, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 20, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 20, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 20, height, session.SupportColours); break; } } @@ -15627,7 +14937,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -15671,7 +14981,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -15706,7 +15016,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -15741,7 +15051,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -15750,8 +15060,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15759,18 +15068,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 19)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -15780,8 +15086,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15789,18 +15094,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 19)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -15812,7 +15114,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -15856,7 +15158,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -15891,7 +15193,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -15926,7 +15228,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -15935,8 +15237,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 5, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15944,18 +15245,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 15)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 5, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 5, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 5, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 5, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 5, height, session.SupportColours); break; } } @@ -15965,8 +15263,7 @@ namespace SingleRailRC { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 5, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 5, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -15974,18 +15271,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 15)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 5, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 5, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 5, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 5, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 5, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 5, height, session.SupportColours); break; } } @@ -15997,7 +15291,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -16054,19 +15348,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16104,7 +15393,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -16142,7 +15431,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -16153,7 +15442,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -16164,8 +15453,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 3)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -16173,7 +15461,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 7)), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -16181,7 +15469,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 11)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -16189,8 +15477,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 15)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16201,7 +15488,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16240,19 +15527,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16290,7 +15572,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -16328,7 +15610,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -16339,7 +15621,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -16350,7 +15632,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 19)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -16358,7 +15640,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 23)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -16366,8 +15648,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 27)), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -16375,8 +15656,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 31)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16387,7 +15667,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16407,8 +15687,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 32)), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -16416,8 +15695,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 36)), { 0, 0, height }, { { 16, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -16425,7 +15703,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 40)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -16433,7 +15711,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 44)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16444,7 +15722,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16482,7 +15760,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -16493,7 +15771,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -16531,7 +15809,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -16561,21 +15839,16 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16595,8 +15868,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 48)), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -16604,8 +15876,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 52)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -16613,7 +15884,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 56)), { 0, 0, height }, { { 16, 0, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -16621,7 +15892,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE + 60)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16632,7 +15903,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16670,7 +15941,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -16681,7 +15952,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -16719,7 +15990,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -16749,11 +16020,10 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -16761,7 +16031,7 @@ namespace SingleRailRC EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16824,7 +16094,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16848,7 +16118,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -16868,14 +16138,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -16883,17 +16153,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 2)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -16904,7 +16172,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -16933,7 +16201,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -16953,7 +16221,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -16977,14 +16245,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -16992,17 +16260,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 6)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17013,7 +16279,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -17042,7 +16308,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17066,7 +16332,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17086,14 +16352,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -17101,17 +16367,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 12)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17122,7 +16386,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17151,7 +16415,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17171,7 +16435,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17195,14 +16459,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 9, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -17210,17 +16474,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 16)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 9, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 9, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 9, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 9, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17231,7 +16493,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17288,7 +16550,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -17308,7 +16570,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -17328,14 +16590,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -17343,17 +16605,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 21)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17364,7 +16624,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -17393,7 +16653,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -17413,7 +16673,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -17433,14 +16693,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -17448,17 +16708,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 25)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17469,7 +16727,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -17498,7 +16756,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17518,7 +16776,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17538,14 +16796,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -17553,17 +16811,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 29)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17574,7 +16830,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17603,7 +16859,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17623,7 +16879,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17643,14 +16899,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -17658,17 +16914,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 33)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17679,7 +16933,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17736,7 +16990,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17756,7 +17010,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17776,15 +17030,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 11, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 11, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -17792,17 +17045,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 37)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 11, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 11, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 11, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 11, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 11, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17813,7 +17064,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17842,7 +17093,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -17862,7 +17113,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -17882,15 +17133,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 11, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 11, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -17898,17 +17148,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 41)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 11, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 11, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 11, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 11, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 11, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 11, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -17919,7 +17167,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -17962,7 +17210,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -17986,7 +17234,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -18006,14 +17254,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -18021,17 +17269,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 46)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18042,7 +17288,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -18071,7 +17317,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -18091,7 +17337,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -18115,14 +17361,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -18130,17 +17376,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 50)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18151,7 +17395,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -18180,7 +17424,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -18204,7 +17448,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -18224,14 +17468,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -18239,17 +17483,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 56)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18260,7 +17502,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -18289,7 +17531,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -18309,7 +17551,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -18333,14 +17575,14 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -18348,17 +17590,15 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 60)), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 6, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 6, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18369,7 +17609,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -18436,19 +17676,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -18486,7 +17721,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -18524,7 +17759,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -18535,7 +17770,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -18546,8 +17781,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 67)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -18555,7 +17789,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 71)), { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -18563,7 +17797,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 75)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -18571,8 +17805,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 79)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18583,7 +17816,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18622,19 +17855,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -18672,7 +17900,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -18710,7 +17938,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -18721,7 +17949,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -18732,7 +17960,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 83)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -18740,7 +17968,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 87)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -18748,8 +17976,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 91)), { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -18757,8 +17984,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 95)), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18769,7 +17995,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18789,8 +18015,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 96)), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -18798,8 +18023,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 100)), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -18807,7 +18031,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 104)), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -18815,7 +18039,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 108)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -18826,7 +18050,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -18864,7 +18088,7 @@ namespace SingleRailRC PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -18875,7 +18099,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -18913,7 +18137,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -18943,19 +18167,14 @@ namespace SingleRailRC { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -18975,8 +18194,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 112)), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -18984,8 +18202,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 116)), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -18993,7 +18210,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 120)), { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -19001,7 +18218,7 @@ namespace SingleRailRC session.TrackColours.WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_LARGE_CURVE_BANKED + 124)), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -19012,7 +18229,7 @@ namespace SingleRailRC PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -19050,7 +18267,7 @@ namespace SingleRailRC PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -19061,7 +18278,7 @@ namespace SingleRailRC PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -19099,7 +18316,7 @@ namespace SingleRailRC PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 4: switch (direction) @@ -19129,11 +18346,10 @@ namespace SingleRailRC { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( session, @@ -19141,7 +18357,7 @@ namespace SingleRailRC EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } diff --git a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp index c42f950142..1e0072ceee 100644 --- a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp @@ -12,32 +12,37 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + static constexpr uint32_t STAND_UP_BLOCK_BRAKE_SW_NE_OPEN = 25571; static constexpr uint32_t STAND_UP_BLOCK_BRAKE_NW_SE_OPEN = 25572; static constexpr uint32_t STAND_UP_BLOCK_BRAKE_SW_NE_CLOSED = 25573; static constexpr uint32_t STAND_UP_BLOCK_BRAKE_NW_SE_CLOSED = 25574; -static constexpr uint32_t _StandUpBlockBrakeImages[NumOrthogonalDirections][2] = { +static constexpr uint32_t _StandUpBlockBrakeImages[kNumOrthogonalDirections][2] = { { STAND_UP_BLOCK_BRAKE_SW_NE_OPEN, STAND_UP_BLOCK_BRAKE_SW_NE_CLOSED }, { STAND_UP_BLOCK_BRAKE_NW_SE_OPEN, STAND_UP_BLOCK_BRAKE_NW_SE_CLOSED }, { STAND_UP_BLOCK_BRAKE_SW_NE_OPEN, STAND_UP_BLOCK_BRAKE_SW_NE_CLOSED }, { STAND_UP_BLOCK_BRAKE_NW_SE_OPEN, STAND_UP_BLOCK_BRAKE_NW_SE_CLOSED }, }; -static constexpr const uint32_t StandupRCDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr const uint32_t StandupRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_STANDUP_DIAG_BRAKES, SPR_G2_STANDUP_DIAG_BRAKES + 1, SPR_G2_STANDUP_DIAG_BRAKES, SPR_G2_STANDUP_DIAG_BRAKES + 1, }; -static constexpr const uint32_t StandupRCDiagBlockBrakeImages[2][NumOrthogonalDirections] = { +static constexpr const uint32_t StandupRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_STANDUP_DIAG_BRAKES + 3, SPR_G2_STANDUP_DIAG_BRAKES + 5, @@ -80,8 +85,7 @@ static void StandUpRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } else @@ -101,17 +105,12 @@ static void StandUpRCTrackFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7384, 0x008A7394, 0x008A73A4 */ @@ -142,11 +141,11 @@ static void StandUpRCTrackStation( PaintAddImageAsParentRotated( session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7124 */ @@ -177,8 +176,7 @@ static void StandUpRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else @@ -204,24 +202,19 @@ static void StandUpRCTrack25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A7134 */ @@ -254,8 +247,7 @@ static void StandUpRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } else @@ -283,24 +275,19 @@ static void StandUpRCTrack60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A7144 */ @@ -331,8 +318,7 @@ static void StandUpRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } else @@ -358,24 +344,19 @@ static void StandUpRCTrackFlatTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A7154 */ @@ -414,8 +395,7 @@ static void StandUpRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } else @@ -449,24 +429,19 @@ static void StandUpRCTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A7164 */ @@ -505,8 +480,7 @@ static void StandUpRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } else @@ -540,24 +514,19 @@ static void StandUpRCTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A7174 */ @@ -588,8 +557,7 @@ static void StandUpRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } else @@ -615,24 +583,19 @@ static void StandUpRCTrack25DegUpToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A7184 */ @@ -710,11 +673,10 @@ static void StandUpRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(25259), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -724,10 +686,10 @@ static void StandUpRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -757,7 +719,7 @@ static void StandUpRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -787,10 +749,10 @@ static void StandUpRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -820,7 +782,7 @@ static void StandUpRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -842,15 +804,14 @@ static void StandUpRCTrackLeftQuarterTurn5( session, direction, session.TrackColours.WithIndex(25255), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -861,7 +822,7 @@ static void StandUpRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -871,7 +832,7 @@ static void StandUpRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; StandUpRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -901,16 +862,11 @@ static void StandUpRCTrackFlatToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7214 */ @@ -939,16 +895,11 @@ static void StandUpRCTrackFlatToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7224 */ @@ -977,16 +928,11 @@ static void StandUpRCTrackLeftBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7234 */ @@ -1015,16 +961,11 @@ static void StandUpRCTrackRightBankToFlat( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7244 */ @@ -1061,11 +1002,10 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -1075,10 +1015,10 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1112,7 +1052,7 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1146,10 +1086,10 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -1183,7 +1123,7 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -1212,15 +1152,14 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1231,7 +1170,7 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1241,7 +1180,7 @@ static void StandUpRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; StandUpRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1271,23 +1210,18 @@ static void StandUpRCTrackLeftBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A7274 */ @@ -1316,23 +1250,18 @@ static void StandUpRCTrackRightBankTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A7284 */ @@ -1361,23 +1290,18 @@ static void StandUpRCTrack25DegUpToLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A7294 */ @@ -1406,23 +1330,18 @@ static void StandUpRCTrack25DegUpToRightBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A72A4 */ @@ -1483,16 +1402,11 @@ static void StandUpRCTrackLeftBank( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A72F4 */ @@ -1532,8 +1446,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(25448), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } else { @@ -1556,12 +1469,11 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(25362), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1571,10 +1483,10 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -1629,7 +1541,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -1684,10 +1596,10 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: if (trackElement.HasChain()) @@ -1742,7 +1654,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: if (trackElement.HasChain()) @@ -1766,8 +1678,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(25452), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } else { @@ -1790,16 +1701,15 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(25366), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -1810,7 +1720,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1844,8 +1754,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(25428), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } else { @@ -1868,12 +1777,11 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(25342), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -1883,10 +1791,10 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -1941,7 +1849,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -1995,10 +1903,10 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: if (trackElement.HasChain()) @@ -2053,7 +1961,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: if (trackElement.HasChain()) @@ -2077,8 +1985,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(25432), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } else { @@ -2101,16 +2008,15 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( session, direction, session.TrackColours.WithIndex(25346), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -2121,7 +2027,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2131,7 +2037,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; StandUpRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2140,7 +2046,7 @@ static void StandUpRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; StandUpRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -2171,11 +2077,10 @@ static void StandUpRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(25375), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2185,7 +2090,7 @@ static void StandUpRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2194,13 +2099,13 @@ static void StandUpRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25372), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25377), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2219,7 +2124,7 @@ static void StandUpRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2236,13 +2141,13 @@ static void StandUpRCTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25372), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25377), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2253,7 +2158,7 @@ static void StandUpRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2275,15 +2180,14 @@ static void StandUpRCTrackSBendLeft( session, direction, session.TrackColours.WithIndex(25378), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2294,7 +2198,7 @@ static void StandUpRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2326,11 +2230,10 @@ static void StandUpRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(25379), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -2340,7 +2243,7 @@ static void StandUpRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -2349,14 +2252,13 @@ static void StandUpRCTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25368), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25381), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2375,7 +2277,7 @@ static void StandUpRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -2392,14 +2294,13 @@ static void StandUpRCTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25368), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25381), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2410,7 +2311,7 @@ static void StandUpRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -2432,15 +2333,14 @@ static void StandUpRCTrackSBendRight( session, direction, session.TrackColours.WithIndex(25382), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -2451,7 +2351,7 @@ static void StandUpRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -2483,11 +2383,10 @@ static void StandUpRCTrackLeftVerticalLoop( session, direction, session.TrackColours.WithIndex(25492), { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -2497,7 +2396,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2506,25 +2405,25 @@ static void StandUpRCTrackLeftVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25478), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25486), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25483), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25491), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2535,7 +2434,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2565,7 +2464,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2595,13 +2494,13 @@ static void StandUpRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2631,7 +2530,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -2661,7 +2560,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2670,25 +2569,25 @@ static void StandUpRCTrackLeftVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25483), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25491), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25478), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25486), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2699,7 +2598,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -2721,15 +2620,14 @@ static void StandUpRCTrackLeftVerticalLoop( session, direction, session.TrackColours.WithIndex(25485), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } PaintUtilSetSegmentSupportHeight( @@ -2740,7 +2638,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2772,13 +2670,12 @@ static void StandUpRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(25493), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -2787,28 +2684,28 @@ static void StandUpRCTrackRightVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25507), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25499), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25502), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25494), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2830,7 +2727,7 @@ static void StandUpRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(25495), { 16, 0, height }, { 5, 16, 119 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -2852,13 +2749,13 @@ static void StandUpRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(25496), { 0, 0, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2880,7 +2777,7 @@ static void StandUpRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(25497), { 0, 16, height + 32 }, { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -2902,7 +2799,7 @@ static void StandUpRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(25498), { 10, 16, height }, { 4, 16, 119 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -2911,28 +2808,28 @@ static void StandUpRCTrackRightVerticalLoop( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25502), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25494), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25507), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25499), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -2954,18 +2851,17 @@ static void StandUpRCTrackRightVerticalLoop( session, direction, session.TrackColours.WithIndex(25500), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } @@ -2999,11 +2895,10 @@ static void StandUpRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(25511), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3013,10 +2908,10 @@ static void StandUpRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3046,7 +2941,7 @@ static void StandUpRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3068,15 +2963,14 @@ static void StandUpRCTrackLeftQuarterTurn3( session, direction, session.TrackColours.WithIndex(25509), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3087,7 +2981,7 @@ static void StandUpRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3097,7 +2991,7 @@ static void StandUpRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; StandUpRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3135,11 +3029,10 @@ static void StandUpRCTrackLeftQuarterTurn3Bank( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3149,10 +3042,10 @@ static void StandUpRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3186,7 +3079,7 @@ static void StandUpRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3215,15 +3108,14 @@ static void StandUpRCTrackLeftQuarterTurn3Bank( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -3234,7 +3126,7 @@ static void StandUpRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3244,7 +3136,7 @@ static void StandUpRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; StandUpRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3277,8 +3169,7 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(25560), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } else { @@ -3301,12 +3192,11 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(25544), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3316,13 +3206,13 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -3346,8 +3236,7 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(25559), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } else { @@ -3370,16 +3259,15 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(25543), { 6, 0, height }, { 20, 32, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3390,7 +3278,7 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3424,8 +3312,7 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(25557), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } else { @@ -3448,12 +3335,11 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( session, direction, session.TrackColours.WithIndex(25541), { 0, 6, height }, { 32, 20, 3 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3463,13 +3349,13 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -3480,25 +3366,25 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25552), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25554), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25556), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25558), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } } @@ -3510,35 +3396,35 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25536), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25538), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25540), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 10, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 10, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25542), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; } } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; } PaintUtilSetSegmentSupportHeight( @@ -3549,7 +3435,7 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3559,7 +3445,7 @@ static void StandUpRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; StandUpRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3568,7 +3454,7 @@ static void StandUpRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; StandUpRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3599,18 +3485,14 @@ static void StandUpRCTrackHalfLoopUp( session, direction, session.TrackColours.WithIndex(25590), { 0, 6, height }, { 32, 20, 7 }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -3620,30 +3502,30 @@ static void StandUpRCTrackHalfLoopUp( session, direction, session.TrackColours.WithIndex(25576), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25584), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 15, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 15, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25581), { 0, 6, height }, { { 0, 20, height }, { 32, 2, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25589), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3674,7 +3556,7 @@ static void StandUpRCTrackHalfLoopUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -3698,14 +3580,11 @@ static void StandUpRCTrackHalfLoopUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3754,9 +3633,9 @@ static void StandUpRCTrackLeftCorkscrewUp( if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3783,7 +3662,7 @@ static void StandUpRCTrackLeftCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3818,19 +3697,18 @@ static void StandUpRCTrackLeftCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3866,11 +3744,10 @@ static void StandUpRCTrackRightCorkscrewUp( { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -3880,7 +3757,7 @@ static void StandUpRCTrackRightCorkscrewUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3907,7 +3784,7 @@ static void StandUpRCTrackRightCorkscrewUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3942,19 +3819,18 @@ static void StandUpRCTrackRightCorkscrewUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -4009,11 +3885,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4023,10 +3898,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4060,7 +3935,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4089,15 +3964,14 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4108,7 +3982,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4137,15 +4011,14 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4156,10 +4029,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4193,7 +4066,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4222,11 +4095,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4236,7 +4108,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4275,11 +4147,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4289,10 +4160,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4326,7 +4197,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4355,15 +4226,14 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4374,7 +4244,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -4403,15 +4273,14 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4422,10 +4291,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4459,7 +4328,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4488,11 +4357,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4502,7 +4370,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4517,7 +4385,7 @@ static void StandUpRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; StandUpRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4531,7 +4399,7 @@ static void StandUpRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; StandUpRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4569,11 +4437,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4583,10 +4450,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4620,7 +4487,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4654,10 +4521,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -4691,7 +4558,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -4720,15 +4587,14 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4739,7 +4605,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -4768,15 +4634,14 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -4787,10 +4652,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -4824,7 +4689,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -4857,10 +4722,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -4894,7 +4759,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -4923,11 +4788,10 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4937,7 +4801,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4976,11 +4840,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -4990,10 +4853,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5027,7 +4890,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5060,10 +4923,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -5097,7 +4960,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -5126,15 +4989,14 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5145,7 +5007,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -5174,15 +5036,14 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( { { 6, 0, height }, { 20, 32, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5193,10 +5054,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -5230,7 +5091,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -5264,10 +5125,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -5301,7 +5162,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -5330,11 +5191,10 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 7, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5344,7 +5204,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5359,7 +5219,7 @@ static void StandUpRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; StandUpRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -5373,7 +5233,7 @@ static void StandUpRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; StandUpRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -5397,16 +5257,11 @@ static void StandUpRCTrackBrakes( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A74A4 */ @@ -5414,7 +5269,7 @@ static void StandUpRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); switch (direction) { @@ -5440,9 +5295,9 @@ static void StandUpRCTrackOnRidePhoto( break; } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A74B4 */ @@ -5476,18 +5331,14 @@ static void StandUpRCTrackLeftEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5521,7 +5372,7 @@ static void StandUpRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5555,7 +5406,7 @@ static void StandUpRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5566,7 +5417,7 @@ static void StandUpRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5576,28 +5427,28 @@ static void StandUpRCTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(25646), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25650), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25654), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25658), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5608,7 +5459,7 @@ static void StandUpRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5644,18 +5495,14 @@ static void StandUpRCTrackRightEighthToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5689,7 +5536,7 @@ static void StandUpRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5723,7 +5570,7 @@ static void StandUpRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5734,7 +5581,7 @@ static void StandUpRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5744,28 +5591,28 @@ static void StandUpRCTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(25630), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25634), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25638), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25642), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5776,7 +5623,7 @@ static void StandUpRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5830,18 +5677,14 @@ static void StandUpRCTrackLeftEighthBankToDiag( { { 0, 6, height }, { 32, 20, 3 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -5875,7 +5718,7 @@ static void StandUpRCTrackLeftEighthBankToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5909,7 +5752,7 @@ static void StandUpRCTrackLeftEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -5920,7 +5763,7 @@ static void StandUpRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5930,28 +5773,28 @@ static void StandUpRCTrackLeftEighthBankToDiag( session, direction, session.TrackColours.WithIndex(25678), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25682), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25686), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25690), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -5962,7 +5805,7 @@ static void StandUpRCTrackLeftEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5998,18 +5841,14 @@ static void StandUpRCTrackRightEighthBankToDiag( { { 0, 27, height }, { 32, 1, 26 } }); break; } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -6043,7 +5882,7 @@ static void StandUpRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6077,7 +5916,7 @@ static void StandUpRCTrackRightEighthBankToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -6088,7 +5927,7 @@ static void StandUpRCTrackRightEighthBankToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -6098,28 +5937,28 @@ static void StandUpRCTrackRightEighthBankToDiag( session, direction, session.TrackColours.WithIndex(25662), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25666), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25670), { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25674), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6130,7 +5969,7 @@ static void StandUpRCTrackRightEighthBankToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6158,172 +5997,12 @@ static void StandUpRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25756), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25694), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25753), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25691), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25755), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25693), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25754), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25692), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { 25691, 25692, 25693, 25694 }, + { 25753, 25754, 25755, 25756 }, + }; + TrackPaintUtilDiagTilesPaintExtra( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], kSupportType); } static void StandUpRCTrackDiagBrakes( @@ -6331,18 +6010,17 @@ static void StandUpRCTrackDiagBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, StandupRCDiagBrakeImages, defaultDiagTileOffsets, - defaultDiagBoundLengths, nullptr); + session, 3, height, direction, trackSequence, StandupRCDiagBrakeImages, defaultDiagTileOffsets, defaultDiagBoundLengths, + nullptr); if (trackSequence == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, DiagSupportPlacement[direction], 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 8, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void StandUpRCTrackDiagBlockBrakes( @@ -6350,18 +6028,17 @@ static void StandUpRCTrackDiagBlockBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, - StandupRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 3, height, direction, trackSequence, StandupRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, DiagSupportPlacement[direction], 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 8, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A7524 */ @@ -6402,7 +6079,7 @@ static void StandUpRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -6434,7 +6111,7 @@ static void StandUpRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -6467,7 +6144,7 @@ static void StandUpRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -6476,24 +6153,22 @@ static void StandUpRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25766), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -6503,24 +6178,22 @@ static void StandUpRCTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25704), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -6532,7 +6205,7 @@ static void StandUpRCTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -6575,7 +6248,7 @@ static void StandUpRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -6607,7 +6280,7 @@ static void StandUpRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -6640,7 +6313,7 @@ static void StandUpRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -6649,25 +6322,22 @@ static void StandUpRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25778), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -6677,25 +6347,22 @@ static void StandUpRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25716), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 32, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height, session.SupportColours); break; } } @@ -6707,7 +6374,7 @@ static void StandUpRCTrackDiag60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -6750,7 +6417,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -6782,7 +6449,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -6815,7 +6482,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -6824,24 +6491,22 @@ static void StandUpRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25758), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -6851,24 +6516,22 @@ static void StandUpRCTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25696), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -6880,7 +6543,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -6923,7 +6586,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -6955,7 +6618,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -6988,7 +6651,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -6997,25 +6660,22 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25770), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -7025,25 +6685,22 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25708), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height, session.SupportColours); break; } } @@ -7055,7 +6712,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7098,7 +6755,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7130,7 +6787,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -7163,7 +6820,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -7172,25 +6829,22 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25774), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -7200,25 +6854,22 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25712), { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height, session.SupportColours); break; } } @@ -7230,7 +6881,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -7273,7 +6924,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7305,7 +6956,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7338,7 +6989,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7347,24 +6998,22 @@ static void StandUpRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25762), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7374,24 +7023,22 @@ static void StandUpRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25700), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7403,7 +7050,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7446,7 +7093,7 @@ static void StandUpRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -7478,7 +7125,7 @@ static void StandUpRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -7511,7 +7158,7 @@ static void StandUpRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -7520,24 +7167,22 @@ static void StandUpRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25768), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7547,24 +7192,22 @@ static void StandUpRCTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25706), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -7576,7 +7219,7 @@ static void StandUpRCTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -7619,7 +7262,7 @@ static void StandUpRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: if (trackElement.HasChain()) @@ -7651,7 +7294,7 @@ static void StandUpRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: if (trackElement.HasChain()) @@ -7684,7 +7327,7 @@ static void StandUpRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: if (trackElement.HasChain()) @@ -7693,25 +7336,22 @@ static void StandUpRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25780), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -7721,25 +7361,22 @@ static void StandUpRCTrackDiag60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 24, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25718), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 28, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 24, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 24, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 28, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 28, height, session.SupportColours); break; } } @@ -7751,7 +7388,7 @@ static void StandUpRCTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -7865,24 +7502,22 @@ static void StandUpRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25764), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7892,24 +7527,22 @@ static void StandUpRCTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25702), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } } @@ -7924,7 +7557,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A7594 */ @@ -7965,7 +7598,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -7997,7 +7630,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -8030,7 +7663,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -8039,25 +7672,22 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25776), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -8067,25 +7697,22 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25714), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height, session.SupportColours); break; } } @@ -8097,7 +7724,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8140,7 +7767,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -8172,7 +7799,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -8205,7 +7832,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -8214,24 +7841,22 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25772), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -8241,24 +7866,22 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25710), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height, session.SupportColours); break; } } @@ -8270,7 +7893,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -8313,7 +7936,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -8345,7 +7968,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -8378,7 +8001,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -8387,24 +8010,22 @@ static void StandUpRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25760), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -8414,24 +8035,22 @@ static void StandUpRCTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25698), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } } @@ -8443,7 +8062,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8472,7 +8091,7 @@ static void StandUpRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8493,7 +8112,7 @@ static void StandUpRCTrackDiagFlatToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8512,29 +8131,29 @@ static void StandUpRCTrackDiagFlatToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25724), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8545,7 +8164,7 @@ static void StandUpRCTrackDiagFlatToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8574,7 +8193,7 @@ static void StandUpRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8592,7 +8211,7 @@ static void StandUpRCTrackDiagFlatToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8614,29 +8233,29 @@ static void StandUpRCTrackDiagFlatToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25729), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8647,7 +8266,7 @@ static void StandUpRCTrackDiagFlatToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8676,7 +8295,7 @@ static void StandUpRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8697,7 +8316,7 @@ static void StandUpRCTrackDiagLeftBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8716,29 +8335,29 @@ static void StandUpRCTrackDiagLeftBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25731), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8749,7 +8368,7 @@ static void StandUpRCTrackDiagLeftBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8778,7 +8397,7 @@ static void StandUpRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8796,7 +8415,7 @@ static void StandUpRCTrackDiagRightBankToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8818,29 +8437,29 @@ static void StandUpRCTrackDiagRightBankToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25726), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8851,7 +8470,7 @@ static void StandUpRCTrackDiagRightBankToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8880,7 +8499,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8901,7 +8520,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8920,29 +8539,29 @@ static void StandUpRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25744), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -8953,7 +8572,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8982,7 +8601,7 @@ static void StandUpRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9000,7 +8619,7 @@ static void StandUpRCTrackDiagRightBankTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9022,29 +8641,29 @@ static void StandUpRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25749), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9055,7 +8674,7 @@ static void StandUpRCTrackDiagRightBankTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9084,7 +8703,7 @@ static void StandUpRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -9105,7 +8724,7 @@ static void StandUpRCTrackDiag25DegUpToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -9124,29 +8743,29 @@ static void StandUpRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25734), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9157,7 +8776,7 @@ static void StandUpRCTrackDiag25DegUpToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9186,7 +8805,7 @@ static void StandUpRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -9204,7 +8823,7 @@ static void StandUpRCTrackDiag25DegUpToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -9226,29 +8845,29 @@ static void StandUpRCTrackDiag25DegUpToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25739), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9259,7 +8878,7 @@ static void StandUpRCTrackDiag25DegUpToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -9332,22 +8951,22 @@ static void StandUpRCTrackDiagLeftBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25741), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9361,7 +8980,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A7674 */ @@ -9432,22 +9051,22 @@ static void StandUpRCTrackDiagRightBankTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25736), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 4, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9461,7 +9080,7 @@ static void StandUpRCTrackDiagRightBankTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A7684 */ @@ -9488,7 +9107,7 @@ static void StandUpRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9509,7 +9128,7 @@ static void StandUpRCTrackDiag25DegDownToLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9528,29 +9147,29 @@ static void StandUpRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25751), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9561,7 +9180,7 @@ static void StandUpRCTrackDiag25DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9590,7 +9209,7 @@ static void StandUpRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -9608,7 +9227,7 @@ static void StandUpRCTrackDiag25DegDownToRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -9630,29 +9249,29 @@ static void StandUpRCTrackDiag25DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25746), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9663,7 +9282,7 @@ static void StandUpRCTrackDiag25DegDownToRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -9692,7 +9311,7 @@ static void StandUpRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9710,7 +9329,7 @@ static void StandUpRCTrackDiagLeftBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9729,29 +9348,29 @@ static void StandUpRCTrackDiagLeftBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25720), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9762,7 +9381,7 @@ static void StandUpRCTrackDiagLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9791,7 +9410,7 @@ static void StandUpRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9809,7 +9428,7 @@ static void StandUpRCTrackDiagRightBank( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9828,29 +9447,29 @@ static void StandUpRCTrackDiagRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(25722), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -9861,7 +9480,7 @@ static void StandUpRCTrackDiagRightBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9878,16 +9497,11 @@ static void StandUpRCTrackBlockBrakes( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionStandUpRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/Steeplechase.cpp b/src/openrct2/ride/coaster/Steeplechase.cpp index b37850ab72..00df573585 100644 --- a/src/openrct2/ride/coaster/Steeplechase.cpp +++ b/src/openrct2/ride/coaster/Steeplechase.cpp @@ -12,13 +12,18 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" -static constexpr const uint32_t SteeplechaseRCDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr MetalSupportType kSupportType = MetalSupportType::Stick; + +static constexpr const uint32_t SteeplechaseRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_STEEPLECHASE_DIAG_BRAKES, SPR_G2_STEEPLECHASE_DIAG_BRAKES + 1, SPR_G2_STEEPLECHASE_DIAG_BRAKES, @@ -38,8 +43,7 @@ static void SteeplechaseTrackFlat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28635), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: case 3: @@ -58,8 +62,7 @@ static void SteeplechaseTrackFlat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28633), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: case 3: @@ -70,13 +73,9 @@ static void SteeplechaseTrackFlat( break; } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void SteeplechaseTrackStation( @@ -98,9 +97,9 @@ static void SteeplechaseTrackStation( { { 0, 0, height }, { 32, 20, 3 } }); DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A59B8 */ @@ -115,8 +114,7 @@ static void SteeplechaseTrack25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28649), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -127,8 +125,7 @@ static void SteeplechaseTrack25DegUp( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28651), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -145,8 +142,7 @@ static void SteeplechaseTrack25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28637), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -157,8 +153,7 @@ static void SteeplechaseTrack25DegUp( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28639), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -170,18 +165,14 @@ static void SteeplechaseTrack25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A59C8 */ @@ -196,8 +187,7 @@ static void SteeplechaseTrackFlatTo25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28650), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -208,8 +198,7 @@ static void SteeplechaseTrackFlatTo25DegUp( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28652), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -226,8 +215,7 @@ static void SteeplechaseTrackFlatTo25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28638), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -238,8 +226,7 @@ static void SteeplechaseTrackFlatTo25DegUp( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28640), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 2, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -251,18 +238,14 @@ static void SteeplechaseTrackFlatTo25DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A59D8 */ @@ -277,8 +260,7 @@ static void SteeplechaseTrack25DegUpToFlat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28654), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -289,8 +271,7 @@ static void SteeplechaseTrack25DegUpToFlat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28653), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 5, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -307,8 +288,7 @@ static void SteeplechaseTrack25DegUpToFlat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28642), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -319,8 +299,7 @@ static void SteeplechaseTrack25DegUpToFlat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28641), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 5, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 5, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -332,18 +311,14 @@ static void SteeplechaseTrack25DegUpToFlat( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A59E8 */ @@ -384,7 +359,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28698), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -396,7 +371,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28708), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height - 3, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height - 3, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -407,7 +382,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -417,10 +392,10 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -450,7 +425,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -480,10 +455,10 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -513,7 +488,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -528,7 +503,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28699), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -540,16 +515,16 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28689), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height - 2, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height - 2, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -560,7 +535,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -570,7 +545,7 @@ static void SteeplechaseTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; SteeplechaseTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -588,7 +563,7 @@ static void SteeplechaseTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28665), { 0, 6, height }, { 33, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -600,7 +575,7 @@ static void SteeplechaseTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28668), { 0, 6, height }, { 33, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -611,7 +586,7 @@ static void SteeplechaseTrackSBendLeft( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -621,7 +596,7 @@ static void SteeplechaseTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -630,7 +605,7 @@ static void SteeplechaseTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28666), { 0, 0, height }, { 33, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -656,7 +631,7 @@ static void SteeplechaseTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -673,7 +648,7 @@ static void SteeplechaseTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28666), { 0, 0, height }, { 33, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -691,7 +666,7 @@ static void SteeplechaseTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -700,7 +675,7 @@ static void SteeplechaseTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28668), { 0, 6, height }, { 33, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -712,7 +687,7 @@ static void SteeplechaseTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28665), { 0, 6, height }, { 33, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -724,10 +699,10 @@ static void SteeplechaseTrackSBendLeft( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -738,7 +713,7 @@ static void SteeplechaseTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -757,7 +732,7 @@ static void SteeplechaseTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28661), { 0, 6, height }, { 33, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -769,7 +744,7 @@ static void SteeplechaseTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28664), { 0, 6, height }, { 33, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -780,7 +755,7 @@ static void SteeplechaseTrackSBendRight( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -790,7 +765,7 @@ static void SteeplechaseTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -799,8 +774,7 @@ static void SteeplechaseTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28662), { 0, 6, height }, { 33, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::BottomRightSide, 0, height - 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height - 2, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -826,7 +800,7 @@ static void SteeplechaseTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -843,8 +817,7 @@ static void SteeplechaseTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28662), { 0, 6, height }, { 33, 26, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::BottomRightSide, 0, height - 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height - 2, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -862,7 +835,7 @@ static void SteeplechaseTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -871,7 +844,7 @@ static void SteeplechaseTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28664), { 0, 6, height }, { 33, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -883,7 +856,7 @@ static void SteeplechaseTrackSBendRight( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28661), { 0, 6, height }, { 33, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -895,10 +868,10 @@ static void SteeplechaseTrackSBendRight( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -909,7 +882,7 @@ static void SteeplechaseTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -928,7 +901,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28682), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 3, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -940,7 +913,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28688), { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -951,7 +924,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -961,10 +934,10 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -994,7 +967,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -1009,7 +982,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28683), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 1, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -1021,16 +994,16 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28677), { 6, 0, height }, { 20, 32, 3 }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height - 3, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height - 3, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -1041,7 +1014,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1051,7 +1024,7 @@ static void SteeplechaseTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; SteeplechaseTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1066,8 +1039,7 @@ static void SteeplechaseTrackBrakes( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28635), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: case 3: @@ -1077,13 +1049,9 @@ static void SteeplechaseTrackBrakes( session, MetalSupportType::StickAlt, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A5AD8 */ @@ -1101,7 +1069,7 @@ static void SteeplechaseTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(28725), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1115,7 +1083,7 @@ static void SteeplechaseTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(28733), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1127,14 +1095,11 @@ static void SteeplechaseTrackLeftEighthToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1168,7 +1133,7 @@ static void SteeplechaseTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1202,7 +1167,7 @@ static void SteeplechaseTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1213,7 +1178,7 @@ static void SteeplechaseTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1223,7 +1188,7 @@ static void SteeplechaseTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(28728), { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1237,7 +1202,7 @@ static void SteeplechaseTrackLeftEighthToDiag( session, direction, session.TrackColours.WithIndex(28736), { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1255,7 +1220,7 @@ static void SteeplechaseTrackLeftEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1275,7 +1240,7 @@ static void SteeplechaseTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(28709), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1289,7 +1254,7 @@ static void SteeplechaseTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(28717), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1301,14 +1266,11 @@ static void SteeplechaseTrackRightEighthToDiag( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -1342,7 +1304,7 @@ static void SteeplechaseTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -1376,7 +1338,7 @@ static void SteeplechaseTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1387,7 +1349,7 @@ static void SteeplechaseTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -1397,7 +1359,7 @@ static void SteeplechaseTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(28712), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1411,7 +1373,7 @@ static void SteeplechaseTrackRightEighthToDiag( session, direction, session.TrackColours.WithIndex(28720), { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -1430,7 +1392,7 @@ static void SteeplechaseTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -1458,174 +1420,12 @@ static void SteeplechaseTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28760), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28744), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28757), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28741), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28759), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28743), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28758), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::StickAlt, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::StickAlt, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(28742), { -16, -16, height }, - { { -16, -16, height }, { 32, 32, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::StickAlt, MetalSupportPlace::TopCorner, 0, height, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::StickAlt, MetalSupportPlace::BottomCorner, 0, height, - session.SupportColours); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } + constexpr ImageIndex images[2][kNumOrthogonalDirections] = { + { 28741, 28742, 28743, 28744 }, + { 28757, 28758, 28759, 28760 }, + }; + TrackPaintUtilDiagTilesPaintExtra( + session, 3, height, direction, trackSequence, images[trackElement.HasChain()], kSupportType); } static void SteeplechaseTrackDiagBrakes( @@ -1633,18 +1433,17 @@ static void SteeplechaseTrackDiagBrakes( const TrackElement& trackElement) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, SteeplechaseRCDiagBrakeImages, - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + session, 3, height, direction, trackSequence, SteeplechaseRCDiagBrakeImages, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A5B38 */ @@ -1685,7 +1484,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -1717,7 +1516,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -1750,7 +1549,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -1759,7 +1558,7 @@ static void SteeplechaseTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1771,8 +1570,7 @@ static void SteeplechaseTrackDiag25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1787,7 +1585,7 @@ static void SteeplechaseTrackDiag25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1799,8 +1597,7 @@ static void SteeplechaseTrackDiag25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1817,7 +1614,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -1860,7 +1657,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -1892,7 +1689,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -1925,7 +1722,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -1934,7 +1731,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1946,8 +1743,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1962,7 +1758,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -1974,8 +1770,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -1992,7 +1787,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2035,7 +1830,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2067,7 +1862,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2100,7 +1895,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2109,7 +1904,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2121,8 +1916,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2137,7 +1931,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2149,8 +1943,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2167,7 +1960,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2210,7 +2003,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -2242,7 +2035,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -2275,7 +2068,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -2284,7 +2077,7 @@ static void SteeplechaseTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2296,8 +2089,7 @@ static void SteeplechaseTrackDiag25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2312,7 +2104,7 @@ static void SteeplechaseTrackDiag25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 6, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2324,8 +2116,7 @@ static void SteeplechaseTrackDiag25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 6, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 6, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2342,7 +2133,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -2456,7 +2247,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2468,8 +2259,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2484,7 +2274,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2496,8 +2286,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 4, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 4, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2517,7 +2306,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A5B58 */ @@ -2558,7 +2347,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -2590,7 +2379,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -2623,7 +2412,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -2632,7 +2421,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2644,8 +2433,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2660,7 +2448,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2672,8 +2460,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::RightCorner, 0, height, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( @@ -2690,7 +2477,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2706,8 +2493,7 @@ static void SteeplechaseTrackBlockBrakes( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(28635), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: case 3: @@ -2717,13 +2503,9 @@ static void SteeplechaseTrackBlockBrakes( session, MetalSupportType::StickAlt, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionSteeplechase(int32_t trackType) diff --git a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp index fe6a58c665..98976e87e5 100644 --- a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp +++ b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp @@ -12,12 +12,21 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + +static constexpr ImageIndex kSuspendedSwingingRCDiagFlatImages[2][kNumOrthogonalDirections] = { + { 26183, 26184, 26185, 26186 }, + { 26211, 26212, 26213, 26214 }, +}; + /** rct2: 0x008A8958 */ static void SuspendedSwingingRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -60,19 +69,14 @@ static void SuspendedSwingingRCTrackFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A8AA8, 0x008A8AB8, 0x008A8AC8 */ @@ -96,11 +100,11 @@ static void SuspendedSwingingRCTrackStation( 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, MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A8968 */ @@ -161,45 +165,39 @@ static void SuspendedSwingingRCTrack25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 62, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 62, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 62, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 62, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 62, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A8978 */ @@ -232,18 +230,14 @@ static void SuspendedSwingingRCTrack60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 120); } /** rct2: 0x008A8988 */ @@ -304,45 +298,39 @@ static void SuspendedSwingingRCTrackFlatTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 54, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 54, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A8998 */ @@ -381,18 +369,14 @@ static void SuspendedSwingingRCTrack25DegUpTo60DegUp( } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::InvertedSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88); } /** rct2: 0x008A89A8 */ @@ -465,45 +449,39 @@ static void SuspendedSwingingRCTrack60DegUpTo25DegUp( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 76, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 76, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 76, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 76, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 76, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 76, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 76, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 76, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::InvertedSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); } /** rct2: 0x008A89B8 */ @@ -564,45 +542,39 @@ static void SuspendedSwingingRCTrack25DegUpToFlat( } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_13); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_13); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A89C8 */ @@ -693,17 +665,16 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -735,7 +706,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -768,10 +739,10 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -803,7 +774,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -838,19 +809,18 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -860,7 +830,7 @@ static void SuspendedSwingingRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; SuspendedSwingingRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -900,17 +870,16 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -940,7 +909,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -970,10 +939,10 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -1004,7 +973,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -1035,19 +1004,18 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -1088,17 +1056,16 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -1128,7 +1095,7 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -1157,10 +1124,10 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 5: switch (direction) @@ -1191,7 +1158,7 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 6: switch (direction) @@ -1222,19 +1189,18 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -1244,7 +1210,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; SuspendedSwingingRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -1253,7 +1219,7 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; SuspendedSwingingRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1293,14 +1259,13 @@ static void SuspendedSwingingRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -1335,17 +1300,15 @@ static void SuspendedSwingingRCTrackSBendLeft( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1380,17 +1343,15 @@ static void SuspendedSwingingRCTrackSBendLeft( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -1421,19 +1382,18 @@ static void SuspendedSwingingRCTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1474,14 +1434,13 @@ static void SuspendedSwingingRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -1516,17 +1475,15 @@ static void SuspendedSwingingRCTrackSBendRight( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1561,17 +1518,15 @@ static void SuspendedSwingingRCTrackSBendRight( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -1602,19 +1557,18 @@ static void SuspendedSwingingRCTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1659,17 +1613,16 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1702,7 +1655,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -1737,19 +1690,18 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1759,7 +1711,7 @@ static void SuspendedSwingingRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; SuspendedSwingingRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1799,20 +1751,19 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1843,19 +1794,18 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -1896,20 +1846,19 @@ static void SuspendedSwingingRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_INVERTED_4); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1940,19 +1889,18 @@ static void SuspendedSwingingRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 54, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::InvertedSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_INVERTED_5); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::InvertedSlopeEnd); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -1962,7 +1910,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; SuspendedSwingingRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -1971,7 +1919,7 @@ static void SuspendedSwingingRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; SuspendedSwingingRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1996,19 +1944,14 @@ static void SuspendedSwingingRCTrackBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A8B48 */ @@ -2051,17 +1994,16 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2095,7 +2037,7 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -2129,10 +2071,10 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -2166,7 +2108,7 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2201,19 +2143,18 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2258,17 +2199,16 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2302,7 +2242,7 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -2335,10 +2275,10 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -2372,7 +2312,7 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2407,19 +2347,18 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height + 16, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height + 16, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2464,17 +2403,16 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2508,7 +2446,7 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -2542,10 +2480,10 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -2579,7 +2517,7 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2614,19 +2552,18 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2671,17 +2608,16 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 58, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2715,7 +2651,7 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -2748,10 +2684,10 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -2785,7 +2721,7 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -2820,19 +2756,18 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 46, session.SupportColours); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -2877,14 +2812,13 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -2918,7 +2852,7 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -2952,7 +2886,7 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -2963,7 +2897,7 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -3002,26 +2936,23 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3066,14 +2997,13 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -3107,7 +3037,7 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -3141,7 +3071,7 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -3152,7 +3082,7 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -3191,26 +3121,23 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 44, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 44, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -3238,164 +3165,18 @@ static void SuspendedSwingingRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26214), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26186), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26211), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26183), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26213), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26185), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26212), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26184), { -16, -16, height + 29 }, - { { -16, -16, height + 29 }, { 32, 32, 3 } }); - break; - } - } + const auto* images = kSuspendedSwingingRCDiagFlatImages[trackElement.HasChain()]; + TrackPaintUtilDiagTilesPaint( + session, 3, height + 29, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 44, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 44, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 44, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 44, - session.SupportColours); - break; - } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } + if (trackSequence == 3) + MetalASupportsPaintSetupRotated( + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 0, height + 44, session.SupportColours); + + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A8BF8 */ @@ -3436,7 +3217,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -3468,7 +3249,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -3501,7 +3282,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -3539,26 +3320,23 @@ static void SuspendedSwingingRCTrackDiag25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 56, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 56, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 56, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 56, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 56, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3587,7 +3365,7 @@ static void SuspendedSwingingRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 1: switch (direction) @@ -3605,7 +3383,7 @@ static void SuspendedSwingingRCTrackDiag60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 2: switch (direction) @@ -3624,7 +3402,7 @@ static void SuspendedSwingingRCTrackDiag60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 3: switch (direction) @@ -3648,27 +3426,23 @@ static void SuspendedSwingingRCTrackDiag60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 32, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 32, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 36, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 36, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 32, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 32, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 36, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 36, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; } } @@ -3711,7 +3485,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -3743,7 +3517,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -3776,7 +3550,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -3814,26 +3588,23 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -3862,7 +3633,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -3880,7 +3651,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -3899,7 +3670,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -3923,27 +3694,23 @@ static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 16, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 16, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 16, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 16, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 16, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 16, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 16, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 16, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -3972,7 +3739,7 @@ static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -3990,7 +3757,7 @@ static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4009,7 +3776,7 @@ static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -4033,27 +3800,23 @@ static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 21, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 21, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 21, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 21, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 21, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 21, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 21, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 21, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -4096,7 +3859,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -4128,7 +3891,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -4161,7 +3924,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -4199,26 +3962,23 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -4261,7 +4021,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: if (trackElement.HasChain()) @@ -4293,7 +4053,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: if (trackElement.HasChain()) @@ -4326,7 +4086,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: if (trackElement.HasChain()) @@ -4364,26 +4124,23 @@ static void SuspendedSwingingRCTrackDiag25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 56, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 56, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 56, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 56, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 56, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 56, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -4412,7 +4169,7 @@ static void SuspendedSwingingRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 1: switch (direction) @@ -4430,7 +4187,7 @@ static void SuspendedSwingingRCTrackDiag60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 2: switch (direction) @@ -4449,7 +4206,7 @@ static void SuspendedSwingingRCTrackDiag60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; case 3: switch (direction) @@ -4468,7 +4225,7 @@ static void SuspendedSwingingRCTrackDiag60DegDown( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 120, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 120); break; } } @@ -4611,28 +4368,25 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A8C68 */ @@ -4659,7 +4413,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -4677,7 +4431,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4696,7 +4450,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -4720,27 +4474,23 @@ static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 17, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 17, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 17, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 17, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 17, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 17, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 17, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 17, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -4769,7 +4519,7 @@ static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 1: switch (direction) @@ -4787,7 +4537,7 @@ static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 2: switch (direction) @@ -4806,7 +4556,7 @@ static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; case 3: switch (direction) @@ -4830,26 +4580,23 @@ static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( { case 0: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 8, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 8, height + 44, session.SupportColours); break; case 1: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 8, height + 44, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 8, height + 44, session.SupportColours); break; case 2: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 8, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 8, height + 44, session.SupportColours); break; case 3: MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 8, height + 44, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 8, height + 44, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 88); break; } } @@ -4892,7 +4639,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: if (trackElement.HasChain()) @@ -4924,7 +4671,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: if (trackElement.HasChain()) @@ -4957,7 +4704,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: if (trackElement.HasChain()) @@ -4995,26 +4742,23 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -5040,19 +4784,14 @@ static void SuspendedSwingingRCTrackBlockBrakes( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 44, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedFlat); + PaintUtilSetGeneralSupportHeight(session, height + 48); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionSuspendedSwingingRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/VirginiaReel.cpp b/src/openrct2/ride/coaster/VirginiaReel.cpp index 8150f29c92..2450a4a67d 100644 --- a/src/openrct2/ride/coaster/VirginiaReel.cpp +++ b/src/openrct2/ride/coaster/VirginiaReel.cpp @@ -11,11 +11,16 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" #include "../VehiclePaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + // 0x009927E6: static constexpr VehicleBoundBox _virginiaReelBoundbox[] = { { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, @@ -234,19 +239,19 @@ static void PaintVirginiaReelTrackFlat( if (direction & 1) { PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 27, 32, 2 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00811274 */ @@ -281,32 +286,32 @@ static void PaintVirginiaReelTrack25DegUp( { case 0: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; case 1: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 2: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00811294 */ @@ -328,40 +333,40 @@ static void PaintVirginiaReelTrackFlatTo25DegUp( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 27, 32, 2 } }); session.WoodenSupportsPrependTo = ps; WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 2: ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); session.WoodenSupportsPrependTo = ps; WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; case 3: PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 27, 32, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00811294 */ @@ -396,32 +401,32 @@ static void PaintVirginiaReelTrack25DegUpToFlat( { case 0: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareFlat); break; case 1: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::_14); break; case 2: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::_14); break; case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008112A4 */ @@ -463,7 +468,7 @@ static void PaintVirginiaReelStation( imageId = session.TrackColours.WithIndex(SPR_VIRGINIA_REEL_FLAT_SW_NE); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } else if (direction == 1 || direction == 3) { @@ -473,15 +478,15 @@ static void PaintVirginiaReelStation( imageId = session.TrackColours.WithIndex(SPR_VIRGINIA_REEL_FLAT_NW_SE); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 2 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00811304 */ @@ -492,7 +497,7 @@ static void PaintVirginiaReelTrackLeftQuarterTurn3Tiles( TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 2, height, direction, trackSequence, session.TrackColours, virginia_reel_track_pieces_flat_quarter_turn_3_tiles); - TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TUNNEL_SQUARE_FLAT, direction, trackSequence); + TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TunnelType::SquareFlat, direction, trackSequence); switch (trackSequence) { @@ -509,12 +514,12 @@ static void PaintVirginiaReelTrackLeftQuarterTurn3Tiles( case 0: case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(kSegmentsAll, direction), 0xFFFF, 0); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr uint8_t virginia_reel_right_quarter_turn_3_tiles_to_left_turn_map[] = { @@ -544,29 +549,25 @@ static void PaintVirginiaReelTrackLeftQuarterTurn1Tile( switch (direction) { case 0: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + WoodenASupportsPaintSetup(session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00811334 */ diff --git a/src/openrct2/ride/coaster/WildMouse.cpp b/src/openrct2/ride/coaster/WildMouse.cpp index 5c2ca3838e..9846cecf99 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + enum { SPR_WILD_MOUSE_FLAT_SW_NE = 16900, @@ -156,7 +161,7 @@ static constexpr uint32_t _wild_mouse_brakes_image_ids[4] = { SPR_WILD_MOUSE_BRAKES_NW_SE, }; -static constexpr uint32_t _wild_mouse_block_brakes_image_ids[NumOrthogonalDirections][2] = { +static constexpr uint32_t _wild_mouse_block_brakes_image_ids[kNumOrthogonalDirections][2] = { { SPR_WILD_MOUSE_BLOCK_BRAKES_SW_NE_OPEN, SPR_WILD_MOUSE_BLOCK_BRAKES_SW_NE_CLOSED }, { SPR_WILD_MOUSE_BLOCK_BRAKES_NW_SE_OPEN, SPR_WILD_MOUSE_BLOCK_BRAKES_NW_SE_CLOSED }, { SPR_WILD_MOUSE_BLOCK_BRAKES_SW_NE_OPEN, SPR_WILD_MOUSE_BLOCK_BRAKES_SW_NE_CLOSED }, @@ -180,16 +185,11 @@ static void WildMouseTrackFlat( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void WildMouseTrackStation( @@ -222,9 +222,9 @@ static void WildMouseTrackStation( } DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0078B1F4 */ @@ -244,23 +244,18 @@ static void WildMouseTrack25DegUp( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -9, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0078B204 */ @@ -289,29 +284,23 @@ static void WildMouseTrack60DegUp( { if (direction == 0 || direction == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -33, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -33, height, session.SupportColours); } else { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x0078B214 */ @@ -331,23 +320,18 @@ static void WildMouseTrackFlatTo25DegUp( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -4, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -4, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0078B224 */ @@ -382,23 +366,18 @@ static void WildMouseTrack25DegUpTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -13, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -13, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x0078B234 */ @@ -433,23 +412,18 @@ static void WildMouseTrack60DegUpTo25DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -21, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -21, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x0078B244 */ @@ -469,23 +443,18 @@ static void WildMouseTrack25DegUpToFlat( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -7, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0078B254 */ @@ -564,14 +533,13 @@ static void WildMouseTrackRightQuarterTurn3( }; TrackPaintUtilRightQuarterTurn3TilesPaint3(session, height, direction, trackSequence, session.TrackColours, imageIds); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::StandardFlat); switch (trackSequence) { case 0: case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height, session.SupportColours); break; } @@ -592,7 +560,7 @@ static void WildMouseTrackRightQuarterTurn3( break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void WildMouseTrackRightQuarterTurn325DegDown( @@ -628,14 +596,14 @@ static void WildMouseTrackRightQuarterTurn325DegDown( session, session.TrackColours.WithIndex(sbb->sprite_id), { offset.x, offset.y, height + offset.z }, sbb->bb_size); } - TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel(session, height, direction, trackSequence, TUNNEL_2, TUNNEL_1); + TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel( + session, height, direction, trackSequence, TunnelType::StandardSlopeEnd, TunnelType::StandardSlopeStart); switch (trackSequence) { case 0: case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -9, height, session.SupportColours); break; } @@ -652,14 +620,14 @@ static void WildMouseTrackRightQuarterTurn325DegDown( break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + generalSupportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + generalSupportHeights[trackSequence]); } static void WildMouseTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WildMouseTrackRightQuarterTurn325DegDown(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -697,24 +665,22 @@ static void WildMouseTrackRightQuarterTurn325DegUp( sbb->bb_size); } - TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel(session, height, direction, trackSequence, TUNNEL_1, TUNNEL_2); + TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel( + session, height, direction, trackSequence, TunnelType::StandardSlopeStart, TunnelType::StandardSlopeEnd); switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -9, height, session.SupportColours); break; case 3: if (direction == 2) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -11, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -11, height, session.SupportColours); } else { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -9, height, session.SupportColours); } break; } @@ -732,7 +698,7 @@ static void WildMouseTrackRightQuarterTurn325DegUp( break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + generalSupportHeights[trackSequence], 0x20); + PaintUtilSetGeneralSupportHeight(session, height + generalSupportHeights[trackSequence]); } /** rct2: 0x0078B324 */ @@ -740,7 +706,7 @@ static void WildMouseTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WildMouseTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -748,7 +714,7 @@ static void WildMouseTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WildMouseTrackRightQuarterTurn3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -780,8 +746,9 @@ static void WildMouseTrackLeftQuarterTurn1( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 6, height }, { 24, 24, 2 } }); break; } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -1, height, session.SupportColours); - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height, session.SupportColours); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, 0, TunnelType::StandardFlat, 0, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -789,7 +756,7 @@ static void WildMouseTrackLeftQuarterTurn1( PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0078B3A4 */ @@ -832,23 +799,18 @@ static void WildMouseTrackFlatTo60DegUp( } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -5, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -5, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x0078B364 */ @@ -885,29 +847,23 @@ static void WildMouseTrack60DegUpToFlat( { if (direction == 0 || direction == 3) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, -17, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -17, height, session.SupportColours); } else { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 16, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 16, height, session.SupportColours); } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardFlat); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x0078B374 */ @@ -935,16 +891,11 @@ static void WildMouseTrackBrakes( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0078B3C4 */ @@ -963,16 +914,11 @@ static void WildMouseTrackRotationControlToggle( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0078B3B4 */ @@ -985,16 +931,11 @@ static void WildMouseTrackBlockBrakes( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionWildMouse(int32_t trackType) diff --git a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp index 30e3430360..3a385f8707 100644 --- a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp @@ -17,12 +17,19 @@ #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.Surface.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + +using namespace OpenRCT2; + enum { SPR_WOODEN_RC_FLAT_TO_LEFT_BANK_SW_NE = 23497, @@ -449,14 +456,14 @@ static constexpr uint32_t _wooden_rc_station_block_brakes_image_ids[4][2] = { { 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 WoodenRCDiagBrakeImages[NumOrthogonalDirections] = { +static constexpr const uint32_t WoodenRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_WOODEN_RC_DIAG_BRAKES, SPR_G2_WOODEN_RC_DIAG_BRAKES + 1, SPR_G2_WOODEN_RC_DIAG_BRAKES, SPR_G2_WOODEN_RC_DIAG_BRAKES + 1, }; -static constexpr const uint32_t WoodenRCDiagBlockBrakeImages[2][NumOrthogonalDirections] = { +static constexpr const uint32_t WoodenRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_WOODEN_RC_DIAG_BRAKES + 3, SPR_G2_WOODEN_RC_DIAG_BRAKES + 5, @@ -500,10 +507,10 @@ static void WoodenRCTrackFlat( session, direction, imageIds[direction][isChained], railsImageIds[direction][isChained], { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -533,11 +540,11 @@ static void WoodenRCTrackStation( { { 0, 2, height }, { 32, 27, 2 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AC578 */ @@ -612,20 +619,20 @@ static void WoodenRCTrack25DegUp( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AC588 */ @@ -680,20 +687,20 @@ static void WoodenRCTrack60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008AC598 */ @@ -768,20 +775,20 @@ static void WoodenRCTrackFlatTo25DegUp( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AC5A8 */ @@ -881,20 +888,20 @@ static void WoodenRCTrack25DegUpTo60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AC5B8 */ @@ -995,20 +1002,20 @@ static void WoodenRCTrack60DegUpTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008AC5C8 */ @@ -1083,20 +1090,20 @@ static void WoodenRCTrack25DegUpToFlat( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008AC5D8 */ @@ -1446,7 +1453,7 @@ static void WoodenRCTrackRightQuarterTurn5( }, }, }; - static WoodenSupportSubType supportType[NumOrthogonalDirections][7] = { + static WoodenSupportSubType supportType[kNumOrthogonalDirections][7] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::Null, WoodenSupportSubType::Corner3, WoodenSupportSubType::Corner1, @@ -1459,12 +1466,11 @@ static void WoodenRCTrackRightQuarterTurn5( WoodenRCTrackPaintBb(session, &imageIds[0][direction][trackSequence], height); WoodenRCTrackPaintBb(session, &imageIds[1][direction][trackSequence], height); - TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TunnelType::SquareFlat); if (supportType[direction][trackSequence] != WoodenSupportSubType::Null) { - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType[direction][trackSequence], height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, supportType[direction][trackSequence], height, session.SupportColours); } int32_t blockedSegments = 0; @@ -1500,7 +1506,7 @@ static void WoodenRCTrackRightQuarterTurn5( break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -1508,7 +1514,7 @@ static void WoodenRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; WoodenRCTrackRightQuarterTurn5(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -1555,10 +1561,10 @@ static void WoodenRCTrackFlatToLeftBank( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AC668 */ @@ -1604,10 +1610,10 @@ static void WoodenRCTrackFlatToRightBank( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AC678 */ @@ -1921,7 +1927,7 @@ static void WoodenRCTrackBankedRightQuarterTurn5( }, }, }; - static WoodenSupportSubType supportType[NumOrthogonalDirections][7] = { + static WoodenSupportSubType supportType[kNumOrthogonalDirections][7] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::Null, WoodenSupportSubType::Corner3, WoodenSupportSubType::Corner1, @@ -1934,12 +1940,11 @@ static void WoodenRCTrackBankedRightQuarterTurn5( WoodenRCTrackPaintBb(session, &imageIds[0][direction][trackSequence], height); WoodenRCTrackPaintBb(session, &imageIds[1][direction][trackSequence], height); - TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TunnelType::SquareFlat); if (supportType[direction][trackSequence] != WoodenSupportSubType::Null) { - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType[direction][trackSequence], height, session.SupportColours); + WoodenASupportsPaintSetup(session, kSupportType, supportType[direction][trackSequence], height, session.SupportColours); } int32_t blockedSegments = 0; @@ -1975,7 +1980,7 @@ static void WoodenRCTrackBankedRightQuarterTurn5( break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -1983,7 +1988,7 @@ static void WoodenRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; WoodenRCTrackBankedRightQuarterTurn5(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -2030,18 +2035,18 @@ static void WoodenRCTrackLeftBankTo25DegUp( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AC6C8 */ @@ -2087,18 +2092,18 @@ static void WoodenRCTrackRightBankTo25DegUp( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AC6D8 */ @@ -2144,18 +2149,18 @@ static void WoodenRCTrack25DegUpToLeftBank( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008AC6E8 */ @@ -2201,18 +2206,18 @@ static void WoodenRCTrack25DegUpToRightBank( { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008AC6F8 */ @@ -2268,10 +2273,10 @@ static void WoodenRCTrackLeftBank( session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AC748 */ @@ -2302,8 +2307,8 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24647), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( @@ -2319,8 +2324,8 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24678), { 0, 0, height }, { { 0, 2, height + 67 }, { 32, 27, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( @@ -2330,8 +2335,8 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24657), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( @@ -2341,16 +2346,16 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24662), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -2359,7 +2364,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2372,7 +2377,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24648), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2388,7 +2393,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24679), { 0, 0, height }, { { 0, 0, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2398,7 +2403,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24658), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2414,7 +2419,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24685), { 0, 0, height }, { { 0, 16, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2425,7 +2430,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -2438,7 +2443,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24649), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2454,7 +2459,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24680), { 0, 0, height }, { { 16, 16, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2464,7 +2469,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24659), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2480,7 +2485,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24686), { 0, 0, height }, { { 0, 0, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2492,7 +2497,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -2501,7 +2506,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -2514,7 +2519,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24650), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2530,7 +2535,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24681), { 0, 0, height }, { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2546,7 +2551,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24683), { 0, 0, height }, { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2562,7 +2567,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24687), { 0, 0, height }, { { 16, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2573,7 +2578,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -2630,19 +2635,19 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2666,8 +2671,8 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24627), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( @@ -2677,8 +2682,8 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24632), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( @@ -2694,8 +2699,8 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24673), { 0, 0, height }, { { 0, 2, height + 67 }, { 32, 27, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( @@ -2705,16 +2710,16 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24642), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -2722,7 +2727,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -2741,7 +2746,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24667), { 0, 0, height }, { { 0, 16, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2751,7 +2756,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24633), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2767,7 +2772,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24674), { 0, 0, height }, { { 0, 0, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2777,7 +2782,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24643), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2788,7 +2793,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -2807,7 +2812,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24668), { 0, 0, height }, { { 0, 0, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2817,7 +2822,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24634), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2833,7 +2838,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24675), { 0, 0, height }, { { 16, 16, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2843,7 +2848,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24644), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2855,7 +2860,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -2863,7 +2868,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -2882,7 +2887,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24669), { 0, 0, height }, { { 16, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -2898,7 +2903,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24671), { 0, 0, height }, { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -2914,7 +2919,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24676), { 0, 0, height }, { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -2924,7 +2929,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24645), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -2935,7 +2940,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -2993,19 +2998,19 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionNext(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -3016,7 +3021,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; WoodenRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -3026,7 +3031,7 @@ static void WoodenRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; WoodenRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -3049,7 +3054,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24591), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3065,7 +3070,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24607), { 0, 0, height }, { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3075,7 +3080,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24594), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3091,15 +3096,15 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24610), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3112,7 +3117,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24592), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3128,7 +3133,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24608), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3138,7 +3143,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24593), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3154,7 +3159,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24609), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3165,7 +3170,7 @@ static void WoodenRCTrackSBendLeft( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3178,7 +3183,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24593), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3194,7 +3199,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24609), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3204,7 +3209,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24592), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3220,7 +3225,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24608), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3231,7 +3236,7 @@ static void WoodenRCTrackSBendLeft( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3244,7 +3249,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24594), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3260,7 +3265,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24610), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3270,7 +3275,7 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24591), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3286,20 +3291,20 @@ static void WoodenRCTrackSBendLeft( session, direction, WoodenRCGetRailsColour(session).WithIndex(24607), { 0, 0, height }, { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3329,7 +3334,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24611), { 0, 0, height }, { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3339,7 +3344,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24603), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3355,7 +3360,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24614), { 0, 0, height }, { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3365,15 +3370,15 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24606), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -3392,7 +3397,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24612), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3402,7 +3407,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24604), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3418,7 +3423,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24613), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3428,7 +3433,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24605), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3439,7 +3444,7 @@ static void WoodenRCTrackSBendRight( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -3458,7 +3463,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24613), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3468,7 +3473,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24605), { 0, 0, height }, { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3484,7 +3489,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24612), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3494,7 +3499,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24604), { 0, 0, height }, { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -3505,7 +3510,7 @@ static void WoodenRCTrackSBendRight( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -3524,7 +3529,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24614), { 0, 0, height }, { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -3534,7 +3539,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24606), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -3550,7 +3555,7 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24611), { 0, 0, height }, { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -3560,20 +3565,20 @@ static void WoodenRCTrackSBendRight( session, direction, WoodenRCGetRailsColour(session).WithIndex(24603), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -3610,7 +3615,7 @@ static void WoodenRCTrackLeftVerticalLoop( session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight( session, @@ -3620,7 +3625,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -3658,7 +3663,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3692,7 +3697,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -3726,13 +3731,13 @@ static void WoodenRCTrackLeftVerticalLoop( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -3766,7 +3771,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -3800,7 +3805,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -3838,7 +3843,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -3865,10 +3870,10 @@ static void WoodenRCTrackLeftVerticalLoop( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; } PaintUtilSetSegmentSupportHeight( @@ -3879,7 +3884,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -3916,9 +3921,9 @@ static void WoodenRCTrackRightVerticalLoop( session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -3948,7 +3953,7 @@ static void WoodenRCTrackRightVerticalLoop( session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 20, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -3974,7 +3979,7 @@ static void WoodenRCTrackRightVerticalLoop( { 5, 16, 119 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 3: switch (direction) @@ -4000,13 +4005,13 @@ static void WoodenRCTrackRightVerticalLoop( { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -4032,7 +4037,7 @@ static void WoodenRCTrackRightVerticalLoop( { 32, 16, 3 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 7: switch (direction) @@ -4058,7 +4063,7 @@ static void WoodenRCTrackRightVerticalLoop( { 4, 16, 119 }); break; } - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 168); break; case 8: switch (direction) @@ -4088,7 +4093,7 @@ static void WoodenRCTrackRightVerticalLoop( session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 16, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 9: switch (direction) @@ -4115,13 +4120,13 @@ static void WoodenRCTrackRightVerticalLoop( switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; case 2: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } @@ -4147,7 +4152,7 @@ static void WoodenRCTrackLeftQuarterTurn3( session, direction, WoodenRCGetRailsColour(session).WithIndex(24694), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4163,7 +4168,7 @@ static void WoodenRCTrackLeftQuarterTurn3( session, direction, WoodenRCGetRailsColour(session).WithIndex(24706), { 0, 6, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4173,7 +4178,7 @@ static void WoodenRCTrackLeftQuarterTurn3( session, direction, WoodenRCGetRailsColour(session).WithIndex(24700), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4189,18 +4194,18 @@ static void WoodenRCTrackLeftQuarterTurn3( session, direction, WoodenRCGetRailsColour(session).WithIndex(24703), { 0, 6, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4258,7 +4263,7 @@ static void WoodenRCTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4271,7 +4276,7 @@ static void WoodenRCTrackLeftQuarterTurn3( session, direction, WoodenRCGetRailsColour(session).WithIndex(24692), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4287,7 +4292,7 @@ static void WoodenRCTrackLeftQuarterTurn3( session, direction, WoodenRCGetRailsColour(session).WithIndex(24704), { 6, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4297,7 +4302,7 @@ static void WoodenRCTrackLeftQuarterTurn3( session, direction, WoodenRCGetRailsColour(session).WithIndex(24698), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4313,20 +4318,20 @@ static void WoodenRCTrackLeftQuarterTurn3( session, direction, WoodenRCGetRailsColour(session).WithIndex(24701), { 6, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4337,7 +4342,7 @@ static void WoodenRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4361,7 +4366,7 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24712), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4379,7 +4384,7 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24724), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4390,7 +4395,7 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24718), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4408,18 +4413,18 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24721), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -4483,7 +4488,7 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -4497,7 +4502,7 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24710), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4515,7 +4520,7 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24722), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4526,7 +4531,7 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24716), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4544,20 +4549,20 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24719), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -4568,7 +4573,7 @@ static void WoodenRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4591,7 +4596,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24772), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4607,7 +4612,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24785), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4617,7 +4622,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24776), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4633,18 +4638,18 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24783), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -4655,7 +4660,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -4668,7 +4673,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24771), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4684,7 +4689,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24784), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4700,7 +4705,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24786), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4716,20 +4721,20 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24782), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -4759,7 +4764,7 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24777), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4769,7 +4774,7 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24763), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4785,7 +4790,7 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24780), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4795,18 +4800,18 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24767), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -4817,7 +4822,7 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -4836,7 +4841,7 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24778), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4852,7 +4857,7 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24779), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4868,7 +4873,7 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24781), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4878,20 +4883,20 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24768), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -4902,7 +4907,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -4912,7 +4917,7 @@ static void WoodenRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -4936,7 +4941,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24748), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -4954,7 +4959,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24760), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -4965,7 +4970,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24754), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -4983,12 +4988,12 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24757), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5006,29 +5011,29 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5092,7 +5097,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5106,7 +5111,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24746), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5124,7 +5129,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24758), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5135,7 +5140,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24752), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5153,16 +5158,16 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24755), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5181,7 +5186,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5202,7 +5207,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24757), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5213,7 +5218,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24748), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5231,7 +5236,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24760), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5242,16 +5247,16 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24754), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5270,29 +5275,29 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -5356,7 +5361,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -5377,7 +5382,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24755), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5388,7 +5393,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24746), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5406,7 +5411,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24758), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5417,12 +5422,12 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24752), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5440,7 +5445,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5472,7 +5477,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24737), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5483,7 +5488,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24728), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5501,7 +5506,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24740), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5512,12 +5517,12 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24734), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5535,29 +5540,29 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -5621,7 +5626,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -5642,7 +5647,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24739), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5653,7 +5658,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24730), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5671,7 +5676,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24742), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5682,16 +5687,16 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24736), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5710,7 +5715,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -5724,7 +5729,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24728), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5742,7 +5747,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24740), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5753,7 +5758,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24734), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5771,16 +5776,16 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24737), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -5799,29 +5804,29 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -5884,7 +5889,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -5898,7 +5903,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24730), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -5916,7 +5921,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24742), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -5927,7 +5932,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24736), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -5945,12 +5950,12 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, direction, WoodenRCGetRailsColour(session).WithIndex(24739), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -5968,7 +5973,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -5984,7 +5989,7 @@ static void WoodenRCTrackLeftHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenRCTrackRightHalfBankedHelixUpSmall( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -6000,7 +6005,7 @@ static void WoodenRCTrackRightHalfBankedHelixDownSmall( trackSequence -= 4; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -6023,7 +6028,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24570), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6039,7 +6044,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24590), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6049,7 +6054,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24580), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6065,12 +6070,12 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24585), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6088,7 +6093,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -6097,7 +6102,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6110,7 +6115,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24569), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6126,7 +6131,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24589), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6136,7 +6141,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24579), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6152,7 +6157,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24584), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6163,7 +6168,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6176,7 +6181,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24568), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6192,7 +6197,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24588), { 0, 0, height }, { { 16, 16, height + 29 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6202,7 +6207,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24578), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6218,7 +6223,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24583), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6237,7 +6242,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -6246,7 +6251,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -6259,7 +6264,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24567), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6275,7 +6280,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24587), { 0, 0, height }, { { 0, 0, height + 33 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6285,7 +6290,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24577), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6301,7 +6306,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24582), { 0, 0, height }, { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6312,7 +6317,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -6325,7 +6330,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24566), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6341,7 +6346,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24586), { 0, 0, height }, { { 2, 0, height + 33 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6351,7 +6356,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24576), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6367,16 +6372,16 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24581), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6395,7 +6400,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -6414,7 +6419,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24585), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6424,7 +6429,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24570), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6440,7 +6445,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24590), { 0, 0, height }, { { 2, 0, height + 27 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6450,16 +6455,16 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24580), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -6478,7 +6483,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: PaintUtilSetSegmentSupportHeight( @@ -6486,7 +6491,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -6505,7 +6510,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24584), { 0, 0, height }, { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6515,7 +6520,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24569), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6531,7 +6536,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24589), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6541,7 +6546,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24579), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6552,7 +6557,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -6571,7 +6576,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24583), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6581,7 +6586,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24568), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6597,7 +6602,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24588), { 0, 0, height }, { { 16, 16, height + 29 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6607,7 +6612,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24578), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6625,7 +6630,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: PaintUtilSetSegmentSupportHeight( @@ -6633,7 +6638,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -6652,7 +6657,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24582), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6662,7 +6667,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24567), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6678,7 +6683,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24587), { 0, 0, height }, { { 0, 0, height + 33 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6688,7 +6693,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24577), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6699,7 +6704,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -6718,7 +6723,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24581), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6728,7 +6733,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24566), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6744,7 +6749,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24586), { 0, 0, height }, { { 0, 2, height + 33 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6754,12 +6759,12 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24576), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6777,7 +6782,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -6807,7 +6812,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24551), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6817,7 +6822,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24536), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6833,7 +6838,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24556), { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6843,12 +6848,12 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24546), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -6866,7 +6871,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -6874,7 +6879,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -6893,7 +6898,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24552), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6903,7 +6908,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24537), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6919,7 +6924,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24557), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6929,7 +6934,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24547), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -6940,7 +6945,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -6959,7 +6964,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24553), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -6969,7 +6974,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24538), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -6985,7 +6990,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24558), { 0, 0, height }, { { 16, 16, height + 29 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -6995,7 +7000,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24548), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7013,7 +7018,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -7021,7 +7026,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 5: switch (direction) @@ -7040,7 +7045,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24554), { 0, 0, height }, { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7050,7 +7055,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24539), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7066,7 +7071,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24559), { 0, 0, height }, { { 0, 0, height + 33 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7076,7 +7081,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24549), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7087,7 +7092,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 6: switch (direction) @@ -7106,7 +7111,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24555), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7116,7 +7121,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24540), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7132,7 +7137,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24560), { 0, 0, height }, { { 2, 0, height + 33 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7142,16 +7147,16 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24550), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7170,7 +7175,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 7: switch (direction) @@ -7183,7 +7188,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24536), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7199,7 +7204,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24556), { 0, 0, height }, { { 2, 0, height + 27 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7209,7 +7214,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24546), { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7225,16 +7230,16 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24551), { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight( @@ -7253,7 +7258,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 8: PaintUtilSetSegmentSupportHeight( @@ -7262,7 +7267,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 9: switch (direction) @@ -7275,7 +7280,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24537), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7291,7 +7296,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24557), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7301,7 +7306,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24547), { 0, 0, height }, { { 0, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7317,7 +7322,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24552), { 0, 0, height }, { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7328,7 +7333,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 10: switch (direction) @@ -7341,7 +7346,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24538), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7357,7 +7362,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24558), { 0, 0, height }, { { 16, 16, height + 29 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7367,7 +7372,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24548), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7383,7 +7388,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24553), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7402,7 +7407,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 11: PaintUtilSetSegmentSupportHeight( @@ -7411,7 +7416,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 48, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 12: switch (direction) @@ -7424,7 +7429,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24539), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7440,7 +7445,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24559), { 0, 0, height }, { { 0, 0, height + 33 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7450,7 +7455,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24549), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7466,7 +7471,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24554), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -7477,7 +7482,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 13: switch (direction) @@ -7490,7 +7495,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24540), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -7506,7 +7511,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24560), { 0, 0, height }, { { 0, 2, height + 33 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -7516,7 +7521,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24550), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -7532,12 +7537,12 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, direction, WoodenRCGetRailsColour(session).WithIndex(24555), { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight( session, @@ -7555,7 +7560,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -7571,7 +7576,7 @@ static void WoodenRCTrackLeftHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction - 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; WoodenRCTrackRightHalfBankedHelixUpLarge( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -7587,7 +7592,7 @@ static void WoodenRCTrackRightHalfBankedHelixDownLarge( trackSequence -= 7; direction = (direction + 1) & 3; } - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; WoodenRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -7656,9 +7661,10 @@ static void WoodenRCTrackLeftQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008ACB78 */ @@ -7726,9 +7732,10 @@ static void WoodenRCTrackRightQuarterTurn160DegUp( { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel( + session, direction, height, -8, TunnelType::SquareSlopeStart, +56, TunnelType::SquareSlopeEnd); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008ACB88 */ @@ -7766,10 +7773,10 @@ static void WoodenRCTrackBrakes( session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008ACC78 */ @@ -7788,7 +7795,7 @@ static void WoodenRCTrack25DegUpLeftBanked( session, direction, WoodenRCGetRailsColour(session).WithIndex(25115), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -7805,7 +7812,7 @@ static void WoodenRCTrack25DegUpLeftBanked( session, direction, WoodenRCGetRailsColour(session).WithIndex(25123), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -7822,7 +7829,7 @@ static void WoodenRCTrack25DegUpLeftBanked( session, direction, WoodenRCGetRailsColour(session).WithIndex(25124), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -7833,20 +7840,20 @@ static void WoodenRCTrack25DegUpLeftBanked( session, direction, WoodenRCGetRailsColour(session).WithIndex(25118), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ACC88 */ @@ -7865,7 +7872,7 @@ static void WoodenRCTrack25DegUpRightBanked( session, direction, WoodenRCGetRailsColour(session).WithIndex(25119), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -7882,7 +7889,7 @@ static void WoodenRCTrack25DegUpRightBanked( session, direction, WoodenRCGetRailsColour(session).WithIndex(25125), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -7899,7 +7906,7 @@ static void WoodenRCTrack25DegUpRightBanked( session, direction, WoodenRCGetRailsColour(session).WithIndex(25126), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -7910,20 +7917,20 @@ static void WoodenRCTrack25DegUpRightBanked( session, direction, WoodenRCGetRailsColour(session).WithIndex(25122), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AC878 */ @@ -7968,11 +7975,11 @@ static void WoodenRCTrackOnRidePhoto( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilOnridePhotoSmallPaint(session, direction, height + 16, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ACC98 */ @@ -7999,7 +8006,7 @@ static void WoodenRCTrackWaterSplash( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - const bool transparent = gConfigGeneral.TransparentWater || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); + const bool transparent = Config::Get().general.TransparentWater || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); const auto waterMask = ImageId(SPR_WATER_MASK).WithRemap(FilterPaletteID::PaletteWater).WithBlended(true); const auto waterOverlay = ImageId(transparent ? SPR_WATER_OVERLAY : SPR_RCT1_WATER_OVERLAY); @@ -8106,10 +8113,10 @@ static void WoodenRCTrackWaterSplash( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -8212,9 +8219,9 @@ static void WoodenRCTrackWaterSplash( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -8271,9 +8278,9 @@ static void WoodenRCTrackWaterSplash( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -8376,9 +8383,9 @@ static void WoodenRCTrackWaterSplash( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -8481,10 +8488,10 @@ static void WoodenRCTrackWaterSplash( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height + 16, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -8508,7 +8515,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25003), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8524,7 +8531,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25019), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8534,7 +8541,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25011), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8550,15 +8557,15 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25023), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8571,7 +8578,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25004), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8587,7 +8594,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25020), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8597,7 +8604,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25012), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8613,11 +8620,11 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25024), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8630,7 +8637,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25005), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8646,7 +8653,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25021), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8656,7 +8663,7 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25013), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8672,34 +8679,34 @@ static void WoodenRCTrackLeftEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25025), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -8750,7 +8757,7 @@ static void WoodenRCTrackLeftEighthToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -8780,7 +8787,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24995), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8790,7 +8797,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24983), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8806,7 +8813,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24999), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8816,15 +8823,15 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24991), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -8843,7 +8850,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24996), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8853,7 +8860,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24984), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8869,7 +8876,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25000), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8879,11 +8886,11 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24992), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -8902,7 +8909,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24997), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -8912,7 +8919,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24985), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -8928,7 +8935,7 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25001), { 0, 0, height }, { { 4, 4, height + 27 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -8938,34 +8945,34 @@ static void WoodenRCTrackRightEighthToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(24993), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9016,7 +9023,7 @@ static void WoodenRCTrackRightEighthToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9060,7 +9067,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25051), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9076,7 +9083,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25067), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9086,7 +9093,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25059), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9102,15 +9109,15 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25071), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9123,7 +9130,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25052), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9139,7 +9146,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25068), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9149,7 +9156,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25060), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9165,11 +9172,11 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25072), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9182,7 +9189,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25053), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9198,7 +9205,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25069), { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9208,7 +9215,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25061), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9224,34 +9231,34 @@ static void WoodenRCTrackLeftEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25073), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9302,7 +9309,7 @@ static void WoodenRCTrackLeftEighthBankToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9332,7 +9339,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25043), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9342,7 +9349,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25031), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9358,7 +9365,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25047), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9368,15 +9375,15 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25039), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -9395,7 +9402,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25044), { 0, 0, height }, { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9405,7 +9412,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25032), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9421,7 +9428,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25048), { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9431,11 +9438,11 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25040), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) @@ -9454,7 +9461,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25045), { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -9464,7 +9471,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25033), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -9480,7 +9487,7 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25049), { 0, 0, height }, { { 4, 4, height + 27 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -9490,34 +9497,34 @@ static void WoodenRCTrackRightEighthBankToDiag( session, direction, WoodenRCGetRailsColour(session).WithIndex(25041), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 4: switch (direction) @@ -9568,7 +9575,7 @@ static void WoodenRCTrackRightEighthBankToDiag( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -9598,7 +9605,7 @@ static void WoodenRCTrackDiagBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr SpriteBoundBox2 imageIds[4][NumOrthogonalDirections][2] = { + static constexpr SpriteBoundBox2 imageIds[4][kNumOrthogonalDirections][2] = { { // sequence 0 { @@ -9728,13 +9735,12 @@ static void WoodenRCTrackDiagBrakes( if (WoodenRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) { WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenRCDiagonalSupports[trackSequence][direction], height, - session.SupportColours); + session, kSupportType, WoodenRCDiagonalSupports[trackSequence][direction], height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template @@ -9742,7 +9748,7 @@ static void WoodenRCTrackDiagBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr SpriteBoundBox2 imageIds[2][4][NumOrthogonalDirections][2] = { + static constexpr SpriteBoundBox2 imageIds[2][4][kNumOrthogonalDirections][2] = { { { // sequence 0 @@ -9999,13 +10005,12 @@ static void WoodenRCTrackDiagBlockBrakes( if (WoodenRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) { WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenRCDiagonalSupports[trackSequence][direction], height, - session.SupportColours); + session, kSupportType, WoodenRCDiagonalSupports[trackSequence][direction], height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AC888 */ @@ -10045,8 +10050,7 @@ static void WoodenRCTrackDiagFlat( break; } } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; case 1: if (trackElement.HasChain()) @@ -10066,20 +10070,6 @@ static void WoodenRCTrackDiagFlat( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(24917), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - break; - case 2: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } @@ -10100,39 +10090,19 @@ static void WoodenRCTrackDiagFlat( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(24875), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); - break; - case 2: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + + WoodenASupportsPaintSetupRotated( + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + break; case 2: if (trackElement.HasChain()) { switch (direction) { - case 0: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - break; case 2: PaintAddImageAsParentRotated( session, direction, WoodenRCGetTrackColour(session).WithIndex(24049), @@ -10146,12 +10116,6 @@ static void WoodenRCTrackDiagFlat( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(24918), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } @@ -10159,14 +10123,6 @@ static void WoodenRCTrackDiagFlat( { switch (direction) { - case 0: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); - break; - case 1: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); - break; case 2: PaintAddImageAsParentRotated( session, direction, WoodenRCGetTrackColour(session).WithIndex(24007), @@ -10180,17 +10136,13 @@ static void WoodenRCTrackDiagFlat( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(24876), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); - break; - case 3: - WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + + WoodenASupportsPaintSetupRotated( + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + break; case 3: if (trackElement.HasChain()) @@ -10221,10 +10173,12 @@ static void WoodenRCTrackDiagFlat( break; } } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; } + + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AC8B8 */ @@ -10265,7 +10219,7 @@ static void WoodenRCTrackDiag25DegUp( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -10288,8 +10242,7 @@ static void WoodenRCTrackDiag25DegUp( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); } else { @@ -10311,11 +10264,10 @@ static void WoodenRCTrackDiag25DegUp( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -10360,11 +10312,10 @@ static void WoodenRCTrackDiag25DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -10396,7 +10347,7 @@ static void WoodenRCTrackDiag25DegUp( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -10422,7 +10373,7 @@ static void WoodenRCTrackDiag60DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -10443,10 +10394,9 @@ static void WoodenRCTrackDiag60DegUp( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -10468,11 +10418,10 @@ static void WoodenRCTrackDiag60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -10487,7 +10436,7 @@ static void WoodenRCTrackDiag60DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -10530,7 +10479,7 @@ static void WoodenRCTrackDiagFlatTo25DegUp( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -10551,19 +10500,19 @@ static void WoodenRCTrackDiagFlatTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24923), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } @@ -10585,24 +10534,24 @@ static void WoodenRCTrackDiagFlatTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24881), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -10611,11 +10560,11 @@ static void WoodenRCTrackDiagFlatTo25DegUp( { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -10631,11 +10580,11 @@ static void WoodenRCTrackDiagFlatTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24924), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } @@ -10645,11 +10594,11 @@ static void WoodenRCTrackDiagFlatTo25DegUp( { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -10665,16 +10614,16 @@ static void WoodenRCTrackDiagFlatTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24882), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -10706,7 +10655,7 @@ static void WoodenRCTrackDiagFlatTo25DegUp( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -10732,7 +10681,7 @@ static void WoodenRCTrackDiag25DegUpTo60DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -10753,10 +10702,9 @@ static void WoodenRCTrackDiag25DegUpTo60DegUp( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10778,11 +10726,10 @@ static void WoodenRCTrackDiag25DegUpTo60DegUp( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -10797,7 +10744,7 @@ static void WoodenRCTrackDiag25DegUpTo60DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10823,7 +10770,7 @@ static void WoodenRCTrackDiag60DegUpTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -10844,10 +10791,9 @@ static void WoodenRCTrackDiag60DegUpTo25DegUp( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -10868,10 +10814,9 @@ static void WoodenRCTrackDiag60DegUpTo25DegUp( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -10886,7 +10831,7 @@ static void WoodenRCTrackDiag60DegUpTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -10929,7 +10874,7 @@ static void WoodenRCTrackDiag25DegUpToFlat( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -10952,8 +10897,7 @@ static void WoodenRCTrackDiag25DegUpToFlat( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); } else { @@ -10975,11 +10919,10 @@ static void WoodenRCTrackDiag25DegUpToFlat( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -11024,11 +10967,10 @@ static void WoodenRCTrackDiag25DegUpToFlat( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -11060,7 +11002,7 @@ static void WoodenRCTrackDiag25DegUpToFlat( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -11103,7 +11045,7 @@ static void WoodenRCTrackDiag25DegDown( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: if (trackElement.HasChain()) @@ -11126,8 +11068,7 @@ static void WoodenRCTrackDiag25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); } else { @@ -11149,11 +11090,10 @@ static void WoodenRCTrackDiag25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: if (trackElement.HasChain()) @@ -11198,11 +11138,10 @@ static void WoodenRCTrackDiag25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: if (trackElement.HasChain()) @@ -11234,7 +11173,7 @@ static void WoodenRCTrackDiag25DegDown( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -11260,7 +11199,7 @@ static void WoodenRCTrackDiag60DegDown( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: switch (direction) @@ -11281,10 +11220,9 @@ static void WoodenRCTrackDiag60DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: switch (direction) @@ -11305,10 +11243,9 @@ static void WoodenRCTrackDiag60DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: switch (direction) @@ -11323,7 +11260,7 @@ static void WoodenRCTrackDiag60DegDown( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); break; } } @@ -11387,8 +11324,7 @@ static void WoodenRCTrackDiagFlatTo25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); } else { @@ -11410,8 +11346,7 @@ static void WoodenRCTrackDiagFlatTo25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); } break; case 2: @@ -11457,8 +11392,7 @@ static void WoodenRCTrackDiagFlatTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); break; case 3: @@ -11494,7 +11428,7 @@ static void WoodenRCTrackDiagFlatTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AC928 */ @@ -11518,7 +11452,7 @@ static void WoodenRCTrackDiag25DegDownTo60DegDown( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -11539,10 +11473,9 @@ static void WoodenRCTrackDiag25DegDownTo60DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11563,10 +11496,9 @@ static void WoodenRCTrackDiag25DegDownTo60DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -11581,7 +11513,7 @@ static void WoodenRCTrackDiag25DegDownTo60DegDown( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -11607,7 +11539,7 @@ static void WoodenRCTrackDiag60DegDownTo25DegDown( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -11628,10 +11560,9 @@ static void WoodenRCTrackDiag60DegDownTo25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -11652,10 +11583,9 @@ static void WoodenRCTrackDiag60DegDownTo25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -11670,7 +11600,7 @@ static void WoodenRCTrackDiag60DegDownTo25DegDown( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -11713,7 +11643,7 @@ static void WoodenRCTrackDiag25DegDownToFlat( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: if (trackElement.HasChain()) @@ -11734,19 +11664,19 @@ static void WoodenRCTrackDiag25DegDownToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(24924), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } @@ -11768,24 +11698,24 @@ static void WoodenRCTrackDiag25DegDownToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(24882), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: if (trackElement.HasChain()) @@ -11794,11 +11724,11 @@ static void WoodenRCTrackDiag25DegDownToFlat( { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11814,11 +11744,11 @@ static void WoodenRCTrackDiag25DegDownToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(24923), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } @@ -11828,11 +11758,11 @@ static void WoodenRCTrackDiag25DegDownToFlat( { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11848,16 +11778,16 @@ static void WoodenRCTrackDiag25DegDownToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(24881), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: if (trackElement.HasChain()) @@ -11889,7 +11819,7 @@ static void WoodenRCTrackDiag25DegDownToFlat( } } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -11915,7 +11845,7 @@ static void WoodenRCTrackDiagFlatToLeftBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -11934,34 +11864,34 @@ static void WoodenRCTrackDiagFlatToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24947), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -11977,15 +11907,15 @@ static void WoodenRCTrackDiagFlatToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24948), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -12000,7 +11930,7 @@ static void WoodenRCTrackDiagFlatToLeftBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -12026,7 +11956,7 @@ static void WoodenRCTrackDiagFlatToRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -12045,34 +11975,34 @@ static void WoodenRCTrackDiagFlatToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24953), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -12088,15 +12018,15 @@ static void WoodenRCTrackDiagFlatToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24954), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -12111,7 +12041,7 @@ static void WoodenRCTrackDiagFlatToRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -12137,7 +12067,7 @@ static void WoodenRCTrackDiagLeftBankToFlat( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -12156,34 +12086,34 @@ static void WoodenRCTrackDiagLeftBankToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(24954), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -12199,15 +12129,15 @@ static void WoodenRCTrackDiagLeftBankToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(24953), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -12222,7 +12152,7 @@ static void WoodenRCTrackDiagLeftBankToFlat( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -12248,7 +12178,7 @@ static void WoodenRCTrackDiagRightBankToFlat( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -12267,34 +12197,34 @@ static void WoodenRCTrackDiagRightBankToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(24948), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -12310,15 +12240,15 @@ static void WoodenRCTrackDiagRightBankToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(24947), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -12333,7 +12263,7 @@ static void WoodenRCTrackDiagRightBankToFlat( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -12359,7 +12289,7 @@ static void WoodenRCTrackDiagLeftBankTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12378,34 +12308,34 @@ static void WoodenRCTrackDiagLeftBankTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24971), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -12421,15 +12351,15 @@ static void WoodenRCTrackDiagLeftBankTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24972), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -12444,7 +12374,7 @@ static void WoodenRCTrackDiagLeftBankTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12470,7 +12400,7 @@ static void WoodenRCTrackDiagRightBankTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12489,34 +12419,34 @@ static void WoodenRCTrackDiagRightBankTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24977), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -12532,15 +12462,15 @@ static void WoodenRCTrackDiagRightBankTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24978), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -12555,7 +12485,7 @@ static void WoodenRCTrackDiagRightBankTo25DegUp( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -12581,7 +12511,7 @@ static void WoodenRCTrackDiag25DegUpToLeftBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12602,10 +12532,9 @@ static void WoodenRCTrackDiag25DegUpToLeftBank( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12626,10 +12555,9 @@ static void WoodenRCTrackDiag25DegUpToLeftBank( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -12644,7 +12572,7 @@ static void WoodenRCTrackDiag25DegUpToLeftBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12670,7 +12598,7 @@ static void WoodenRCTrackDiag25DegUpToRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: switch (direction) @@ -12691,10 +12619,9 @@ static void WoodenRCTrackDiag25DegUpToRightBank( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: switch (direction) @@ -12715,10 +12642,9 @@ static void WoodenRCTrackDiag25DegUpToRightBank( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -12733,7 +12659,7 @@ static void WoodenRCTrackDiag25DegUpToRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; } } @@ -12778,8 +12704,7 @@ static void WoodenRCTrackDiagLeftBankTo25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); break; case 2: switch (direction) @@ -12801,8 +12726,7 @@ static void WoodenRCTrackDiagLeftBankTo25DegDown( } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); break; case 3: @@ -12821,7 +12745,7 @@ static void WoodenRCTrackDiagLeftBankTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ACA88 */ @@ -12864,8 +12788,7 @@ static void WoodenRCTrackDiagRightBankTo25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height + 16, session.SupportColours); break; case 2: switch (direction) @@ -12886,8 +12809,7 @@ static void WoodenRCTrackDiagRightBankTo25DegDown( break; } WoodenBSupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height + 16, - session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height + 16, session.SupportColours); break; case 3: switch (direction) @@ -12905,7 +12827,7 @@ static void WoodenRCTrackDiagRightBankTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ACA98 */ @@ -12929,7 +12851,7 @@ static void WoodenRCTrackDiag25DegDownToLeftBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -12948,34 +12870,34 @@ static void WoodenRCTrackDiag25DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24978), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -12991,15 +12913,15 @@ static void WoodenRCTrackDiag25DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24977), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13014,7 +12936,7 @@ static void WoodenRCTrackDiag25DegDownToLeftBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13040,7 +12962,7 @@ static void WoodenRCTrackDiag25DegDownToRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -13059,34 +12981,34 @@ static void WoodenRCTrackDiag25DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24972), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13102,15 +13024,15 @@ static void WoodenRCTrackDiag25DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24971), { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13125,7 +13047,7 @@ static void WoodenRCTrackDiag25DegDownToRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -13151,7 +13073,7 @@ static void WoodenRCTrackDiagLeftBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13170,34 +13092,34 @@ static void WoodenRCTrackDiagLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24941), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13213,15 +13135,15 @@ static void WoodenRCTrackDiagLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24942), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -13236,7 +13158,7 @@ static void WoodenRCTrackDiagLeftBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -13262,7 +13184,7 @@ static void WoodenRCTrackDiagRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: switch (direction) @@ -13281,34 +13203,34 @@ static void WoodenRCTrackDiagRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24942), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: switch (direction) { case 0: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13324,15 +13246,15 @@ static void WoodenRCTrackDiagRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24941), { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: switch (direction) @@ -13347,7 +13269,7 @@ static void WoodenRCTrackDiagRightBank( break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; } } @@ -13371,7 +13293,7 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24824), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13387,7 +13309,7 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24837), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13397,7 +13319,7 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24828), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13413,18 +13335,18 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24835), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -13435,7 +13357,7 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13448,7 +13370,7 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24823), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13464,7 +13386,7 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24836), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13480,7 +13402,7 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24838), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13496,20 +13418,20 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24834), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -13539,7 +13461,7 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24829), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13549,7 +13471,7 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24815), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13565,7 +13487,7 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24832), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13575,18 +13497,18 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24819), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -13597,7 +13519,7 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13616,7 +13538,7 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24830), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13632,7 +13554,7 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24831), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13648,7 +13570,7 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24833), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13658,20 +13580,20 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24820), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -13701,7 +13623,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24831), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13717,7 +13639,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24833), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13727,7 +13649,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24820), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13743,18 +13665,18 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24830), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -13765,7 +13687,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13778,7 +13700,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24815), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13794,7 +13716,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24832), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13804,7 +13726,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24819), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13820,20 +13742,20 @@ static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24829), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -13863,7 +13785,7 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24834), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13873,7 +13795,7 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24823), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13889,7 +13811,7 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24836), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13905,18 +13827,18 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24838), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -13927,7 +13849,7 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -13946,7 +13868,7 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24835), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -13956,7 +13878,7 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24824), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -13972,7 +13894,7 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24837), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -13982,20 +13904,20 @@ static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( session, direction, WoodenRCGetRailsColour(session).WithIndex(24828), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -14012,10 +13934,10 @@ static void WoodenRCTrackBlockBrakes( session, direction, brakeImg, _wooden_rc_block_brakes_image_ids[direction][2], { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008ACCB8 */ @@ -14037,7 +13959,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24798), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14053,7 +13975,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24811), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14063,7 +13985,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24802), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14079,18 +14001,18 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24809), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -14101,7 +14023,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -14114,7 +14036,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24797), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14130,7 +14052,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24810), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14146,7 +14068,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24812), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14162,20 +14084,20 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24808), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -14205,7 +14127,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24803), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14215,7 +14137,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24789), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14231,7 +14153,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24806), { 0, 6, height }, { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14241,18 +14163,18 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24793), { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: PaintUtilSetSegmentSupportHeight( @@ -14263,7 +14185,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: switch (direction) @@ -14282,7 +14204,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24804), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14298,7 +14220,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24805), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14314,7 +14236,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24807), { 6, 0, height }, { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14324,20 +14246,20 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(24794), { 6, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -14348,7 +14270,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenRCTrackRightBankedQuarterTurn325DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -14359,7 +14281,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -14383,8 +14305,8 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25187), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( @@ -14400,8 +14322,8 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25218), { 0, 0, height }, { { 0, 2, height + 67 }, { 32, 27, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( @@ -14411,8 +14333,8 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25197), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( @@ -14422,16 +14344,16 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25202), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -14440,7 +14362,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -14453,7 +14375,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25188), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14469,7 +14391,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25219), { 0, 0, height }, { { 0, 0, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14479,7 +14401,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25198), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14495,7 +14417,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25225), { 0, 0, height }, { { 0, 16, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14506,7 +14428,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -14519,7 +14441,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25189), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14535,7 +14457,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25220), { 0, 0, height }, { { 16, 16, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14545,7 +14467,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25199), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14561,7 +14483,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25226), { 0, 0, height }, { { 0, 0, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14573,7 +14495,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -14582,7 +14504,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -14595,7 +14517,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25190), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14611,7 +14533,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25221), { 0, 0, height }, { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14627,7 +14549,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25223), { 0, 0, height }, { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14643,7 +14565,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25227), { 0, 0, height }, { { 16, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14654,7 +14576,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -14711,19 +14633,19 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionPrev(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -14747,8 +14669,8 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25167), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 1: PaintAddImageAsParentRotated( @@ -14758,8 +14680,8 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25172), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 2: PaintAddImageAsParentRotated( @@ -14775,8 +14697,8 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25213), { 0, 0, height }, { { 0, 2, height + 67 }, { 32, 27, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; case 3: PaintAddImageAsParentRotated( @@ -14786,16 +14708,16 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25182), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: PaintUtilSetSegmentSupportHeight( @@ -14803,7 +14725,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -14822,7 +14744,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25207), { 0, 0, height }, { { 0, 16, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14832,7 +14754,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25173), { 0, 0, height }, { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14848,7 +14770,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25214), { 0, 0, height }, { { 0, 0, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14858,7 +14780,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25183), { 0, 0, height }, { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14869,7 +14791,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -14888,7 +14810,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25208), { 0, 0, height }, { { 0, 0, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14898,7 +14820,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25174), { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14914,7 +14836,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25215), { 0, 0, height }, { { 16, 16, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -14924,7 +14846,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25184), { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -14936,7 +14858,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 4: PaintUtilSetSegmentSupportHeight( @@ -14944,7 +14866,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: switch (direction) @@ -14963,7 +14885,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25209), { 0, 0, height }, { { 16, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, height, session.SupportColours); break; case 1: PaintAddImageAsParentRotated( @@ -14979,7 +14901,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25211), { 0, 0, height }, { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, height, session.SupportColours); break; case 2: PaintAddImageAsParentRotated( @@ -14995,7 +14917,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25216), { 0, 0, height }, { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, height, session.SupportColours); break; case 3: PaintAddImageAsParentRotated( @@ -15005,7 +14927,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25185), { 0, 0, height }, { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, height, session.SupportColours); break; } PaintUtilSetSegmentSupportHeight( @@ -15016,7 +14938,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: switch (direction) @@ -15073,19 +14995,19 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, DirectionNext(direction), height, - session.SupportColours, WoodenSupportTransitionType::Up25Deg); + session, kSupportType, WoodenSupportSubType::NeSw, DirectionNext(direction), height, session.SupportColours, + WoodenSupportTransitionType::Up25Deg); switch (direction) { case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -15096,7 +15018,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; WoodenRCTrackRightBankedQuarterTurn525DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } @@ -15107,7 +15029,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -15128,7 +15050,7 @@ static void WoodenRCTrack25DegUpToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25127), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -15139,7 +15061,7 @@ static void WoodenRCTrack25DegUpToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25128), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -15150,7 +15072,7 @@ static void WoodenRCTrack25DegUpToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25129), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -15161,20 +15083,20 @@ static void WoodenRCTrack25DegUpToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25130), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ACD08 */ @@ -15193,7 +15115,7 @@ static void WoodenRCTrack25DegUpToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25131), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -15204,7 +15126,7 @@ static void WoodenRCTrack25DegUpToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25132), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -15215,7 +15137,7 @@ static void WoodenRCTrack25DegUpToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25133), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -15226,20 +15148,20 @@ static void WoodenRCTrack25DegUpToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25134), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ACD18 */ @@ -15258,7 +15180,7 @@ static void WoodenRCTrackLeftBanked25DegUpTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25135), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -15269,7 +15191,7 @@ static void WoodenRCTrackLeftBanked25DegUpTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25136), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -15280,7 +15202,7 @@ static void WoodenRCTrackLeftBanked25DegUpTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25137), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -15291,20 +15213,20 @@ static void WoodenRCTrackLeftBanked25DegUpTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25138), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ACD28 */ @@ -15323,7 +15245,7 @@ static void WoodenRCTrackRightBanked25DegUpTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25139), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 1: @@ -15334,7 +15256,7 @@ static void WoodenRCTrackRightBanked25DegUpTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25140), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 2: @@ -15345,7 +15267,7 @@ static void WoodenRCTrackRightBanked25DegUpTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25141), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; case 3: @@ -15356,20 +15278,20 @@ static void WoodenRCTrackRightBanked25DegUpTo25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25142), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008ACD38 */ @@ -15426,7 +15348,7 @@ static void WoodenRCTrackLeftBankedFlatToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25143), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 1: @@ -15443,7 +15365,7 @@ static void WoodenRCTrackLeftBankedFlatToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25159), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 2: @@ -15460,7 +15382,7 @@ static void WoodenRCTrackLeftBankedFlatToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25160), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 3: @@ -15471,20 +15393,20 @@ static void WoodenRCTrackLeftBankedFlatToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25146), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ACD88 */ @@ -15503,7 +15425,7 @@ static void WoodenRCTrackRightBankedFlatToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25147), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 1: @@ -15520,7 +15442,7 @@ static void WoodenRCTrackRightBankedFlatToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25161), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 2: @@ -15537,7 +15459,7 @@ static void WoodenRCTrackRightBankedFlatToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25162), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 3: @@ -15548,20 +15470,20 @@ static void WoodenRCTrackRightBankedFlatToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25150), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ACD98 */ @@ -15580,7 +15502,7 @@ static void WoodenRCTrackLeftBanked25DegUpToLeftBankedFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25151), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 1: @@ -15597,7 +15519,7 @@ static void WoodenRCTrackLeftBanked25DegUpToLeftBankedFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25163), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 2: @@ -15614,7 +15536,7 @@ static void WoodenRCTrackLeftBanked25DegUpToLeftBankedFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25164), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 3: @@ -15625,20 +15547,20 @@ static void WoodenRCTrackLeftBanked25DegUpToLeftBankedFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25154), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008ACDA8 */ @@ -15657,7 +15579,7 @@ static void WoodenRCTrackRightBanked25DegUpToRightBankedFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25155), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 1: @@ -15674,7 +15596,7 @@ static void WoodenRCTrackRightBanked25DegUpToRightBankedFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25165), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 2: @@ -15691,7 +15613,7 @@ static void WoodenRCTrackRightBanked25DegUpToRightBankedFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25166), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 3: @@ -15702,20 +15624,20 @@ static void WoodenRCTrackRightBanked25DegUpToRightBankedFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25158), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008ACDB8 */ @@ -15774,7 +15696,7 @@ static void WoodenRCTrackFlatToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25091), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 1: @@ -15791,7 +15713,7 @@ static void WoodenRCTrackFlatToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25107), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 2: @@ -15808,7 +15730,7 @@ static void WoodenRCTrackFlatToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25108), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 3: @@ -15819,20 +15741,20 @@ static void WoodenRCTrackFlatToLeftBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25094), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ACBC8 */ @@ -15851,7 +15773,7 @@ static void WoodenRCTrackFlatToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25095), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 1: @@ -15868,7 +15790,7 @@ static void WoodenRCTrackFlatToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25109), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 2: @@ -15885,7 +15807,7 @@ static void WoodenRCTrackFlatToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25110), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; case 3: @@ -15896,20 +15818,20 @@ static void WoodenRCTrackFlatToRightBanked25DegUp( session, direction, WoodenRCGetRailsColour(session).WithIndex(25098), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008ACBD8 */ @@ -15928,7 +15850,7 @@ static void WoodenRCTrackLeftBanked25DegUpToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25099), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 1: @@ -15945,7 +15867,7 @@ static void WoodenRCTrackLeftBanked25DegUpToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25111), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 2: @@ -15962,7 +15884,7 @@ static void WoodenRCTrackLeftBanked25DegUpToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25112), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 3: @@ -15973,20 +15895,20 @@ static void WoodenRCTrackLeftBanked25DegUpToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25102), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008ACBE8 */ @@ -16005,7 +15927,7 @@ static void WoodenRCTrackRightBanked25DegUpToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25103), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 1: @@ -16022,7 +15944,7 @@ static void WoodenRCTrackRightBanked25DegUpToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25113), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 2: @@ -16039,7 +15961,7 @@ static void WoodenRCTrackRightBanked25DegUpToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25114), { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; case 3: @@ -16050,20 +15972,20 @@ static void WoodenRCTrackRightBanked25DegUpToFlat( session, direction, WoodenRCGetRailsColour(session).WithIndex(25106), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); break; } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008ACBF8 */ @@ -16124,10 +16046,10 @@ static void WoodenRCTrackBooster( session, direction, imageIds[direction], railsImageIds[direction], { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } template TRACK_PAINT_FUNCTION GetTrackPaintFunctionWoodenAndClassicWoodenRC(int32_t trackType) diff --git a/src/openrct2/ride/coaster/WoodenRollerCoaster.h b/src/openrct2/ride/coaster/WoodenRollerCoaster.h index 614f084545..a30353cf87 100644 --- a/src/openrct2/ride/coaster/WoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/WoodenRollerCoaster.h @@ -13,6 +13,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../world/Location.hpp" #include "../TrackPaint.h" @@ -27,7 +29,7 @@ struct SpriteBoundBox2 }; // Magic number 4 refers to the number of track blocks in a diagonal track element -static constexpr const WoodenSupportSubType WoodenRCDiagonalSupports[4][NumOrthogonalDirections] = { +static constexpr const WoodenSupportSubType WoodenRCDiagonalSupports[4][kNumOrthogonalDirections] = { { WoodenSupportSubType::Null, WoodenSupportSubType::Null, WoodenSupportSubType::Null, WoodenSupportSubType::Null }, // sequence 0 { WoodenSupportSubType::Corner0, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner2, diff --git a/src/openrct2/ride/coaster/WoodenWildMouse.cpp b/src/openrct2/ride/coaster/WoodenWildMouse.cpp index bda02109a2..ce63671ecd 100644 --- a/src/openrct2/ride/coaster/WoodenWildMouse.cpp +++ b/src/openrct2/ride/coaster/WoodenWildMouse.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + enum { SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE = 28535, @@ -135,8 +140,8 @@ static void WoodenWildMouseTrackFlat( auto imageId = session.TrackColours.WithIndex(imageIds[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -145,12 +150,8 @@ static void WoodenWildMouseTrackFlat( PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), height, 0x20); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void WoodenWildMouseTrackStation( @@ -171,11 +172,11 @@ static void WoodenWildMouseTrackStation( session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 6, height }, { { 0, 0, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A5474 */ @@ -203,20 +204,20 @@ static void WoodenWildMouseTrack25DegUp( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008A5484 */ @@ -252,20 +253,20 @@ static void WoodenWildMouseTrack60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x008A5494 */ @@ -293,20 +294,20 @@ static void WoodenWildMouseTrackFlatTo25DegUp( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008A54A4 */ @@ -346,20 +347,20 @@ static void WoodenWildMouseTrack25DegUpTo60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void WoodenWildMouseTrack60DegTo25DegUp( @@ -398,20 +399,20 @@ static void WoodenWildMouseTrack60DegTo25DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A54C4 */ @@ -439,20 +440,20 @@ static void WoodenWildMouseTrack25DegUpToFlat( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008A54D4 */ @@ -531,14 +532,14 @@ static void WoodenWildMouseTrackRightQuarterTurn3( }; TrackPaintUtilRightQuarterTurn3TilesPaint4(session, height, direction, trackSequence, session.TrackColours, imageIds); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::StandardFlat); switch (trackSequence) { case 0: case 3: WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); break; } @@ -557,14 +558,14 @@ static void WoodenWildMouseTrackRightQuarterTurn3( break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void WoodenWildMouseTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; WoodenWildMouseTrackRightQuarterTurn3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -596,10 +597,11 @@ static void WoodenWildMouseTrackLeftQuarterTurn1( break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); + session, kSupportType, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, 0, TunnelType::StandardFlat, 0, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008A55D4 */ @@ -646,20 +648,20 @@ static void WoodenWildMouseTrackFlatTo60DegUp( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x008A55F4 */ @@ -698,20 +700,20 @@ static void WoodenWildMouseTrack60DegUpToFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x008A5604 */ diff --git a/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h b/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h index 5b7507a27b..7bc46aa78b 100644 --- a/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h +++ b/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h @@ -28,7 +28,10 @@ constexpr RideTypeDescriptor AirPoweredVerticalCoasterRTD = .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), .DefaultMode = RideMode::PoweredLaunchPasstrough, - .OperatingSettings = { 30, 50, 30, 40, 40, 0, 13 }, + .OperatingSettings = { 30, 50 }, + .TrackSpeedSettings = { 60, 60 }, + .BoosterSettings = { 40, 40, 13 }, + .LegacyBoosterSettings = { 40, 40 }, .Naming = { STR_RIDE_NAME_AIR_POWERED_VERTICAL_COASTER, STR_RIDE_DESCRIPTION_AIR_POWERED_VERTICAL_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_AIR_POWERED_VERTICAL_COASTER), diff --git a/src/openrct2/ride/coaster/meta/AlpineCoaster.h b/src/openrct2/ride/coaster/meta/AlpineCoaster.h index ba4c9f65a2..cbb2cf71f7 100644 --- a/src/openrct2/ride/coaster/meta/AlpineCoaster.h +++ b/src/openrct2/ride/coaster/meta/AlpineCoaster.h @@ -26,12 +26,12 @@ constexpr RideTypeDescriptor AlpineCoasterRTD = .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_CHECK_FOR_STALLING | RIDE_TYPE_FLAG_HAS_TRACK - | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT + | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_ALLOW_MORE_VEHICLES_THAN_STATION_FITS | RIDE_TYPE_FLAG_UP_INCLINE_REQUIRES_LIFT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, + .TrackSpeedSettings = { 10, 10 }, .Naming = { STR_RIDE_NAME_ALPINE_COASTER, STR_RIDE_DESCRIPTION_ALPINE_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_ALPINE_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/BobsleighCoaster.h b/src/openrct2/ride/coaster/meta/BobsleighCoaster.h index e76452bca8..87214d0be7 100644 --- a/src/openrct2/ride/coaster/meta/BobsleighCoaster.h +++ b/src/openrct2/ride/coaster/meta/BobsleighCoaster.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor BobsleighCoasterRTD = RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_BOBSLEIGH_COASTER, STR_RIDE_DESCRIPTION_BOBSLEIGH_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_BOBSLEIGH_COASTER), diff --git a/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h b/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h index a5ed68829b..3b7c0ed675 100644 --- a/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h @@ -30,7 +30,8 @@ constexpr RideTypeDescriptor ClassicMiniRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 17, 16, -1 }, + .BoosterSettings = { 17, 16 }, + .LegacyBoosterSettings = { 17, 16, 1 }, .Naming = { STR_RIDE_NAME_CLASSIC_MINI_ROLLER_COASTER, STR_RIDE_DESCRIPTION_CLASSIC_MINI_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_CLASSIC_MINI_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/ClassicStandUpRollerCoaster.h b/src/openrct2/ride/coaster/meta/ClassicStandUpRollerCoaster.h index 694fd7ae1b..58defc7f57 100644 --- a/src/openrct2/ride/coaster/meta/ClassicStandUpRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ClassicStandUpRollerCoaster.h @@ -31,7 +31,7 @@ constexpr RideTypeDescriptor ClassicStandUpRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 7, 27, 0, 0, 0, 0 }, + .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 }, .EnumName = nameof(RIDE_TYPE_CLASSIC_STAND_UP_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h b/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h index a2551d411a..97f6fc1930 100644 --- a/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h @@ -31,7 +31,8 @@ constexpr RideTypeDescriptor ClassicWoodenRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 68, 0 }, + .BoosterSettings = { 0, 68 }, + .LegacyBoosterSettings = { 0, 68 }, .Naming = { STR_RIDE_NAME_CLASSIC_WOODEN_ROLLER_COASTER, STR_RIDE_DESCRIPTION_CLASSIC_WOODEN_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_CLASSIC_WOODEN_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h b/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h index 481705ef07..2b69741171 100644 --- a/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h +++ b/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h @@ -30,7 +30,7 @@ constexpr RideTypeDescriptor CompactInvertedCoasterRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_IS_SUSPENDED, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 7, 27, 0, 0, 0, 0 }, + .OperatingSettings = { 7, 27 }, .Naming = { STR_RIDE_NAME_COMPACT_INVERTED_COASTER, STR_RIDE_DESCRIPTION_COMPACT_INVERTED_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_COMPACT_INVERTED_COASTER), diff --git a/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h b/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h index 875c550128..4e4a3a67a4 100644 --- a/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h @@ -13,6 +13,7 @@ #include "../../RideData.h" #include "../../ShopItem.h" #include "../../Track.h" +#include "../CorkscrewRollerCoaster.hpp" // clang-format off constexpr RideTypeDescriptor CorkscrewRollerCoasterRTD = @@ -20,7 +21,7 @@ constexpr RideTypeDescriptor CorkscrewRollerCoasterRTD = .Category = RIDE_CATEGORY_ROLLERCOASTER, .StartTrackPiece = TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ - .Drawer = GetTrackPaintFunctionCorkscrewRC, + .Drawer = GetTrackPaintFunctionCorkscrewRC, .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES,TRACK_BOOSTER, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, .ExtraTrackPieces = {TRACK_TWIST}, }), @@ -31,7 +32,9 @@ constexpr RideTypeDescriptor CorkscrewRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch, RideMode::ReverseInclineLaunchedShuttle), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_CORKSCREW_ROLLER_COASTER, STR_RIDE_DESCRIPTION_CORKSCREW_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_CORKSCREW_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h b/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h index c8d1ca37cf..497dbc1ebe 100644 --- a/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h @@ -36,7 +36,9 @@ constexpr RideTypeDescriptor FlyingRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_START_CONSTRUCTION_INVERTED, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_FLYING_ROLLER_COASTER, STR_RIDE_DESCRIPTION_FLYING_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_FLYING_ROLLER_COASTER), @@ -110,7 +112,9 @@ constexpr RideTypeDescriptor FlyingRollerCoasterAltRTD = RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAG_START_CONSTRUCTION_INVERTED, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_3A, STR_RIDE_DESCRIPTION_UNKNOWN }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_FLYING_ROLLER_COASTER_ALT), diff --git a/src/openrct2/ride/coaster/meta/GigaCoaster.h b/src/openrct2/ride/coaster/meta/GigaCoaster.h index 672f131bd1..cabf02afba 100644 --- a/src/openrct2/ride/coaster/meta/GigaCoaster.h +++ b/src/openrct2/ride/coaster/meta/GigaCoaster.h @@ -31,7 +31,10 @@ constexpr RideTypeDescriptor GigaCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 17, 68, 1 }, + .OperatingSettings = { 10, 27 }, + .TrackSpeedSettings = { 60, 60 }, + .BoosterSettings = { 17, 68 }, + .LegacyBoosterSettings = { 17, 68, 4 }, .Naming = { STR_RIDE_NAME_GIGA_COASTER, STR_RIDE_DESCRIPTION_GIGA_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_GIGA_COASTER), diff --git a/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h b/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h index 0eb9946b27..725f416cad 100644 --- a/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h +++ b/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h @@ -30,7 +30,9 @@ constexpr RideTypeDescriptor HeartlineTwisterCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_HEARTLINE_TWISTER_COASTER, STR_RIDE_DESCRIPTION_HEARTLINE_TWISTER_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_HEARTLINE_TWISTER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/HybridCoaster.h b/src/openrct2/ride/coaster/meta/HybridCoaster.h index a447dca720..585923b19c 100644 --- a/src/openrct2/ride/coaster/meta/HybridCoaster.h +++ b/src/openrct2/ride/coaster/meta/HybridCoaster.h @@ -28,7 +28,8 @@ constexpr RideTypeDescriptor HybridCoasterRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 30, 15, 52, 0 }, + .BoosterSettings = { 15, 52 }, + .LegacyBoosterSettings = { 15, 52 }, .Naming = { STR_RIDE_NAME_HYBRID_COASTER, STR_RIDE_DESCRIPTION_HYBRID_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_HYBRID_COASTER), diff --git a/src/openrct2/ride/coaster/meta/HyperTwister.h b/src/openrct2/ride/coaster/meta/HyperTwister.h index c95241405c..5d0e251f36 100644 --- a/src/openrct2/ride/coaster/meta/HyperTwister.h +++ b/src/openrct2/ride/coaster/meta/HyperTwister.h @@ -32,7 +32,10 @@ constexpr RideTypeDescriptor HyperTwisterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 17, 68, 0 }, + .OperatingSettings = { 10, 27 }, + .TrackSpeedSettings = { 60, 60 }, + .BoosterSettings = { 17, 68 }, + .LegacyBoosterSettings = { 17, 68 }, .Naming = { STR_RIDE_NAME_HYPER_TWISTER, STR_RIDE_DESCRIPTION_HYPER_TWISTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station}, .EnumName = nameof(RIDE_TYPE_HYPER_TWISTER), diff --git a/src/openrct2/ride/coaster/meta/Hypercoaster.h b/src/openrct2/ride/coaster/meta/Hypercoaster.h index 056f8ae89c..b31fdad773 100644 --- a/src/openrct2/ride/coaster/meta/Hypercoaster.h +++ b/src/openrct2/ride/coaster/meta/Hypercoaster.h @@ -12,6 +12,7 @@ #include "../../RideData.h" #include "../../ShopItem.h" #include "../../Track.h" +#include "../CorkscrewRollerCoaster.hpp" // clang-format off constexpr RideTypeDescriptor HypercoasterRTD = @@ -19,7 +20,7 @@ constexpr RideTypeDescriptor HypercoasterRTD = .Category = RIDE_CATEGORY_ROLLERCOASTER, .StartTrackPiece = TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ - .Drawer = GetTrackPaintFunctionCorkscrewRC, + .Drawer = GetTrackPaintFunctionCorkscrewRC, .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, .ExtraTrackPieces = {TRACK_VERTICAL_LOOP, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BOOSTER}, }), @@ -30,7 +31,10 @@ constexpr RideTypeDescriptor HypercoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch, RideMode::ReverseInclineLaunchedShuttle), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .TrackSpeedSettings = { 60, 60 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_HYPERCOASTER, STR_RIDE_DESCRIPTION_HYPERCOASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_HYPERCOASTER), diff --git a/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h b/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h index ce99f723ce..ab95f29140 100644 --- a/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor InvertedHairpinCoasterRTD = RIDE_TYPE_FLAG_IS_SUSPENDED, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_INVERTED_HAIRPIN_COASTER, STR_RIDE_DESCRIPTION_INVERTED_HAIRPIN_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_INVERTED_HAIRPIN_COASTER), diff --git a/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h b/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h index 386f5769c7..8dfccab133 100644 --- a/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h @@ -31,7 +31,9 @@ constexpr RideTypeDescriptor InvertedImpulseCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), .DefaultMode = RideMode::PoweredLaunchPasstrough, - .OperatingSettings = { 10, 33, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 33 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_INVERTED_IMPULSE_COASTER, STR_RIDE_DESCRIPTION_INVERTED_IMPULSE_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_INVERTED_IMPULSE_COASTER), diff --git a/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h b/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h index 9164a8d4ec..ee8baaa6f2 100644 --- a/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h @@ -31,7 +31,9 @@ constexpr RideTypeDescriptor InvertedRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 7, 27, 0, 0, 38, 0 }, + .OperatingSettings = { 7, 27 }, + .BoosterSettings = { 0, 38 }, + .LegacyBoosterSettings = { 0, 38 }, .Naming = { STR_RIDE_NAME_INVERTED_ROLLER_COASTER, STR_RIDE_DESCRIPTION_INVERTED_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_INVERTED_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h b/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h index 7dd098e0b4..bcb95e2b38 100644 --- a/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h @@ -31,7 +31,9 @@ constexpr RideTypeDescriptor JuniorRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 17, 16, -1 }, + .TrackSpeedSettings = { 30, 15 }, + .BoosterSettings = { 17, 16 }, + .LegacyBoosterSettings = { 17, 16, 1 }, .Naming = { STR_RIDE_NAME_JUNIOR_ROLLER_COASTER, STR_RIDE_DESCRIPTION_JUNIOR_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_JUNIOR_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h b/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h index b33782a0b1..ddb8717fe5 100644 --- a/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h @@ -31,7 +31,9 @@ constexpr RideTypeDescriptor LIMLaunchedRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch, RideMode::PoweredLaunchBlockSectioned), .DefaultMode = RideMode::PoweredLaunchPasstrough, - .OperatingSettings = { 10, 31, 26, 18, 52, 0 }, + .OperatingSettings = { 10, 31 }, + .BoosterSettings = { 18, 52 }, + .LegacyBoosterSettings = { 18, 52 }, .Naming = { STR_RIDE_NAME_LIM_LAUNCHED_ROLLER_COASTER, STR_RIDE_DESCRIPTION_LIM_LAUNCHED_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_LIM_LAUNCHED_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h b/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h index b086209007..c55c40854b 100644 --- a/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h @@ -13,6 +13,7 @@ #include "../../RideData.h" #include "../../ShopItem.h" #include "../../Track.h" +#include "../CorkscrewRollerCoaster.hpp" // clang-format off constexpr RideTypeDescriptor LayDownRollerCoasterRTD = @@ -21,7 +22,7 @@ constexpr RideTypeDescriptor LayDownRollerCoasterRTD = .StartTrackPiece = TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor( { - .Drawer = GetTrackPaintFunctionCorkscrewRC, + .Drawer = GetTrackPaintFunctionCorkscrewRC, .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_UNINVERTED, TRACK_FLYING_HALF_LOOP_UNINVERTED_UP, TRACK_CORKSCREW_UNINVERTED, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES }, .ExtraTrackPieces = { TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_BOOSTER }, } @@ -38,7 +39,9 @@ constexpr RideTypeDescriptor LayDownRollerCoasterRTD = RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_LAY_DOWN_ROLLER_COASTER, STR_RIDE_DESCRIPTION_LAY_DOWN_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_LAY_DOWN_ROLLER_COASTER), @@ -108,7 +111,9 @@ constexpr RideTypeDescriptor LayDownRollerCoasterAltRTD = RIDE_TYPE_FLAGS_COMMON_COASTER, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_40, STR_RIDE_DESCRIPTION_UNKNOWN }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_LAY_DOWN_ROLLER_COASTER_ALT), diff --git a/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h b/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h index 2889c26888..07f32c021f 100644 --- a/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h @@ -31,7 +31,9 @@ constexpr RideTypeDescriptor LoopingRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 26, 18, 18, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 18, 18 }, + .LegacyBoosterSettings = { 18, 18 }, .Naming = { STR_RIDE_NAME_LOOPING_ROLLER_COASTER, STR_RIDE_DESCRIPTION_LOOPING_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_LOOPING_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/MineRide.h b/src/openrct2/ride/coaster/meta/MineRide.h index 2f9e930e11..4aff739306 100644 --- a/src/openrct2/ride/coaster/meta/MineRide.h +++ b/src/openrct2/ride/coaster/meta/MineRide.h @@ -31,7 +31,6 @@ constexpr RideTypeDescriptor MineRideRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MINE_RIDE, STR_RIDE_DESCRIPTION_MINE_RIDE }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MINE_RIDE), diff --git a/src/openrct2/ride/coaster/meta/MineTrainCoaster.h b/src/openrct2/ride/coaster/meta/MineTrainCoaster.h index 6d515c7c70..fcdf2fdafe 100644 --- a/src/openrct2/ride/coaster/meta/MineTrainCoaster.h +++ b/src/openrct2/ride/coaster/meta/MineTrainCoaster.h @@ -32,7 +32,6 @@ constexpr RideTypeDescriptor MineTrainCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MINE_TRAIN_COASTER, STR_RIDE_DESCRIPTION_MINE_TRAIN_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MINE_TRAIN_COASTER), diff --git a/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h b/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h index f69e4774d3..768efb827b 100644 --- a/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h @@ -31,7 +31,8 @@ constexpr RideTypeDescriptor MiniRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 68, 1 }, + .BoosterSettings = { 0, 68 }, + .LegacyBoosterSettings = { 0, 68, 4 }, .Naming = { STR_RIDE_NAME_MINI_ROLLER_COASTER, STR_RIDE_DESCRIPTION_MINI_ROLLER_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MINI_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h b/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h index f5ea7e28c9..23ff28fd78 100644 --- a/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h +++ b/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h @@ -31,7 +31,6 @@ constexpr RideTypeDescriptor MiniSuspendedCoasterRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_IS_SUSPENDED, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MINI_SUSPENDED_COASTER, STR_RIDE_DESCRIPTION_MINI_SUSPENDED_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MINI_SUSPENDED_COASTER), diff --git a/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h b/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h index 2911473643..af0d2d9f62 100644 --- a/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h @@ -36,7 +36,9 @@ constexpr RideTypeDescriptor MultiDimensionRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_MULTI_DIMENSION_ROLLER_COASTER, STR_RIDE_DESCRIPTION_MULTI_DIMENSION_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER), @@ -109,7 +111,9 @@ constexpr RideTypeDescriptor MultiDimensionRollerCoasterAltRTD = RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAG_HAS_SEAT_ROTATION, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 25, 25 }, + .LegacyBoosterSettings = { 25, 25 }, .Naming = { STR_RIDE_NAME_38, STR_RIDE_DESCRIPTION_UNKNOWN }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER_ALT), diff --git a/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h b/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h index b2ba617e2e..43b9074cb0 100644 --- a/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h +++ b/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h @@ -25,10 +25,13 @@ constexpr RideTypeDescriptor ReverseFreefallCoasterRTD = .ExtraTrackPieces = {}, }), .InvertedTrackPaintFunctions = {}, - .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, + .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS | RIDE_TYPE_FLAG_LSM_BEHAVIOUR_ON_FLAT, .RideModes = EnumsToFlags(RideMode::LimPoweredLaunch), .DefaultMode = RideMode::LimPoweredLaunch, - .OperatingSettings = { 7, 30, 30, 40, 40, 0 }, + .OperatingSettings = { 7, 30 }, + .TrackSpeedSettings = { 60, 60 }, + .BoosterSettings = { 40, 40 }, + .LegacyBoosterSettings = { 40, 40 }, .Naming = { STR_RIDE_NAME_REVERSE_FREEFALL_COASTER, STR_RIDE_DESCRIPTION_REVERSE_FREEFALL_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_REVERSE_FREEFALL_COASTER), diff --git a/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h b/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h index 4f903e4ca9..2a6023d514 100644 --- a/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h @@ -26,10 +26,9 @@ constexpr RideTypeDescriptor ReverserRollerCoasterRTD = }), .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | - RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, + RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_LAYERED_VEHICLE_PREVIEW, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_REVERSER_ROLLER_COASTER, STR_RIDE_DESCRIPTION_REVERSER_ROLLER_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_REVERSER_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h b/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h index 3b0cb73c38..f5dbe34aa7 100644 --- a/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h @@ -31,7 +31,6 @@ constexpr RideTypeDescriptor SideFrictionRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_SIDE_FRICTION_ROLLER_COASTER, STR_RIDE_DESCRIPTION_SIDE_FRICTION_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SIDE_FRICTION_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h b/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h index 18bd59feb1..b32a6bdd8a 100644 --- a/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h @@ -29,7 +29,8 @@ constexpr RideTypeDescriptor SingleRailRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 30, 15, 52, 0 }, + .BoosterSettings = { 15, 52 }, + .LegacyBoosterSettings = { 15, 52 }, .Naming = { STR_RIDE_NAME_SINGLE_RAIL_ROLLER_COASTER, STR_RIDE_DESCRIPTION_SINGLE_RAIL_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SINGLE_RAIL_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/SpinningWildMouse.h b/src/openrct2/ride/coaster/meta/SpinningWildMouse.h index 645ea0882b..5f89083b7d 100644 --- a/src/openrct2/ride/coaster/meta/SpinningWildMouse.h +++ b/src/openrct2/ride/coaster/meta/SpinningWildMouse.h @@ -28,8 +28,7 @@ constexpr RideTypeDescriptor SpinningWildMouseRTD = RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, - .Naming = { STR_SPINNING_WILD_MOUSE_GROUP, STR_SPINNING_WILD_MOUSE_GROUP_DESC }, + .Naming = { STR_RIDE_NAME_SPINNING_WILD_MOUSE, STR_RIDE_DESCRIPTION_SPINNING_WILD_MOUSE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SPINNING_WILD_MOUSE), .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/coaster/meta/SpiralRollerCoaster.h b/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h index d10c6e821d..31e7c01fff 100644 --- a/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h @@ -30,7 +30,9 @@ constexpr RideTypeDescriptor SpiralRollerCoasterRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 17, 17, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 17, 17 }, + .LegacyBoosterSettings = { 17, 17 }, .Naming = { STR_RIDE_NAME_SPIRAL_ROLLER_COASTER, STR_RIDE_DESCRIPTION_SPIRAL_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SPIRAL_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h b/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h index 6925a4aac3..058127a68b 100644 --- a/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h @@ -31,7 +31,7 @@ constexpr RideTypeDescriptor StandUpRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 7, 27, 0, 0, 0, 0 }, + .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 }, .EnumName = nameof(RIDE_TYPE_STAND_UP_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/SteelWildMouse.h b/src/openrct2/ride/coaster/meta/SteelWildMouse.h index 611fdce5a2..cc89bfc6c1 100644 --- a/src/openrct2/ride/coaster/meta/SteelWildMouse.h +++ b/src/openrct2/ride/coaster/meta/SteelWildMouse.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor SteelWildMouseRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_WILD_MOUSE, STR_RIDE_DESCRIPTION_WILD_MOUSE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_STEEL_WILD_MOUSE), diff --git a/src/openrct2/ride/coaster/meta/Steeplechase.h b/src/openrct2/ride/coaster/meta/Steeplechase.h index b59d4e4710..06e225cb30 100644 --- a/src/openrct2/ride/coaster/meta/Steeplechase.h +++ b/src/openrct2/ride/coaster/meta/Steeplechase.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor SteeplechaseRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_STEEPLECHASE, STR_RIDE_DESCRIPTION_STEEPLECHASE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_STEEPLECHASE), diff --git a/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h b/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h index 518e0fb6d8..d933f43888 100644 --- a/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h +++ b/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor SuspendedSwingingCoasterRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_IS_SUSPENDED, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_SUSPENDED_SWINGING_COASTER, STR_RIDE_DESCRIPTION_SUSPENDED_SWINGING_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SUSPENDED_SWINGING_COASTER), diff --git a/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h b/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h index 5224285673..adc4617baa 100644 --- a/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h @@ -33,7 +33,9 @@ constexpr RideTypeDescriptor TwisterRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 17, 68, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 17, 68 }, + .LegacyBoosterSettings = { 17, 68 }, .Naming = { STR_RIDE_NAME_TWISTER_ROLLER_COASTER, STR_RIDE_DESCRIPTION_TWISTER_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_TWISTER_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h b/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h index 52270198bc..3443e3a6fb 100644 --- a/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h +++ b/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h @@ -32,7 +32,9 @@ constexpr RideTypeDescriptor VerticalDropCoasterRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 26, 17, 68, 0 }, + .OperatingSettings = { 10, 27 }, + .BoosterSettings = { 17, 68 }, + .LegacyBoosterSettings = { 17, 68 }, .Naming = { STR_RIDE_NAME_VERTICAL_DROP_ROLLER_COASTER, STR_RIDE_DESCRIPTION_VERTICAL_DROP_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_VERTICAL_DROP_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/VirginiaReel.h b/src/openrct2/ride/coaster/meta/VirginiaReel.h index 28a270c00e..60b3897e34 100644 --- a/src/openrct2/ride/coaster/meta/VirginiaReel.h +++ b/src/openrct2/ride/coaster/meta/VirginiaReel.h @@ -29,7 +29,6 @@ constexpr RideTypeDescriptor VirginiaReelRTD = RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_VIRGINIA_REEL, STR_RIDE_DESCRIPTION_VIRGINIA_REEL }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_VIRGINIA_REEL), diff --git a/src/openrct2/ride/coaster/meta/WaterCoaster.h b/src/openrct2/ride/coaster/meta/WaterCoaster.h index da9d5e8820..3345b05cdc 100644 --- a/src/openrct2/ride/coaster/meta/WaterCoaster.h +++ b/src/openrct2/ride/coaster/meta/WaterCoaster.h @@ -38,7 +38,9 @@ constexpr RideTypeDescriptor WaterCoasterRTD = RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 17, 16, -1 }, + .TrackSpeedSettings = { 30, 15 }, + .BoosterSettings = { 17, 16 }, + .LegacyBoosterSettings = { 17, 16, 1 }, .Naming = { STR_RIDE_NAME_WATER_COASTER, STR_RIDE_DESCRIPTION_WATER_COASTER }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_WATER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h b/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h index d739a27665..faa6402e1e 100644 --- a/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h @@ -31,7 +31,8 @@ constexpr RideTypeDescriptor WoodenRollerCoasterRTD = RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 68, 0 }, + .BoosterSettings = { 0, 68 }, + .LegacyBoosterSettings = { 0, 68 }, .Naming = { STR_RIDE_NAME_WOODEN_ROLLER_COASTER, STR_RIDE_DESCRIPTION_WOODEN_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_WOODEN_ROLLER_COASTER), diff --git a/src/openrct2/ride/coaster/meta/WoodenWildMouse.h b/src/openrct2/ride/coaster/meta/WoodenWildMouse.h index 53571f5f50..7c2c9aad38 100644 --- a/src/openrct2/ride/coaster/meta/WoodenWildMouse.h +++ b/src/openrct2/ride/coaster/meta/WoodenWildMouse.h @@ -31,7 +31,6 @@ constexpr RideTypeDescriptor WoodenWildMouseRTD = RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_WOODEN_WILD_MOUSE, STR_RIDE_DESCRIPTION_WOODEN_WILD_MOUSE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_WOODEN_WILD_MOUSE), diff --git a/src/openrct2/ride/gentle/CarRide.cpp b/src/openrct2/ride/gentle/CarRide.cpp index cc9a5e40d1..01202d6ec9 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -12,12 +12,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../RideData.h" #include "../Track.h" #include "../TrackPaint.h" #include "../VehiclePaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Boxed; + enum { SprCarRideFlatSwNe = 28773, @@ -174,20 +179,20 @@ static void PaintCarRideTrackFlat( if (direction == 0 || direction == 2) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006F72D8 */ @@ -209,26 +214,26 @@ static void PaintCarRideTrack25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x006F72E8 */ @@ -250,26 +255,26 @@ static void PaintCarRideTrackFlatTo25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; } - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x006F72F8 */ @@ -291,26 +296,26 @@ static void PaintCarRideTrack25DegUpToFlat( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_12); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::_12); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_12); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::_12); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardFlat); break; } - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x006F7308 */ @@ -367,19 +372,19 @@ static void PaintCarRideStation( if (direction == 0 || direction == 2) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006F7378 */ @@ -390,14 +395,13 @@ static void PaintCarRideTrackRightQuarterTurn3Tiles( TrackPaintUtilRightQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours, CarRideTrackPiecesQuarterTurn3Tiles, defaultRightQuarterTurn3TilesOffsets, defaultRightQuarterTurn3TilesBoundLengths, nullptr); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::StandardFlat); switch (trackSequence) { case 0: case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } @@ -419,7 +423,7 @@ static void PaintCarRideTrackRightQuarterTurn3Tiles( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006F7368 */ @@ -427,7 +431,7 @@ static void PaintCarRideTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; PaintCarRideTrackRightQuarterTurn3Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -457,12 +461,13 @@ static void PaintCarRideTrackLeftQuarterTurn1Tile( break; } - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, 0, TunnelType::StandardFlat, 0, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006F7398 */ @@ -493,11 +498,11 @@ static void PaintCarRideTrackSpinningTunnel( if (direction == 0 || direction == 2) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } WoodenASupportsPaintSetupRotated( @@ -505,7 +510,7 @@ static void PaintCarRideTrackSpinningTunnel( GetStationColourScheme(session, trackElement)); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006F73B8 */ @@ -534,23 +539,22 @@ static void PaintCarRideTrack60DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 56, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 56, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 56, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 56, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -558,7 +562,7 @@ static void PaintCarRideTrack60DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } /** rct2: 0x006F73C8 */ @@ -594,23 +598,22 @@ static void PaintCarRideTrack25DegUpTo60DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -618,7 +621,7 @@ static void PaintCarRideTrack25DegUpTo60DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x006F73D8 */ @@ -654,23 +657,22 @@ static void PaintCarRideTrack60DegUpTo25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 24, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 24, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 24, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -678,7 +680,7 @@ static void PaintCarRideTrack60DegUpTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x006F73E8 */ @@ -723,20 +725,20 @@ static void PaintCarRideTrackLogBumps( if (direction == 0 || direction == 2) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/gentle/Circus.cpp b/src/openrct2/ride/gentle/Circus.cpp index 307e15bdea..91e0490252 100644 --- a/src/openrct2/ride/gentle/Circus.cpp +++ b/src/openrct2/ride/gentle/Circus.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../ride/Vehicle.h" #include "../Ride.h" #include "../RideEntry.h" @@ -60,10 +62,10 @@ static void PaintCircus( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, session.SupportColours, height, fenceSpritesRope, + session, edges, session.MapPosition, trackElement, ride, session.SupportColours, height, kFenceSpritesRope, session.CurrentRotation); auto stationColour = GetStationColourScheme(session, trackElement); @@ -113,7 +115,7 @@ static void PaintCircus( PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionCircus(int32_t trackType) diff --git a/src/openrct2/ride/gentle/CrookedHouse.cpp b/src/openrct2/ride/gentle/CrookedHouse.cpp index bf8d92b5cf..0f3ef705c7 100644 --- a/src/openrct2/ride/gentle/CrookedHouse.cpp +++ b/src/openrct2/ride/gentle/CrookedHouse.cpp @@ -12,6 +12,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../ride/Vehicle.h" #include "../Ride.h" #include "../RideEntry.h" @@ -93,11 +95,11 @@ static void PaintCrookedHouse( GetStationColourScheme(session, trackElement)); const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, GetStationColourScheme(session, trackElement), height, - fenceSpritesRope, session.CurrentRotation); + kFenceSpritesRope, session.CurrentRotation); auto stationColour = GetStationColourScheme(session, trackElement); switch (trackSequence) @@ -137,7 +139,7 @@ static void PaintCrookedHouse( PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionCrookedHouse(int32_t trackType) diff --git a/src/openrct2/ride/gentle/Dodgems.cpp b/src/openrct2/ride/gentle/Dodgems.cpp index 2dd35eae19..13f714e1c3 100644 --- a/src/openrct2/ride/gentle/Dodgems.cpp +++ b/src/openrct2/ride/gentle/Dodgems.cpp @@ -11,6 +11,8 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../util/Util.h" #include "../Ride.h" #include "../Track.h" @@ -99,7 +101,7 @@ static void PaintDodgems( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, height + 36, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index 1a72edc5e5..17113016ba 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -13,6 +13,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -122,7 +124,7 @@ static void PaintFerrisWheel( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); ImageId imageId; uint8_t rotation = session.CurrentRotation; @@ -166,7 +168,7 @@ static void PaintFerrisWheel( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 176, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 176); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionFerrisWheel(int32_t trackType) diff --git a/src/openrct2/ride/gentle/FlyingSaucers.cpp b/src/openrct2/ride/gentle/FlyingSaucers.cpp index f937c2fc93..de890e5535 100644 --- a/src/openrct2/ride/gentle/FlyingSaucers.cpp +++ b/src/openrct2/ride/gentle/FlyingSaucers.cpp @@ -11,6 +11,8 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" @@ -59,7 +61,7 @@ static void PaintFlyingSaucers( session.CurrentRotation); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** diff --git a/src/openrct2/ride/gentle/GhostTrain.cpp b/src/openrct2/ride/gentle/GhostTrain.cpp index 353e16aec4..f4612af0ba 100644 --- a/src/openrct2/ride/gentle/GhostTrain.cpp +++ b/src/openrct2/ride/gentle/GhostTrain.cpp @@ -11,12 +11,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../RideData.h" #include "../Track.h" #include "../TrackPaint.h" #include "../VehiclePaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Boxed; + enum { SprGhostTrainTrackFlatSwNe = 28821, @@ -140,27 +145,27 @@ static constexpr uint32_t GhostTrainTrackPiecesBrakes[4] = { SprGhostTrainTrackBrakesNwSe, }; -static constexpr uint8_t DoorOpeningOutwardsToImage[] = { - TUNNEL_DOORS_2, // Closed - TUNNEL_DOORS_2, // Unused? - TUNNEL_DOORS_3, // Half open - TUNNEL_DOORS_4, // Fully open - TUNNEL_DOORS_2, // Unused? - TUNNEL_DOORS_2, // Unused? - TUNNEL_DOORS_2, // Unused? +static constexpr TunnelType DoorOpeningOutwardsToImage[] = { + TunnelType::Doors2, // Closed + TunnelType::Doors2, // Unused? + TunnelType::Doors3, // Half open + TunnelType::Doors4, // Fully open + TunnelType::Doors2, // Unused? + TunnelType::Doors2, // Unused? + TunnelType::Doors2, // Unused? }; -static constexpr uint8_t DoorOpeningInwardsToImage[] = { - TUNNEL_DOORS_2, // Closed - TUNNEL_DOORS_2, // Unused? - TUNNEL_DOORS_5, // Half open - TUNNEL_DOORS_6, // Fully open - TUNNEL_DOORS_2, // Unused? - TUNNEL_DOORS_2, // Unused? - TUNNEL_DOORS_2, // Unused? +static constexpr TunnelType DoorOpeningInwardsToImage[] = { + TunnelType::Doors2, // Closed + TunnelType::Doors2, // Unused? + TunnelType::Doors5, // Half open + TunnelType::Doors6, // Fully open + TunnelType::Doors2, // Unused? + TunnelType::Doors2, // Unused? + TunnelType::Doors2, // Unused? }; -static uint8_t GetTunnelDoorsImageStraightFlat(const TrackElement& trackElement, uint8_t direction) +static TunnelType GetTunnelDoorsImageStraightFlat(const TrackElement& trackElement, uint8_t direction) { switch (direction) { @@ -173,7 +178,7 @@ static uint8_t GetTunnelDoorsImageStraightFlat(const TrackElement& trackElement, case 3: return DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; } - return TUNNEL_DOORS_2; + return TunnelType::Doors2; } /** rct2: 0x00770BEC */ @@ -190,8 +195,7 @@ static void PaintGhostTrainTrackFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -199,7 +203,7 @@ static void PaintGhostTrainTrackFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00770BFC */ @@ -215,23 +219,22 @@ static void PaintGhostTrainTrack25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } @@ -240,7 +243,7 @@ static void PaintGhostTrainTrack25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00770C0C */ @@ -249,7 +252,7 @@ static void PaintGhostTrainTrackFlatTo25DegUp( const TrackElement& trackElement) { bool isBackwards = trackElement.GetTrackType() == TrackElemType::Down25ToFlat; - uint8_t doorImage; + TunnelType doorImage; if (!isBackwards) { doorImage = DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; @@ -267,8 +270,7 @@ static void PaintGhostTrainTrackFlatTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } switch (direction) @@ -277,10 +279,10 @@ static void PaintGhostTrainTrackFlatTo25DegUp( PaintUtilPushTunnelLeft(session, height, doorImage); break; case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; case 3: PaintUtilPushTunnelRight(session, height, doorImage); @@ -292,7 +294,7 @@ static void PaintGhostTrainTrackFlatTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void PaintGhostTrainTrack25DegUpToFlatShared( @@ -307,8 +309,7 @@ static void PaintGhostTrainTrack25DegUpToFlatShared( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -316,7 +317,7 @@ static void PaintGhostTrainTrack25DegUpToFlatShared( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x00770C1C */ @@ -329,7 +330,7 @@ static void PaintGhostTrainTrack25DegUpToFlat( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardFlat); break; case 1: PaintUtilPushTunnelRight(session, height + 8, DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]); @@ -338,7 +339,7 @@ static void PaintGhostTrainTrack25DegUpToFlat( PaintUtilPushTunnelLeft(session, height + 8, DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardFlat); break; } } @@ -361,7 +362,7 @@ static void PaintGhostTrainTrackFlatTo25DegDown( switch ((direction + 2) % 4) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardFlat); break; case 1: PaintUtilPushTunnelRight(session, height + 8, DoorOpeningInwardsToImage[trackElement.GetDoorAState()]); @@ -370,7 +371,7 @@ static void PaintGhostTrainTrackFlatTo25DegDown( PaintUtilPushTunnelLeft(session, height + 8, DoorOpeningInwardsToImage[trackElement.GetDoorAState()]); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardFlat); break; } } @@ -403,14 +404,14 @@ static void PaintGhostTrainStation( imageId = session.TrackColours.WithIndex(GhostTrainTrackPiecesFlat[direction]); PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 3 } }); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00770C9C */ @@ -431,8 +432,7 @@ static void PaintGhostTrainTrackRightQuarterTurn3Tiles( { case 0: case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } @@ -454,7 +454,7 @@ static void PaintGhostTrainTrackRightQuarterTurn3Tiles( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00770CAC */ @@ -462,7 +462,7 @@ static void PaintGhostTrainTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; PaintGhostTrainTrackRightQuarterTurn3Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -472,7 +472,7 @@ static void PaintGhostTrainTrackLeftQuarterTurn1Tile( const TrackElement& trackElement) { bool isBackwards = trackElement.GetTrackType() == TrackElemType::RightQuarterTurn1Tile; - uint8_t tunnelStartImage, tunnelEndImage; + TunnelType tunnelStartImage, tunnelEndImage; if (!isBackwards) { tunnelStartImage = DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; @@ -488,9 +488,9 @@ static void PaintGhostTrainTrackLeftQuarterTurn1Tile( session, 3, height, 0, direction, session.TrackColours, GhostTrainTrackPiecesQuarterTurn1Tile); TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, tunnelStartImage, 0, tunnelEndImage); - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00770CBC */ @@ -520,7 +520,7 @@ static void PaintGhostTrainTrackSpinningTunnel( GetStationColourScheme(session, trackElement)); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00770CDC */ @@ -537,8 +537,7 @@ static void PaintGhostTrainTrackBrakes( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -546,7 +545,7 @@ static void PaintGhostTrainTrackBrakes( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index 79d0688101..bae93427c0 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -12,6 +12,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -74,11 +76,11 @@ static void PaintHauntedHouse( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, GetStationColourScheme(session, trackElement), height, - fenceSpritesRope, session.CurrentRotation); + kFenceSpritesRope, session.CurrentRotation); auto stationColour = GetStationColourScheme(session, trackElement); switch (trackSequence) @@ -118,7 +120,7 @@ static void PaintHauntedHouse( PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionHauntedHouse(int32_t trackType) diff --git a/src/openrct2/ride/gentle/Maze.cpp b/src/openrct2/ride/gentle/Maze.cpp index 3ae4473084..9ad5c60281 100644 --- a/src/openrct2/ride/gentle/Maze.cpp +++ b/src/openrct2/ride/gentle/Maze.cpp @@ -14,6 +14,9 @@ #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" #include "../../paint/tile_element/Paint.Surface.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../Ride.h" @@ -181,7 +184,7 @@ static void MazePaintSetup( PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::centre), height + 12, 0x20); } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/gentle/MerryGoRound.cpp b/src/openrct2/ride/gentle/MerryGoRound.cpp index 20f0df4c29..079b63a606 100644 --- a/src/openrct2/ride/gentle/MerryGoRound.cpp +++ b/src/openrct2/ride/gentle/MerryGoRound.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -115,11 +117,11 @@ static void PaintMerryGoRound( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, GetStationColourScheme(session, trackElement), height, - fenceSpritesRope, session.CurrentRotation); + kFenceSpritesRope, session.CurrentRotation); auto stationColour = GetStationColourScheme(session, trackElement); switch (trackSequence) @@ -168,7 +170,7 @@ static void PaintMerryGoRound( PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionMerryGoRound(int32_t trackType) diff --git a/src/openrct2/ride/gentle/MiniGolf.cpp b/src/openrct2/ride/gentle/MiniGolf.cpp index f9491cc8b4..756483a32c 100644 --- a/src/openrct2/ride/gentle/MiniGolf.cpp +++ b/src/openrct2/ride/gentle/MiniGolf.cpp @@ -7,7 +7,6 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "../../config/Config.h" #include "../../entity/EntityRegistry.h" #include "../../entity/Guest.h" #include "../../interface/Viewport.h" @@ -15,8 +14,12 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../../world/Surface.h" +#include "../../world/tile_element/Slope.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" @@ -25,6 +28,8 @@ #include +static constexpr MetalSupportType kSupportType = MetalSupportType::Boxed; + enum { SprMiniGolfFlatSwNe = 14404, @@ -459,7 +464,7 @@ static bool MiniGolfPaintUtilShouldDrawFence(PaintSession& session, const TrackE return true; } - if (surfaceElement->GetSlope() != TILE_ELEMENT_SLOPE_FLAT) + if (surfaceElement->GetSlope() != kTileSlopeFlat) { return true; } @@ -478,16 +483,16 @@ static void PaintMiniGolfTrackFlat( { imageId = session.TrackColours.WithIndex(SprMiniGolfFlatNwSe); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); } else { imageId = session.TrackColours.WithIndex(SprMiniGolfFlatSwNe); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); } - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -514,7 +519,7 @@ static void PaintMiniGolfTrackFlat( } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0087F11C */ @@ -527,7 +532,7 @@ static void PaintMiniGolfTrack25DegUp( imageId = session.TrackColours.WithIndex(MiniGolfTrackSprites25DegUp[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 1 }); - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -543,20 +548,20 @@ static void PaintMiniGolfTrack25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0087F12C */ @@ -569,7 +574,7 @@ static void PaintMiniGolfTrackFlatTo25DegUp( imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesFlatTo25DegUp[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -585,20 +590,20 @@ static void PaintMiniGolfTrackFlatTo25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); break; case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0087F13C */ @@ -611,7 +616,7 @@ static void PaintMiniGolfTrack25DegUpToFlat( imageId = session.TrackColours.WithIndex(MiniGolfTrackSprites25DegUpToFlat[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -627,20 +632,20 @@ static void PaintMiniGolfTrack25DegUpToFlat( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardFlat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::PathAndMiniGolf); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::PathAndMiniGolf); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardFlat); break; } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0087F14C */ @@ -700,7 +705,7 @@ static void PaintMiniGolfStation( TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasSWFence, stationObj, height, stationColour); // Was leftwards tunnel in game, seems odd - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { @@ -722,14 +727,14 @@ static void PaintMiniGolfStation( TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height, stationColour); TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasSEFence, stationObj, height, stationColour); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0087F1AC */ @@ -742,7 +747,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( TrackPaintUtilLeftQuarterTurn1TilePaint( session, 1, height, 0, direction, session.TrackColours, MiniGolfTrackSpritesQuarterTurn1Tile); - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -757,7 +762,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); if (!shouldDrawFence) break; @@ -775,7 +780,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( break; case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); if (!shouldDrawFence) break; @@ -784,8 +789,8 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); if (!shouldDrawFence) break; @@ -814,7 +819,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0087F1BC */ @@ -835,15 +840,15 @@ static void PaintMiniGolfHoleAb( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); if ((direction == 0 && trackSequence == 0) || (direction == 2 && trackSequence == 1)) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); } else if ((direction == 3 && trackSequence == 0) || (direction == 1 && trackSequence == 1)) { - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); } if (direction & 1) @@ -908,15 +913,15 @@ static void PaintMiniGolfHoleC( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); if ((direction == 0 && trackSequence == 0) || (direction == 2 && trackSequence == 1)) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); } else if ((direction == 3 && trackSequence == 0) || (direction == 1 && trackSequence == 1)) { - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); } if (direction & 1) @@ -980,18 +985,18 @@ static void PaintMiniGolfHoleD( session, WoodenSupportType::Truss, supportType, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); switch ((direction << 4) | trackSequence) { case 0x00: case 0x12: - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); break; case 0x02: case 0x30: - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); break; } @@ -1074,18 +1079,18 @@ static void PaintMiniGolfHoleE( session, WoodenSupportType::Truss, supportType, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); switch ((direction << 4) | trackSequence) { case (0 << 4 | 0): case (3 << 4 | 2): - PaintUtilPushTunnelLeft(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelLeft(session, height, TunnelType::PathAndMiniGolf); break; case (2 << 4 | 2): case (3 << 4 | 0): - PaintUtilPushTunnelRight(session, height, TUNNEL_PATH_AND_MINI_GOLF); + PaintUtilPushTunnelRight(session, height, TunnelType::PathAndMiniGolf); break; } diff --git a/src/openrct2/ride/gentle/MiniHelicopters.cpp b/src/openrct2/ride/gentle/MiniHelicopters.cpp index 5a98c68c45..2b5b58e58a 100644 --- a/src/openrct2/ride/gentle/MiniHelicopters.cpp +++ b/src/openrct2/ride/gentle/MiniHelicopters.cpp @@ -11,12 +11,17 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../RideData.h" #include "../Track.h" #include "../TrackPaint.h" #include "../VehiclePaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Stick; + /** rct2: 0x */ static void PaintMiniHelicoptersTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, @@ -42,12 +47,12 @@ static void PaintMiniHelicoptersTrackStation( } DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0081F348 */ @@ -61,20 +66,20 @@ static void PaintMiniHelicoptersTrackFlat( { imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } else { imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::StickAlt : MetalSupportType::Stick, MetalSupportPlace::Centre, -1, - height, session.SupportColours); + session, (direction & 1) ? MetalSupportType::StickAlt : kSupportType, MetalSupportPlace::Centre, -1, height, + session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -82,7 +87,7 @@ static void PaintMiniHelicoptersTrackFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0081F368 */ @@ -97,29 +102,28 @@ static void PaintMiniHelicoptersTrackFlatTo25DegUp( case 0: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); break; case 1: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_2); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardSlopeEnd); break; case 2: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardSlopeEnd); break; case 3: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SE_NW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -4, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -4, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -127,7 +131,7 @@ static void PaintMiniHelicoptersTrackFlatTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x0081F358 */ @@ -142,29 +146,28 @@ static void PaintMiniHelicoptersTrack25DegUp( case 0: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardSlopeStart); break; case 1: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::StandardSlopeEnd); break; case 2: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::StandardSlopeEnd); break; case 3: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SE_NW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardSlopeStart); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -9, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -9, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -172,7 +175,7 @@ static void PaintMiniHelicoptersTrack25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0081F378 */ @@ -187,29 +190,28 @@ static void PaintMiniHelicoptersTrack25DegUpToFlat( case 0: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::StandardFlat); break; case 1: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_12); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::_12); break; case 2: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_12); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::_12); break; case 3: imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SE_NW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_0); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::StandardFlat); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -7, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -7, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -217,7 +219,7 @@ static void PaintMiniHelicoptersTrack25DegUpToFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x */ @@ -251,14 +253,13 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( { TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours, - trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles); - TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TUNNEL_0, direction, trackSequence); + kTrackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles); + TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TunnelType::StandardFlat, direction, trackSequence); switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -279,8 +280,7 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( 0xFFFF, 0); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -292,7 +292,7 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr uint8_t MiniHelicoptersRightQuarterTurn3TilesToLeftTurnMap[] = { @@ -317,8 +317,9 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn1Tile( const TrackElement& trackElement) { TrackPaintUtilLeftQuarterTurn1TilePaint( - session, 1, height, 0, direction, session.TrackColours, trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile); - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); + session, 1, height, 0, direction, session.TrackColours, kTrackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height, 0, TunnelType::StandardFlat, 0, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( session, @@ -327,7 +328,7 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn1Tile( PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0081F418 */ @@ -342,7 +343,7 @@ static void PaintMiniHelicoptersTrackSpinningTunnel( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - const uint32_t sprites[NumOrthogonalDirections][2] = { + const uint32_t sprites[kNumOrthogonalDirections][2] = { { SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW, 28773 }, { SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW, 28774 }, { SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW, 28773 }, @@ -355,14 +356,14 @@ static void PaintMiniHelicoptersTrackSpinningTunnel( PaintAddImageAsParentRotated(session, direction, underlay, { 0, 6, height - 2 }, { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); TrackPaintUtilSpinningTunnelPaint(session, 1, height, direction); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index 9f8f4efc3b..b1a8857744 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -11,11 +11,16 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../Track.h" #include "../TrackPaint.h" #include "../VehiclePaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Stick; + enum { SprMonorailCyclesFlatSwNe = 16820, @@ -169,15 +174,15 @@ static void PaintMonorailCyclesTrackFlat( if (direction & 1) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::StickAlt : MetalSupportType::Stick, MetalSupportPlace::Centre, -1, height, + session, (direction & 1) ? MetalSupportType::StickAlt : kSupportType, MetalSupportPlace::Centre, -1, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( @@ -185,7 +190,7 @@ static void PaintMonorailCyclesTrackFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0088ADD8 */ @@ -213,12 +218,12 @@ static void PaintMonorailCyclesStation( } DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0088AD88 */ @@ -228,13 +233,12 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn3Tiles( { TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours, MonorailCyclesTrackPiecesFlatQuarterTurn3Tiles); - TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TUNNEL_0, direction, trackSequence); + TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TunnelType::StandardFlat, direction, trackSequence); switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -255,8 +259,7 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn3Tiles( 0xFFFF, 0); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -1, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -268,7 +271,7 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn3Tiles( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr uint8_t monorail_cycles_right_quarter_turn_3_tiles_to_left_turn_map[] = { @@ -308,7 +311,7 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( { TrackPaintUtilRightQuarterTurn5TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours, MonorailCyclesTrackPiecesFlatQuarterTurn5Tiles, - nullptr, defaultRightQuarterTurn5TilesBoundLengths, defaultRightQuarterTurn5TilesBoundOffsets); + nullptr, kDefaultRightQuarterTurn5TilesBoundLengths, kDefaultRightQuarterTurn5TilesBoundOffsets); int32_t supportHeight = height + MonorailCyclesTrackRightQuarterTurn5TilesSupportHeightOffset[direction][trackSequence]; int32_t supportSpecial = MonorailCyclesTrackRightQuarterTurn5TilesSupportSpecial[direction][trackSequence]; @@ -316,70 +319,70 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( { case 0: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::StickAlt : MetalSupportType::Stick, MetalSupportPlace::Centre, - supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? MetalSupportType::StickAlt : kSupportType, MetalSupportPlace::Centre, supportSpecial, + supportHeight, session.SupportColours); break; case 2: if (direction == 0) MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::StickAlt : MetalSupportType::Stick, - MetalSupportPlace::BottomRightSide, supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? MetalSupportType::StickAlt : kSupportType, MetalSupportPlace::BottomRightSide, + supportSpecial, supportHeight, session.SupportColours); if (direction == 1) MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::StickAlt : MetalSupportType::Stick, - MetalSupportPlace::BottomLeftSide, supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? MetalSupportType::StickAlt : kSupportType, MetalSupportPlace::BottomLeftSide, + supportSpecial, supportHeight, session.SupportColours); if (direction == 2) MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::StickAlt : MetalSupportType::Stick, - MetalSupportPlace::TopLeftSide, supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? MetalSupportType::StickAlt : kSupportType, MetalSupportPlace::TopLeftSide, + supportSpecial, supportHeight, session.SupportColours); if (direction == 3) MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::StickAlt : MetalSupportType::Stick, - MetalSupportPlace::TopRightSide, supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? MetalSupportType::StickAlt : kSupportType, MetalSupportPlace::TopRightSide, + supportSpecial, supportHeight, session.SupportColours); break; case 5: if (direction == 0) MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Stick : MetalSupportType::StickAlt, - MetalSupportPlace::BottomLeftSide, supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? kSupportType : MetalSupportType::StickAlt, MetalSupportPlace::BottomLeftSide, + supportSpecial, supportHeight, session.SupportColours); if (direction == 1) MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Stick : MetalSupportType::StickAlt, - MetalSupportPlace::TopLeftSide, supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? kSupportType : MetalSupportType::StickAlt, MetalSupportPlace::TopLeftSide, + supportSpecial, supportHeight, session.SupportColours); if (direction == 2) MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Stick : MetalSupportType::StickAlt, - MetalSupportPlace::TopRightSide, supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? kSupportType : MetalSupportType::StickAlt, MetalSupportPlace::TopRightSide, + supportSpecial, supportHeight, session.SupportColours); if (direction == 3) MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Stick : MetalSupportType::StickAlt, - MetalSupportPlace::BottomRightSide, supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? kSupportType : MetalSupportType::StickAlt, MetalSupportPlace::BottomRightSide, + supportSpecial, supportHeight, session.SupportColours); break; case 6: MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::Stick : MetalSupportType::StickAlt, MetalSupportPlace::Centre, - supportSpecial, supportHeight, session.SupportColours); + session, (direction & 1) ? kSupportType : MetalSupportType::StickAlt, MetalSupportPlace::Centre, supportSpecial, + supportHeight, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -435,7 +438,7 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0088ADA8 */ @@ -443,7 +446,7 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; PaintMonorailCyclesTrackRightQuarterTurn5Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -478,22 +481,20 @@ static void PaintMonorailCyclesTrackSBendLeft( { if (trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } } @@ -501,7 +502,7 @@ static void PaintMonorailCyclesTrackSBendLeft( { if (trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -564,7 +565,7 @@ static void PaintMonorailCyclesTrackSBendLeft( 0xFFFF, 0); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x*/ @@ -598,23 +599,20 @@ static void PaintMonorailCyclesTrackSBendRight( { if (trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::BottomRightSide, 0, height - 2, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height - 2, session.SupportColours); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } } @@ -622,7 +620,7 @@ static void PaintMonorailCyclesTrackSBendRight( { if (trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -685,7 +683,7 @@ static void PaintMonorailCyclesTrackSBendRight( 0xFFFF, 0); break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/gentle/ObservationTower.cpp b/src/openrct2/ride/gentle/ObservationTower.cpp index f2baa05422..9b9974e8d7 100644 --- a/src/openrct2/ride/gentle/ObservationTower.cpp +++ b/src/openrct2/ride/gentle/ObservationTower.cpp @@ -11,6 +11,9 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../Ride.h" #include "../Track.h" @@ -94,10 +97,10 @@ static void PaintObservationTowerBase( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, floorSpritesMetalB, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, kFloorSpritesMetalB, stationObject); TrackPaintUtilPaintFences( - session, edges, position, trackElement, ride, session.TrackColours, height, fenceSpritesMetalB, + session, edges, position, trackElement, ride, session.TrackColours, height, kFenceSpritesMetalB, session.CurrentRotation); if (trackSequence == 0) @@ -114,7 +117,7 @@ static void PaintObservationTowerBase( PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 96); return; } @@ -158,7 +161,7 @@ static void PaintObservationTowerBase( } PaintUtilSetSegmentSupportHeight(session, blockedSegments, 0xFFFF, 0); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~blockedSegments, height + 2, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0070DD7C */ @@ -184,7 +187,7 @@ static void PaintObservationTowerSection( PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetVerticalTunnel(session, height + 32); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/gentle/SpaceRings.cpp b/src/openrct2/ride/gentle/SpaceRings.cpp index c40b044613..dbe01df865 100644 --- a/src/openrct2/ride/gentle/SpaceRings.cpp +++ b/src/openrct2/ride/gentle/SpaceRings.cpp @@ -13,6 +13,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" @@ -53,7 +55,7 @@ static void PaintSpaceRingsStructure( frameNum += static_cast(vehicle->Pitch) * 4; } - if ((ride.colour_scheme_type & 3) != RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN) + if (ride.vehicleColourSettings != VehicleColourSettings::perTrain) { vehicleIndex = 0; } @@ -99,7 +101,7 @@ static void PaintSpaceRings( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, stationColour); const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); switch (trackSequence) { @@ -179,7 +181,7 @@ static void PaintSpaceRings( } PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** diff --git a/src/openrct2/ride/gentle/SpiralSlide.cpp b/src/openrct2/ride/gentle/SpiralSlide.cpp index 602b5339d0..647adb0142 100644 --- a/src/openrct2/ride/gentle/SpiralSlide.cpp +++ b/src/openrct2/ride/gentle/SpiralSlide.cpp @@ -11,6 +11,8 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -243,7 +245,7 @@ static void PaintSpiralSlide( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); } /** diff --git a/src/openrct2/ride/gentle/meta/CarRide.h b/src/openrct2/ride/gentle/meta/CarRide.h index d0056d8478..26b4e81387 100644 --- a/src/openrct2/ride/gentle/meta/CarRide.h +++ b/src/openrct2/ride/gentle/meta/CarRide.h @@ -34,7 +34,6 @@ constexpr RideTypeDescriptor CarRideRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_CAR_RIDE, STR_RIDE_DESCRIPTION_CAR_RIDE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_CAR_RIDE), diff --git a/src/openrct2/ride/gentle/meta/Circus.h b/src/openrct2/ride/gentle/meta/Circus.h index 0ff77bf175..49ad415941 100644 --- a/src/openrct2/ride/gentle/meta/Circus.h +++ b/src/openrct2/ride/gentle/meta/Circus.h @@ -32,7 +32,6 @@ constexpr RideTypeDescriptor CircusRTD = RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::Circus), .DefaultMode = RideMode::Circus, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_CIRCUS, STR_RIDE_DESCRIPTION_CIRCUS }, .NameConvention = { RideComponentType::Building, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_CIRCUS), diff --git a/src/openrct2/ride/gentle/meta/CrookedHouse.h b/src/openrct2/ride/gentle/meta/CrookedHouse.h index dbfd6f939e..30e1482b86 100644 --- a/src/openrct2/ride/gentle/meta/CrookedHouse.h +++ b/src/openrct2/ride/gentle/meta/CrookedHouse.h @@ -32,7 +32,6 @@ constexpr RideTypeDescriptor CrookedHouseRTD = RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::CrookedHouse), .DefaultMode = RideMode::CrookedHouse, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_CROOKED_HOUSE, STR_RIDE_DESCRIPTION_CROOKED_HOUSE }, .NameConvention = { RideComponentType::Building, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_CROOKED_HOUSE), diff --git a/src/openrct2/ride/gentle/meta/Dodgems.h b/src/openrct2/ride/gentle/meta/Dodgems.h index 5d3879d39e..10173cab15 100644 --- a/src/openrct2/ride/gentle/meta/Dodgems.h +++ b/src/openrct2/ride/gentle/meta/Dodgems.h @@ -33,7 +33,7 @@ constexpr RideTypeDescriptor DodgemsRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::Dodgems), .DefaultMode = RideMode::Dodgems, - .OperatingSettings = { 20, 180, 0, 0, 0, 0 }, + .OperatingSettings = { 20, 180 }, .Naming = { STR_RIDE_NAME_DODGEMS, STR_RIDE_DESCRIPTION_DODGEMS }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_DODGEMS), diff --git a/src/openrct2/ride/gentle/meta/FerrisWheel.h b/src/openrct2/ride/gentle/meta/FerrisWheel.h index 23de92cd37..5e05b0739f 100644 --- a/src/openrct2/ride/gentle/meta/FerrisWheel.h +++ b/src/openrct2/ride/gentle/meta/FerrisWheel.h @@ -32,7 +32,7 @@ constexpr RideTypeDescriptor FerrisWheelRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::ForwardRotation, RideMode::BackwardRotation), .DefaultMode = RideMode::ForwardRotation, - .OperatingSettings = { 1, 3, 0, 0, 0, 0 }, + .OperatingSettings = { 1, 3 }, .Naming = { STR_RIDE_NAME_FERRIS_WHEEL, STR_RIDE_DESCRIPTION_FERRIS_WHEEL }, .NameConvention = { RideComponentType::Wheel, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_FERRIS_WHEEL), diff --git a/src/openrct2/ride/gentle/meta/FlyingSaucers.h b/src/openrct2/ride/gentle/meta/FlyingSaucers.h index 47e0cc3fce..3deb2a2805 100644 --- a/src/openrct2/ride/gentle/meta/FlyingSaucers.h +++ b/src/openrct2/ride/gentle/meta/FlyingSaucers.h @@ -32,7 +32,7 @@ constexpr RideTypeDescriptor FlyingSaucersRTD = RIDE_TYPE_FLAG_SINGLE_SESSION | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::Dodgems), .DefaultMode = RideMode::Dodgems, - .OperatingSettings = { 20, 180, 0, 0, 0, 0 }, + .OperatingSettings = { 20, 180 }, .Naming = { STR_RIDE_NAME_FLYING_SAUCERS, STR_RIDE_DESCRIPTION_FLYING_SAUCERS }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_FLYING_SAUCERS), diff --git a/src/openrct2/ride/gentle/meta/GhostTrain.h b/src/openrct2/ride/gentle/meta/GhostTrain.h index 177b59b5f7..72787bc260 100644 --- a/src/openrct2/ride/gentle/meta/GhostTrain.h +++ b/src/openrct2/ride/gentle/meta/GhostTrain.h @@ -35,7 +35,6 @@ constexpr RideTypeDescriptor GhostTrainRTD = RIDE_TYPE_FLAG_HAS_LANDSCAPE_DOORS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_GHOST_TRAIN, STR_RIDE_DESCRIPTION_GHOST_TRAIN }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_GHOST_TRAIN), diff --git a/src/openrct2/ride/gentle/meta/HauntedHouse.h b/src/openrct2/ride/gentle/meta/HauntedHouse.h index ec8a20c075..125e6b7105 100644 --- a/src/openrct2/ride/gentle/meta/HauntedHouse.h +++ b/src/openrct2/ride/gentle/meta/HauntedHouse.h @@ -32,7 +32,6 @@ constexpr RideTypeDescriptor HauntedHouseRTD = RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::HauntedHouse), .DefaultMode = RideMode::HauntedHouse, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_HAUNTED_HOUSE, STR_RIDE_DESCRIPTION_HAUNTED_HOUSE }, .NameConvention = { RideComponentType::Building, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_HAUNTED_HOUSE), diff --git a/src/openrct2/ride/gentle/meta/Maze.h b/src/openrct2/ride/gentle/meta/Maze.h index dea5befb52..d2b36fbc77 100644 --- a/src/openrct2/ride/gentle/meta/Maze.h +++ b/src/openrct2/ride/gentle/meta/Maze.h @@ -31,7 +31,7 @@ constexpr RideTypeDescriptor MazeRTD = RIDE_TYPE_FLAG_PEEP_CAN_USE_UMBRELLA | RIDE_TYPE_FLAG_IS_MAZE, .RideModes = EnumsToFlags(RideMode::Maze), .DefaultMode = RideMode::Maze, - .OperatingSettings = { 1, 64, 0, 0, 0, 0 }, + .OperatingSettings = { 1, 64 }, .Naming = { STR_RIDE_NAME_MAZE, STR_RIDE_DESCRIPTION_MAZE }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MAZE), diff --git a/src/openrct2/ride/gentle/meta/MerryGoRound.h b/src/openrct2/ride/gentle/meta/MerryGoRound.h index d67fc1a0fc..eebf41e5d0 100644 --- a/src/openrct2/ride/gentle/meta/MerryGoRound.h +++ b/src/openrct2/ride/gentle/meta/MerryGoRound.h @@ -32,7 +32,7 @@ constexpr RideTypeDescriptor MerryGoRoundRTD = RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::Rotation), .DefaultMode = RideMode::Rotation, - .OperatingSettings = { 4, 25, 0, 0, 0, 0 }, + .OperatingSettings = { 4, 25 }, .Naming = { STR_RIDE_NAME_MERRY_GO_ROUND, STR_RIDE_DESCRIPTION_MERRY_GO_ROUND }, .NameConvention = { RideComponentType::Car, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MERRY_GO_ROUND), diff --git a/src/openrct2/ride/gentle/meta/MiniGolf.h b/src/openrct2/ride/gentle/meta/MiniGolf.h index f47110aedd..0f79e00e58 100644 --- a/src/openrct2/ride/gentle/meta/MiniGolf.h +++ b/src/openrct2/ride/gentle/meta/MiniGolf.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor MiniGolfRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MINI_GOLF, STR_RIDE_DESCRIPTION_MINI_GOLF }, .NameConvention = { RideComponentType::Player, RideComponentType::Course, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MINI_GOLF), diff --git a/src/openrct2/ride/gentle/meta/MiniHelicopters.h b/src/openrct2/ride/gentle/meta/MiniHelicopters.h index c546fc71f3..6939100869 100644 --- a/src/openrct2/ride/gentle/meta/MiniHelicopters.h +++ b/src/openrct2/ride/gentle/meta/MiniHelicopters.h @@ -34,7 +34,6 @@ constexpr RideTypeDescriptor MiniHelicoptersRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MINI_HELICOPTERS, STR_RIDE_DESCRIPTION_MINI_HELICOPTERS }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MINI_HELICOPTERS), diff --git a/src/openrct2/ride/gentle/meta/MonorailCycles.h b/src/openrct2/ride/gentle/meta/MonorailCycles.h index 8ea78654db..d589f09922 100644 --- a/src/openrct2/ride/gentle/meta/MonorailCycles.h +++ b/src/openrct2/ride/gentle/meta/MonorailCycles.h @@ -33,7 +33,6 @@ constexpr RideTypeDescriptor MonorailCyclesRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MONORAIL_CYCLES, STR_RIDE_DESCRIPTION_MONORAIL_CYCLES }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MONORAIL_CYCLES), diff --git a/src/openrct2/ride/gentle/meta/MonsterTrucks.h b/src/openrct2/ride/gentle/meta/MonsterTrucks.h index 4a8cdab516..a6489bd0e5 100644 --- a/src/openrct2/ride/gentle/meta/MonsterTrucks.h +++ b/src/openrct2/ride/gentle/meta/MonsterTrucks.h @@ -33,8 +33,7 @@ constexpr RideTypeDescriptor MonsterTrucksRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = (1uLL << static_cast(RideMode::ContinuousCircuit)), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, - .Naming = { STR_RIDE_NAME_MONSTER_TRUCKS, STR_RIDE_DESCRIPTION_MONSTER_TRUCKS_GROUP }, + .Naming = { STR_RIDE_NAME_MONSTER_TRUCKS, STR_RIDE_DESCRIPTION_MONSTER_TRUCKS }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MONSTER_TRUCKS), .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/gentle/meta/ObservationTower.h b/src/openrct2/ride/gentle/meta/ObservationTower.h index c35ce95009..4eee41be55 100644 --- a/src/openrct2/ride/gentle/meta/ObservationTower.h +++ b/src/openrct2/ride/gentle/meta/ObservationTower.h @@ -32,7 +32,6 @@ constexpr RideTypeDescriptor ObservationTowerRTD = RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER | RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::RotatingLift), .DefaultMode = RideMode::RotatingLift, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_OBSERVATION_TOWER, STR_RIDE_DESCRIPTION_OBSERVATION_TOWER }, .NameConvention = { RideComponentType::Cabin, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_OBSERVATION_TOWER), diff --git a/src/openrct2/ride/gentle/meta/SpaceRings.h b/src/openrct2/ride/gentle/meta/SpaceRings.h index c31ff15a6d..6f8f806f8a 100644 --- a/src/openrct2/ride/gentle/meta/SpaceRings.h +++ b/src/openrct2/ride/gentle/meta/SpaceRings.h @@ -31,7 +31,6 @@ constexpr RideTypeDescriptor SpaceRingsRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::SpaceRings), .DefaultMode = RideMode::SpaceRings, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_SPACE_RINGS, STR_RIDE_DESCRIPTION_SPACE_RINGS }, .NameConvention = { RideComponentType::Ring, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SPACE_RINGS), diff --git a/src/openrct2/ride/gentle/meta/SpiralSlide.h b/src/openrct2/ride/gentle/meta/SpiralSlide.h index d21cd83b99..cee4835f4b 100644 --- a/src/openrct2/ride/gentle/meta/SpiralSlide.h +++ b/src/openrct2/ride/gentle/meta/SpiralSlide.h @@ -32,7 +32,7 @@ constexpr RideTypeDescriptor SpiralSlideRTD = RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY | RIDE_TYPE_FLAG_IS_SPIRAL_SLIDE, .RideModes = EnumsToFlags(RideMode::SingleRidePerAdmission, RideMode::UnlimitedRidesPerAdmission), .DefaultMode = RideMode::SingleRidePerAdmission, - .OperatingSettings = { 1, 5, 0, 0, 0, 0 }, + .OperatingSettings = { 1, 5 }, .Naming = { STR_RIDE_NAME_SPIRAL_SLIDE, STR_RIDE_DESCRIPTION_SPIRAL_SLIDE }, .NameConvention = { RideComponentType::Train, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SPIRAL_SLIDE), diff --git a/src/openrct2/ride/shops/Facility.cpp b/src/openrct2/ride/shops/Facility.cpp index 6243f18a52..37d4eb3e0d 100644 --- a/src/openrct2/ride/shops/Facility.cpp +++ b/src/openrct2/ride/shops/Facility.cpp @@ -11,6 +11,9 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../Ride.h" @@ -67,10 +70,10 @@ static void PaintFacility( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); if (direction == 1 || direction == 2) - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } /* 0x00762D44 */ diff --git a/src/openrct2/ride/shops/Shop.cpp b/src/openrct2/ride/shops/Shop.cpp index 5360956c9e..441618caa9 100644 --- a/src/openrct2/ride/shops/Shop.cpp +++ b/src/openrct2/ride/shops/Shop.cpp @@ -11,6 +11,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../Ride.h" @@ -53,10 +55,10 @@ static void PaintShop( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); if (direction == 1 || direction == 2) - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionShop(int32_t trackType) diff --git a/src/openrct2/ride/shops/meta/CashMachine.h b/src/openrct2/ride/shops/meta/CashMachine.h index 96f97a884a..fd7672e7df 100644 --- a/src/openrct2/ride/shops/meta/CashMachine.h +++ b/src/openrct2/ride/shops/meta/CashMachine.h @@ -29,7 +29,6 @@ constexpr RideTypeDescriptor CashMachineRTD = RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::ShopStall), .DefaultMode = RideMode::ShopStall, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_CASH_MACHINE, STR_RIDE_DESCRIPTION_CASH_MACHINE }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_CASH_MACHINE), diff --git a/src/openrct2/ride/shops/meta/DrinkStall.h b/src/openrct2/ride/shops/meta/DrinkStall.h index 6f54445ced..5f29797681 100644 --- a/src/openrct2/ride/shops/meta/DrinkStall.h +++ b/src/openrct2/ride/shops/meta/DrinkStall.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor DrinkStallRTD = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN, .RideModes = EnumsToFlags(RideMode::ShopStall), .DefaultMode = RideMode::ShopStall, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_DRINK_STALL, STR_RIDE_DESCRIPTION_DRINK_STALL }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_DRINK_STALL), diff --git a/src/openrct2/ride/shops/meta/FirstAid.h b/src/openrct2/ride/shops/meta/FirstAid.h index d58f72f1b8..59758ab901 100644 --- a/src/openrct2/ride/shops/meta/FirstAid.h +++ b/src/openrct2/ride/shops/meta/FirstAid.h @@ -30,7 +30,7 @@ constexpr RideTypeDescriptor FirstAidRTD = RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::ShopStall), .DefaultMode = RideMode::ShopStall, - .OperatingSettings = { 8, 8, 0, 0, 0, 0 }, + .OperatingSettings = { 8, 8 }, .Naming = { STR_RIDE_NAME_FIRST_AID, STR_RIDE_DESCRIPTION_FIRST_AID }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_FIRST_AID), diff --git a/src/openrct2/ride/shops/meta/FoodStall.h b/src/openrct2/ride/shops/meta/FoodStall.h index 0433b45806..c357df56dc 100644 --- a/src/openrct2/ride/shops/meta/FoodStall.h +++ b/src/openrct2/ride/shops/meta/FoodStall.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor FoodStallRTD = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN, .RideModes = EnumsToFlags(RideMode::ShopStall), .DefaultMode = RideMode::ShopStall, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_FOOD_STALL, STR_RIDE_DESCRIPTION_FOOD_STALL }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_FOOD_STALL), diff --git a/src/openrct2/ride/shops/meta/InformationKiosk.h b/src/openrct2/ride/shops/meta/InformationKiosk.h index 487d0f9b62..836abeac2c 100644 --- a/src/openrct2/ride/shops/meta/InformationKiosk.h +++ b/src/openrct2/ride/shops/meta/InformationKiosk.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor InformationKioskRTD = RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::ShopStall), .DefaultMode = RideMode::ShopStall, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_INFORMATION_KIOSK, STR_RIDE_DESCRIPTION_INFORMATION_KIOSK }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_INFORMATION_KIOSK), diff --git a/src/openrct2/ride/shops/meta/Shop.h b/src/openrct2/ride/shops/meta/Shop.h index 59d1edab31..cc4dfb1dfb 100644 --- a/src/openrct2/ride/shops/meta/Shop.h +++ b/src/openrct2/ride/shops/meta/Shop.h @@ -30,7 +30,6 @@ constexpr RideTypeDescriptor ShopRTD = RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::ShopStall), .DefaultMode = RideMode::ShopStall, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_SHOP, STR_RIDE_DESCRIPTION_SHOP }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SHOP), diff --git a/src/openrct2/ride/shops/meta/Toilets.h b/src/openrct2/ride/shops/meta/Toilets.h index 8514e061a7..b5b254f379 100644 --- a/src/openrct2/ride/shops/meta/Toilets.h +++ b/src/openrct2/ride/shops/meta/Toilets.h @@ -30,7 +30,7 @@ constexpr RideTypeDescriptor ToiletsRTD = RIDE_TYPE_FLAG_IS_TOILET | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::ShopStall), .DefaultMode = RideMode::ShopStall, - .OperatingSettings = { 4, 4, 0, 0, 0, 0 }, + .OperatingSettings = { 4, 4 }, .Naming = { STR_RIDE_NAME_TOILETS, STR_RIDE_DESCRIPTION_TOILETS }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_TOILETS), diff --git a/src/openrct2/ride/thrill/3dCinema.cpp b/src/openrct2/ride/thrill/3dCinema.cpp index 00308f6f1a..085a5217fb 100644 --- a/src/openrct2/ride/thrill/3dCinema.cpp +++ b/src/openrct2/ride/thrill/3dCinema.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -62,10 +64,10 @@ static void Paint3dCinema( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, stationColour, height, fenceSpritesRope, + session, edges, session.MapPosition, trackElement, ride, stationColour, height, kFenceSpritesRope, session.CurrentRotation); switch (trackSequence) @@ -114,7 +116,7 @@ static void Paint3dCinema( PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); } TRACK_PAINT_FUNCTION GetTrackPaintFunction3dCinema(int32_t trackType) diff --git a/src/openrct2/ride/thrill/Enterprise.cpp b/src/openrct2/ride/thrill/Enterprise.cpp index 4287d5e20f..d8a9e2f47d 100644 --- a/src/openrct2/ride/thrill/Enterprise.cpp +++ b/src/openrct2/ride/thrill/Enterprise.cpp @@ -13,6 +13,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -100,10 +102,10 @@ static void PaintEnterprise( GetStationColourScheme(session, trackElement)); const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, session.TrackColours, height, fenceSpritesRope, + session, edges, session.MapPosition, trackElement, ride, session.TrackColours, height, kFenceSpritesRope, session.CurrentRotation); switch (trackSequence) @@ -167,7 +169,7 @@ static void PaintEnterprise( } PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 160, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 160); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionEnterprise(int32_t trackType) diff --git a/src/openrct2/ride/thrill/GoKarts.cpp b/src/openrct2/ride/thrill/GoKarts.cpp index ce4b70b20d..b9643c8baf 100644 --- a/src/openrct2/ride/thrill/GoKarts.cpp +++ b/src/openrct2/ride/thrill/GoKarts.cpp @@ -11,12 +11,17 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" #include "../VehiclePaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + enum { SPR_GO_KARTS_FLAT_SW_NE = 20752, @@ -138,7 +143,7 @@ static void PaintGoKartsTrackFlat( imageId = session.TrackColours.WithIndex(SPR_GO_KARTS_FLAT_FRONT_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 29, height + 2 }, { 32, 1, 3 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } else { @@ -148,14 +153,14 @@ static void PaintGoKartsTrackFlat( imageId = session.TrackColours.WithIndex(SPR_GO_KARTS_FLAT_FRONT_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 29, 0, height + 2 }, { 1, 32, 3 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0074A758 */ @@ -189,27 +194,27 @@ static void PaintGoKartsTrack25DegUp( session.WoodenSupportsPrependTo = ps; WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x0074A768 */ @@ -243,27 +248,27 @@ static void PaintGoKartsTrackFlatTo25DegUp( session.WoodenSupportsPrependTo = ps; WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x */ @@ -297,28 +302,28 @@ static void PaintGoKartsTrack25DegUpToFlat( session.WoodenSupportsPrependTo = ps; WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::_14); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::_14); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x0074A788 */ @@ -388,13 +393,13 @@ static void PaintGoKartsStation( { PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 29, height + 2 }, { 32, 1, 3 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } else { PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 29, 0, height + 2 }, { 1, 32, 3 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } if (direction == 0 || direction == 2) @@ -450,10 +455,10 @@ static void PaintGoKartsStation( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0074A7E8 */ @@ -509,22 +514,22 @@ static void PaintGoKartsTrackLeftQuarterTurn1Tile( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0074A7F8 */ diff --git a/src/openrct2/ride/thrill/LaunchedFreefall.cpp b/src/openrct2/ride/thrill/LaunchedFreefall.cpp index 21609df0b5..1e00aaa939 100644 --- a/src/openrct2/ride/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/ride/thrill/LaunchedFreefall.cpp @@ -8,10 +8,12 @@ *****************************************************************************/ #include "../../common.h" -#include "../../config/Config.h" #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" @@ -101,10 +103,10 @@ static void PaintLaunchedFreefallBase( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, floorSpritesMetal, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, kFloorSpritesMetal, stationObject); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, session.TrackColours, height, fenceSpritesMetal, + session, edges, session.MapPosition, trackElement, ride, session.TrackColours, height, kFenceSpritesMetal, session.CurrentRotation); if (trackSequence == 0) @@ -167,7 +169,7 @@ static void PaintLaunchedFreefallBase( } PaintUtilSetSegmentSupportHeight(session, blockedSegments, 0xFFFF, 0); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~blockedSegments, height + 2, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x006FD208 */ @@ -193,7 +195,7 @@ static void PaintLaunchedFreefallTowerSection( PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetVerticalTunnel(session, height + 32); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index 1d0a5aad99..8b6c71b4da 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -13,6 +13,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -261,7 +263,7 @@ static void PaintMagicCarpet( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 176, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 176); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionMagicCarpet(int32_t trackType) diff --git a/src/openrct2/ride/thrill/MotionSimulator.cpp b/src/openrct2/ride/thrill/MotionSimulator.cpp index 3232d8a462..f61f617be5 100644 --- a/src/openrct2/ride/thrill/MotionSimulator.cpp +++ b/src/openrct2/ride/thrill/MotionSimulator.cpp @@ -12,6 +12,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -114,10 +116,10 @@ static void PaintMotionSimulator( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, session.SupportColours, height, fenceSpritesRope, + session, edges, session.MapPosition, trackElement, ride, session.SupportColours, height, kFenceSpritesRope, session.CurrentRotation); switch (trackSequence) @@ -134,7 +136,7 @@ static void PaintMotionSimulator( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 128); } /** diff --git a/src/openrct2/ride/thrill/RotoDrop.cpp b/src/openrct2/ride/thrill/RotoDrop.cpp index 94ba0e030c..e200f36225 100644 --- a/src/openrct2/ride/thrill/RotoDrop.cpp +++ b/src/openrct2/ride/thrill/RotoDrop.cpp @@ -11,6 +11,9 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" @@ -113,10 +116,10 @@ static void PaintRotoDropBase( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, floorSpritesMetalB, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, kFloorSpritesMetalB, stationObject); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, session.TrackColours, height, fenceSpritesMetalB, + session, edges, session.MapPosition, trackElement, ride, session.TrackColours, height, kFenceSpritesMetalB, session.CurrentRotation); if (trackSequence == 0) @@ -136,7 +139,7 @@ static void PaintRotoDropBase( PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 96); return; } @@ -180,7 +183,7 @@ static void PaintRotoDropBase( } PaintUtilSetSegmentSupportHeight(session, blockedSegments, 0xFFFF, 0); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~blockedSegments, height + 2, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008861A4 */ @@ -214,7 +217,7 @@ static void PaintRotoDropTowerSection( PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetVerticalTunnel(session, height + 32); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index d69711b76f..45286f0f0f 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -13,6 +13,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -194,7 +196,7 @@ static void PaintSwingingInverterShip( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 176, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 176); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionSwingingInverterShip(int32_t trackType) diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index 0ffa116d77..6e14dd7f31 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -13,6 +13,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -307,7 +309,7 @@ static void PaintSwingingShip( break; } - PaintUtilSetGeneralSupportHeight(session, height + 112, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 112); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionSwingingShip(int32_t trackType) diff --git a/src/openrct2/ride/thrill/TopSpin.cpp b/src/openrct2/ride/thrill/TopSpin.cpp index 4f5210d749..f8c4c47e70 100644 --- a/src/openrct2/ride/thrill/TopSpin.cpp +++ b/src/openrct2/ride/thrill/TopSpin.cpp @@ -13,6 +13,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" @@ -192,10 +194,10 @@ static void PaintTopSpin( const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, stationColour, height, fenceSpritesRope, + session, edges, session.MapPosition, trackElement, ride, stationColour, height, kFenceSpritesRope, session.CurrentRotation); switch (trackSequence) @@ -244,7 +246,7 @@ static void PaintTopSpin( PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 112, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 112); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionTopspin(int32_t trackType) diff --git a/src/openrct2/ride/thrill/Twist.cpp b/src/openrct2/ride/thrill/Twist.cpp index b8d00d1882..f61e8074d5 100644 --- a/src/openrct2/ride/thrill/Twist.cpp +++ b/src/openrct2/ride/thrill/Twist.cpp @@ -13,6 +13,8 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../Ride.h" #include "../RideEntry.h" #include "../Track.h" @@ -96,7 +98,7 @@ static void PaintTwist( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, stationColour); const StationObject* stationObject = ride.GetStationObject(); - TrackPaintUtilPaintFloor(session, edges, stationColour, height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, stationColour, height, kFloorSpritesCork, stationObject); switch (trackSequence) { @@ -115,7 +117,7 @@ static void PaintTwist( default: TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, GetStationColourScheme(session, trackElement), height, - fenceSpritesRope, session.CurrentRotation); + kFenceSpritesRope, session.CurrentRotation); break; } @@ -161,7 +163,7 @@ static void PaintTwist( PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~cornerSegments, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** diff --git a/src/openrct2/ride/thrill/meta/3DCinema.h b/src/openrct2/ride/thrill/meta/3DCinema.h index 3f702f2e77..855a1670e9 100644 --- a/src/openrct2/ride/thrill/meta/3DCinema.h +++ b/src/openrct2/ride/thrill/meta/3DCinema.h @@ -32,7 +32,6 @@ constexpr RideTypeDescriptor CinemaRTD = RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::MouseTails3DFilm, RideMode::StormChasers3DFilm, RideMode::SpaceRaiders3DFilm), .DefaultMode = RideMode::MouseTails3DFilm, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_3D_CINEMA, STR_RIDE_DESCRIPTION_3D_CINEMA }, .NameConvention = { RideComponentType::Building, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_3D_CINEMA), diff --git a/src/openrct2/ride/thrill/meta/Enterprise.h b/src/openrct2/ride/thrill/meta/Enterprise.h index 0938e9e502..373ea482ff 100644 --- a/src/openrct2/ride/thrill/meta/Enterprise.h +++ b/src/openrct2/ride/thrill/meta/Enterprise.h @@ -31,7 +31,7 @@ constexpr RideTypeDescriptor EnterpriseRTD = RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::Rotation), .DefaultMode = RideMode::Rotation, - .OperatingSettings = { 10, 20, 0, 0, 0, 0 }, + .OperatingSettings = { 10, 20 }, .Naming = { STR_RIDE_NAME_ENTERPRISE, STR_RIDE_DESCRIPTION_ENTERPRISE }, .NameConvention = { RideComponentType::Wheel, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_ENTERPRISE), diff --git a/src/openrct2/ride/thrill/meta/GoKarts.h b/src/openrct2/ride/thrill/meta/GoKarts.h index e60ed3a9aa..d69cec500f 100644 --- a/src/openrct2/ride/thrill/meta/GoKarts.h +++ b/src/openrct2/ride/thrill/meta/GoKarts.h @@ -31,7 +31,7 @@ constexpr RideTypeDescriptor GoKartsRTD = RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::Race, RideMode::ContinuousCircuit), .DefaultMode = RideMode::Race, - .OperatingSettings = { 1, 10, 0, 0, 0, 0 }, + .OperatingSettings = { 1, 10 }, .Naming = { STR_RIDE_NAME_GO_KARTS, STR_RIDE_DESCRIPTION_GO_KARTS }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_GO_KARTS), diff --git a/src/openrct2/ride/thrill/meta/LaunchedFreefall.h b/src/openrct2/ride/thrill/meta/LaunchedFreefall.h index 2a94f42dac..2248acbc07 100644 --- a/src/openrct2/ride/thrill/meta/LaunchedFreefall.h +++ b/src/openrct2/ride/thrill/meta/LaunchedFreefall.h @@ -31,7 +31,7 @@ constexpr RideTypeDescriptor LaunchedFreefallRTD = RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::UpwardLaunch, RideMode::DownwardLaunch), .DefaultMode = RideMode::UpwardLaunch, - .OperatingSettings = { 10, 40, 0, 0, 0, 0 }, + .OperatingSettings = { 10, 40 }, .Naming = { STR_RIDE_NAME_LAUNCHED_FREEFALL, STR_RIDE_DESCRIPTION_LAUNCHED_FREEFALL }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_LAUNCHED_FREEFALL), diff --git a/src/openrct2/ride/thrill/meta/MagicCarpet.h b/src/openrct2/ride/thrill/meta/MagicCarpet.h index 75632aa03f..1e8c8647db 100644 --- a/src/openrct2/ride/thrill/meta/MagicCarpet.h +++ b/src/openrct2/ride/thrill/meta/MagicCarpet.h @@ -32,7 +32,7 @@ constexpr RideTypeDescriptor MagicCarpetRTD = RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::Swing), .DefaultMode = RideMode::Swing, - .OperatingSettings = { 7, 15, 0, 0, 0, 0 }, + .OperatingSettings = { 7, 15 }, .Naming = { STR_RIDE_NAME_MAGIC_CARPET, STR_RIDE_DESCRIPTION_MAGIC_CARPET }, .NameConvention = { RideComponentType::Car, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MAGIC_CARPET), diff --git a/src/openrct2/ride/thrill/meta/MotionSimulator.h b/src/openrct2/ride/thrill/meta/MotionSimulator.h index ce95c26e34..b70fa1488e 100644 --- a/src/openrct2/ride/thrill/meta/MotionSimulator.h +++ b/src/openrct2/ride/thrill/meta/MotionSimulator.h @@ -31,7 +31,6 @@ constexpr RideTypeDescriptor MotionSimulatorRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::FilmAvengingAviators, RideMode::FilmThrillRiders), .DefaultMode = RideMode::FilmAvengingAviators, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MOTION_SIMULATOR, STR_RIDE_DESCRIPTION_MOTION_SIMULATOR }, .NameConvention = { RideComponentType::Car, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MOTION_SIMULATOR), diff --git a/src/openrct2/ride/thrill/meta/RotoDrop.h b/src/openrct2/ride/thrill/meta/RotoDrop.h index 6a8dbbd8c8..9d36ccfd1e 100644 --- a/src/openrct2/ride/thrill/meta/RotoDrop.h +++ b/src/openrct2/ride/thrill/meta/RotoDrop.h @@ -32,7 +32,6 @@ constexpr RideTypeDescriptor RotoDropRTD = RIDE_TYPE_FLAG_SINGLE_SESSION | RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::FreefallDrop), .DefaultMode = RideMode::FreefallDrop, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_ROTO_DROP, STR_RIDE_DESCRIPTION_ROTO_DROP }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_ROTO_DROP), diff --git a/src/openrct2/ride/thrill/meta/SwingingInverterShip.h b/src/openrct2/ride/thrill/meta/SwingingInverterShip.h index 6717feefb1..cdbdfb7d24 100644 --- a/src/openrct2/ride/thrill/meta/SwingingInverterShip.h +++ b/src/openrct2/ride/thrill/meta/SwingingInverterShip.h @@ -32,7 +32,7 @@ constexpr RideTypeDescriptor SwingingInverterShipRTD = RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::Swing), .DefaultMode = RideMode::Swing, - .OperatingSettings = { 7, 15, 0, 0, 0, 0 }, + .OperatingSettings = { 7, 15 }, .Naming = { STR_RIDE_NAME_SWINGING_INVERTER_SHIP, STR_RIDE_DESCRIPTION_SWINGING_INVERTER_SHIP }, .NameConvention = { RideComponentType::Ship, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SWINGING_INVERTER_SHIP), diff --git a/src/openrct2/ride/thrill/meta/SwingingShip.h b/src/openrct2/ride/thrill/meta/SwingingShip.h index eda2505d40..1d1a852eec 100644 --- a/src/openrct2/ride/thrill/meta/SwingingShip.h +++ b/src/openrct2/ride/thrill/meta/SwingingShip.h @@ -33,7 +33,7 @@ constexpr RideTypeDescriptor SwingingShipRTD = RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::Swing), .DefaultMode = RideMode::Swing, - .OperatingSettings = { 7, 25, 0, 0, 0, 0 }, + .OperatingSettings = { 7, 25 }, .Naming = { STR_RIDE_NAME_SWINGING_SHIP, STR_RIDE_DESCRIPTION_SWINGING_SHIP }, .NameConvention = { RideComponentType::Ship, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SWINGING_SHIP), diff --git a/src/openrct2/ride/thrill/meta/TopSpin.h b/src/openrct2/ride/thrill/meta/TopSpin.h index 0bd85bc5fb..f8e98ccdba 100644 --- a/src/openrct2/ride/thrill/meta/TopSpin.h +++ b/src/openrct2/ride/thrill/meta/TopSpin.h @@ -32,7 +32,6 @@ constexpr RideTypeDescriptor TopSpinRTD = RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::Beginners, RideMode::Intense, RideMode::Berserk), .DefaultMode = RideMode::Beginners, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_TOP_SPIN, STR_RIDE_DESCRIPTION_TOP_SPIN }, .NameConvention = { RideComponentType::Car, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_TOP_SPIN), diff --git a/src/openrct2/ride/thrill/meta/Twist.h b/src/openrct2/ride/thrill/meta/Twist.h index a9e8462fd6..dcc5319bcf 100644 --- a/src/openrct2/ride/thrill/meta/Twist.h +++ b/src/openrct2/ride/thrill/meta/Twist.h @@ -30,7 +30,7 @@ constexpr RideTypeDescriptor TwistRTD = RIDE_TYPE_FLAG_SINGLE_SESSION | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, .RideModes = EnumsToFlags(RideMode::Rotation), .DefaultMode = RideMode::Rotation, - .OperatingSettings = { 3, 6, 0, 0, 0, 0, 12, 3 }, + .OperatingSettings = { 3, 6, 3 }, .Naming = { STR_RIDE_NAME_TWIST, STR_RIDE_DESCRIPTION_TWIST }, .NameConvention = { RideComponentType::Structure, RideComponentType::Structure, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_TWIST), diff --git a/src/openrct2/ride/transport/Chairlift.cpp b/src/openrct2/ride/transport/Chairlift.cpp index acaa3affce..9dd5f2eb57 100644 --- a/src/openrct2/ride/transport/Chairlift.cpp +++ b/src/openrct2/ride/transport/Chairlift.cpp @@ -11,6 +11,9 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../Ride.h" #include "../RideData.h" @@ -19,6 +22,8 @@ #include +static constexpr MetalSupportType kSupportType = MetalSupportType::Truss; + enum { SPR_CHAIRLIFT_CABLE_FLAT_SW_NE = 20500, @@ -90,7 +95,7 @@ static void ChairliftPaintUtilDrawSupports(PaintSession& session, int32_t segmen } if (MetalASupportsPaintSetup( - session, MetalSupportType::Truss, static_cast(s), 0, height, session.SupportColours)) + session, kSupportType, static_cast(s), 0, height, session.SupportColours)) { success = true; } @@ -110,8 +115,7 @@ static void ChairliftPaintUtilDrawSupports(PaintSession& session, int32_t segmen } uint16_t temp = supportSegments[s].height; supportSegments[s].height = session.Support.height; - MetalASupportsPaintSetup( - session, MetalSupportType::Truss, static_cast(s), 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, static_cast(s), 0, height, session.SupportColours); supportSegments[s].height = temp; } } @@ -267,8 +271,8 @@ static void ChairliftPaintStationNeSw( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void ChairliftPaintStationSeNw( @@ -360,11 +364,11 @@ static void ChairliftPaintStationSeNw( PaintAddImageAsParent( session, imageId, { 16, 30, height + 2 }, { { 16, 1, height + 2 }, { 1, 1, 7 } }); // bound offset x is wrong? - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00744068 */ @@ -391,17 +395,17 @@ static void ChairliftPaintFlat( { imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_CABLE_FLAT_SE_NW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 13, 0, height + 28 }, { 6, 32, 2 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_CABLE_FLAT_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 13, height + 28 }, { 32, 6, 2 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00743FD8 */ @@ -416,30 +420,30 @@ static void ChairliftPaint25DegUp( case 0: imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_CABLE_UP_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 13, height + 28 }, { 32, 6, 2 } }); - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; case 1: imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_CABLE_UP_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 13, 0, height + 28 }, { 6, 32, 2 } }); - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 2: imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_CABLE_UP_NE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 13, height + 28 }, { 32, 6, 2 } }); - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_CABLE_UP_SE_NW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 13, 0, height + 28 }, { 6, 32, 2 } }); - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00743FD8 */ @@ -458,7 +462,7 @@ static void ChairliftPaintFlatTo25DegUp( imageId = session.SupportColours.WithIndex(SPR_20520); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 1 }, { 4, 4, 25 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: @@ -468,7 +472,7 @@ static void ChairliftPaintFlatTo25DegUp( imageId = session.SupportColours.WithIndex(SPR_20521); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 1 }, { 4, 4, 25 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 2: @@ -478,7 +482,7 @@ static void ChairliftPaintFlatTo25DegUp( imageId = session.SupportColours.WithIndex(SPR_20522); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 1 }, { 4, 4, 25 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; case 3: @@ -488,13 +492,13 @@ static void ChairliftPaintFlatTo25DegUp( imageId = session.SupportColours.WithIndex(SPR_20523); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 1 }, { 4, 4, 25 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } ChairliftPaintUtilDrawSupports(session, EnumToFlag(PaintSegment::centre), height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00743FF8 */ @@ -513,7 +517,7 @@ static void ChairliftPaint25DegUpToFlat( imageId = session.SupportColours.WithIndex(SPR_20524); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 1 }, { 4, 4, 25 } }); - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareFlat); break; case 1: @@ -523,7 +527,7 @@ static void ChairliftPaint25DegUpToFlat( imageId = session.SupportColours.WithIndex(SPR_20525); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 1 }, { 4, 4, 25 } }); - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::_14); break; case 2: @@ -533,7 +537,7 @@ static void ChairliftPaint25DegUpToFlat( imageId = session.SupportColours.WithIndex(SPR_20526); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 1 }, { 4, 4, 25 } }); - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::_14); break; case 3: @@ -543,13 +547,13 @@ static void ChairliftPaint25DegUpToFlat( imageId = session.SupportColours.WithIndex(SPR_20527); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 1 }, { 4, 4, 25 } }); - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareFlat); break; } ChairliftPaintUtilDrawSupports(session, EnumToFlag(PaintSegment::centre), height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x00744008 */ @@ -595,7 +599,7 @@ static void ChairliftPaintLeftQuarterTurn1Tile( imageId = session.SupportColours.WithIndex(SPR_20536); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 4, height }, { 2, 2, 27 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: @@ -619,7 +623,7 @@ static void ChairliftPaintLeftQuarterTurn1Tile( imageId = session.SupportColours.WithIndex(SPR_20538); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 16, 28, height }, { 2, 2, 27 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: @@ -632,8 +636,8 @@ static void ChairliftPaintLeftQuarterTurn1Tile( imageId = session.SupportColours.WithIndex(SPR_20539); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 16, 28, height }, { 2, 2, 27 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } @@ -642,7 +646,7 @@ static void ChairliftPaintLeftQuarterTurn1Tile( height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00744048 */ diff --git a/src/openrct2/ride/transport/Lift.cpp b/src/openrct2/ride/transport/Lift.cpp index 758a9a7981..76bd70e186 100644 --- a/src/openrct2/ride/transport/Lift.cpp +++ b/src/openrct2/ride/transport/Lift.cpp @@ -11,6 +11,9 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../Track.h" #include "../TrackPaint.h" @@ -63,7 +66,7 @@ static void PaintLiftBase( PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 96); return; } @@ -74,7 +77,7 @@ static void PaintLiftBase( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, session.TrackColours, height, fenceSpritesMetalB, + session, edges, session.MapPosition, trackElement, ride, session.TrackColours, height, kFenceSpritesMetalB, session.CurrentRotation); int32_t blockedSegments = 0; @@ -116,7 +119,7 @@ static void PaintLiftBase( } PaintUtilSetSegmentSupportHeight(session, blockedSegments, 0xFFFF, 0); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~blockedSegments, height + 2, 0x20); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0076C6DC */ @@ -134,7 +137,7 @@ static void PaintLiftTowerSection( PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetVerticalTunnel(session, height + 32); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/transport/MiniatureRailway.cpp b/src/openrct2/ride/transport/MiniatureRailway.cpp index 31d6789124..a058bb12d8 100644 --- a/src/openrct2/ride/transport/MiniatureRailway.cpp +++ b/src/openrct2/ride/transport/MiniatureRailway.cpp @@ -11,6 +11,9 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" @@ -18,6 +21,8 @@ #include "../TrackPaint.h" #include "../VehiclePaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + enum { SPR_MINIATURE_RAILWAY_FLAT_SW_NE = 23341, @@ -636,7 +641,7 @@ static void PaintMiniatureRailwayTrackFlat( } bool isSupported = WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); ImageId imageId, imageIdAlt; // In the following 3 calls to PaintAddImageAsParentRotated/PaintAddImageAsChildRotated, we add 1 to the @@ -693,10 +698,10 @@ static void PaintMiniatureRailwayTrackFlat( } } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD170, 0x008AD180, 0x008AD190 */ @@ -707,7 +712,7 @@ static void PaintMiniatureRailwayStation( ImageId imageId; WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, 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 } }); @@ -715,13 +720,13 @@ static void PaintMiniatureRailwayStation( imageId = session.TrackColours.WithIndex(miniature_railway_track_pieces_flat_station[direction]); PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 2 } }); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); // covers shouldn't be offset by +2 PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 30, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 30); } /** rct2: 0x008AD0D0 */ @@ -736,25 +741,25 @@ static void PaintMiniatureRailwayTrack25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegRailway); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AD0E0 */ @@ -769,25 +774,25 @@ static void PaintMiniatureRailwayTrackFlatTo25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25DegRailway); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AD0F0 */ @@ -802,25 +807,25 @@ static void PaintMiniatureRailwayTrack25DegUpToFlat( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::_14); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::_14); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlatRailway); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008AD100 */ @@ -995,7 +1000,7 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn5Tiles( if (right_quarter_turn_5_supports_type[direction][trackSequence] != WoodenSupportSubType::Null) { bool isSupported = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, right_quarter_turn_5_supports_type[direction][trackSequence], height, + session, kSupportType, right_quarter_turn_5_supports_type[direction][trackSequence], height, session.SupportColours); if (!isSupported || (trackSequence == 3 && direction == 2)) @@ -1026,22 +1031,22 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn5Tiles( } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } int32_t blockedSegments = 0; @@ -1079,7 +1084,7 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD130 */ @@ -1087,11 +1092,11 @@ static void PaintMiniatureRailwayTrackLeftQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; PaintMiniatureRailwayTrackRightQuarterTurn5Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static constexpr WoodenSupportSubType s_bend_left_supports_type[NumOrthogonalDirections][4] = { +static constexpr WoodenSupportSubType s_bend_left_supports_type[kNumOrthogonalDirections][4] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::Corner3, WoodenSupportSubType::Corner1, WoodenSupportSubType::NeSw }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::Corner0, WoodenSupportSubType::Corner2, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::NeSw, WoodenSupportSubType::Corner3, WoodenSupportSubType::Corner1, WoodenSupportSubType::NeSw }, @@ -1124,7 +1129,7 @@ static void PaintMiniatureRailwayTrackSBendLeft( } bool isSupported = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, s_bend_left_supports_type[direction][trackSequence], height, session.SupportColours); + session, kSupportType, s_bend_left_supports_type[direction][trackSequence], height, session.SupportColours); static constexpr CoordsXY offsetList[] = { { 0, 2 }, @@ -1166,14 +1171,14 @@ static void PaintMiniatureRailwayTrackSBendLeft( { if (trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } } else { if (trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } } @@ -1199,10 +1204,10 @@ static void PaintMiniatureRailwayTrackSBendLeft( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction & 1), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } -static constexpr WoodenSupportSubType s_bend_right_supports_type[NumOrthogonalDirections][4] = { +static constexpr WoodenSupportSubType s_bend_right_supports_type[kNumOrthogonalDirections][4] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, WoodenSupportSubType::NeSw }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::Corner3, WoodenSupportSubType::Corner1, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::NeSw, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, WoodenSupportSubType::NeSw }, @@ -1235,8 +1240,7 @@ static void PaintMiniatureRailwayTrackSBendRight( } bool isSupported = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, s_bend_right_supports_type[direction][trackSequence], height, - session.SupportColours); + session, kSupportType, s_bend_right_supports_type[direction][trackSequence], height, session.SupportColours); static constexpr CoordsXY offsetList[] = { { 0, 2 }, @@ -1278,14 +1282,14 @@ static void PaintMiniatureRailwayTrackSBendRight( { if (trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } } else { if (trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } } @@ -1311,7 +1315,7 @@ static void PaintMiniatureRailwayTrackSBendRight( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction & 1), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr uint32_t miniature_railway_right_quarter_turn_3_tile_track_floor[4][3] = { @@ -1369,7 +1373,7 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn3Tiles( if (trackSequence != 1 && trackSequence != 2) { isSupported = WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); } if (!isSupported) { @@ -1403,7 +1407,7 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn3Tiles( PaintAddImageAsChild( session, imageId, { offset, height }, { boundsOffset + CoordsXYZ{ 0, 0, height }, { boundsLength, 3 } }); } - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::SquareFlat); int32_t blockedSegments = 0; switch (trackSequence) @@ -1421,7 +1425,7 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn3Tiles( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD1A0 */ @@ -1429,7 +1433,7 @@ static void PaintMiniatureRailwayTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; PaintMiniatureRailwayTrackRightQuarterTurn3Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -1535,7 +1539,7 @@ static void PaintMiniatureRailwayTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr WoodenSupportSubType supportType[NumOrthogonalDirections][5] = { + static constexpr WoodenSupportSubType supportType[kNumOrthogonalDirections][5] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::NeSw, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner3, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::NwSe, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, @@ -1553,7 +1557,7 @@ static void PaintMiniatureRailwayTrackLeftEighthToDiag( if (trackSequence != 4 || !isRightEighthToOrthog) { isSupported = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType[direction][trackSequence], height, session.SupportColours); + session, kSupportType, supportType[direction][trackSequence], height, session.SupportColours); } ImageId imageId; if (!isSupported) @@ -1592,15 +1596,15 @@ static void PaintMiniatureRailwayTrackLeftEighthToDiag( if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr uint32_t miniature_railway_floor_track_pieces_right_eight_to_diag[4][5] = { @@ -1701,7 +1705,7 @@ static void PaintMiniatureRailwayTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr WoodenSupportSubType supportType[NumOrthogonalDirections][5] = { + static constexpr WoodenSupportSubType supportType[kNumOrthogonalDirections][5] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::NeSw, WoodenSupportSubType::Corner0, WoodenSupportSubType::Corner2, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::NwSe, WoodenSupportSubType::NwSe, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner3, @@ -1719,7 +1723,7 @@ static void PaintMiniatureRailwayTrackRightEighthToDiag( if (trackSequence != 4 || !isLeftEighthToOrthog) { isSupported = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType[direction][trackSequence], height, session.SupportColours); + session, kSupportType, supportType[direction][trackSequence], height, session.SupportColours); } ImageId imageId; @@ -1759,15 +1763,15 @@ static void PaintMiniatureRailwayTrackRightEighthToDiag( if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD1E0 */ @@ -1788,14 +1792,7 @@ static void PaintMiniatureRailwayTrackRightEighthToOrthogonal( PaintMiniatureRailwayTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } -static constexpr bool miniature_railway_diag_image_segment[][4] = { - { false, true, false, false }, - { false, false, false, true }, - { false, false, true, false }, - { true, false, false, false }, -}; - -static constexpr WoodenSupportSubType _diagSupportTypes[NumOrthogonalDirections][4] = { +static constexpr WoodenSupportSubType _diagSupportTypes[kNumOrthogonalDirections][4] = { { WoodenSupportSubType::Null, WoodenSupportSubType::Corner0, WoodenSupportSubType::Corner2, WoodenSupportSubType::NeSw }, { WoodenSupportSubType::Null, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner3, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, WoodenSupportSubType::NeSw }, @@ -1836,7 +1833,7 @@ static void MiniatureRailwayTrackDiagFlat( floorImage = floors[enumValue].image_id; floorBoundSize = floors[enumValue].bound_size; floorBoundOffset = floors[enumValue].bound_offset; - isSupported = WoodenASupportsPaintSetup(session, WoodenSupportType::Truss, supportType, height, session.SupportColours); + isSupported = WoodenASupportsPaintSetup(session, kSupportType, supportType, height, session.SupportColours); } if (direction == 1 && trackSequence == 3) @@ -1845,7 +1842,7 @@ static void MiniatureRailwayTrackDiagFlat( } uint32_t imageId = miniature_railway_track_pieces_diag_flat[direction]; - bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; + bool drawRail = kDiagSpriteMap[direction][trackSequence]; if (isSupported) { @@ -1866,7 +1863,7 @@ static void MiniatureRailwayTrackDiagFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD230 */ @@ -1898,12 +1895,12 @@ static void MiniatureRailwayTrackDiag25DegUp( if (trackSequence == 3) { hasSupports = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType, height + heightDiff, session.SupportColours); + session, kSupportType, supportType, height + heightDiff, session.SupportColours); } else { hasSupports = WoodenBSupportsPaintSetup( - session, WoodenSupportType::Truss, supportType, height + heightDiff, session.SupportColours); + session, kSupportType, supportType, height + heightDiff, session.SupportColours); } } @@ -1925,7 +1922,7 @@ static void MiniatureRailwayTrackDiag25DegUp( }; uint32_t imageId = miniature_railway_track_pieces_diag_25_deg_up[direction]; - bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; + bool drawRail = kDiagSpriteMap[direction][trackSequence]; static constexpr int8_t offsetB[] = { +8, 0, +8, +8 }; if (hasSupports) { @@ -1947,7 +1944,7 @@ static void MiniatureRailwayTrackDiag25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AD210 */ @@ -1968,7 +1965,7 @@ static void MiniatureRailwayTrackDiagFlatTo25DegUp( floorImage = floors[enumValue].image_id; floorBoundSize = floors[enumValue].bound_size; floorBoundOffset = floors[enumValue].bound_offset; - hasSupports = WoodenASupportsPaintSetup(session, WoodenSupportType::Truss, supportType, height, session.SupportColours); + hasSupports = WoodenASupportsPaintSetup(session, kSupportType, supportType, height, session.SupportColours); } if (direction == 1 && trackSequence == 3) @@ -1977,7 +1974,7 @@ static void MiniatureRailwayTrackDiagFlatTo25DegUp( } uint32_t imageId = miniature_railway_track_pieces_diag_flat_to_25_deg_up[direction]; - bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; + bool drawRail = kDiagSpriteMap[direction][trackSequence]; if (hasSupports) { @@ -1998,7 +1995,7 @@ static void MiniatureRailwayTrackDiagFlatTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AD220 */ @@ -2029,14 +2026,12 @@ static void MiniatureRailwayTrackDiag25DegUpToFlat( if (trackSequence == 3) { hasSupports = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType, height + supportOffsets[direction][trackSequence], - session.SupportColours); + session, kSupportType, supportType, height + supportOffsets[direction][trackSequence], session.SupportColours); } else { hasSupports = WoodenBSupportsPaintSetup( - session, WoodenSupportType::Truss, supportType, height + supportOffsets[direction][trackSequence], - session.SupportColours); + session, kSupportType, supportType, height + supportOffsets[direction][trackSequence], session.SupportColours); } } @@ -2053,7 +2048,7 @@ static void MiniatureRailwayTrackDiag25DegUpToFlat( }; uint32_t imageId = miniature_railway_track_pieces_diag_25_deg_up_to_flat[direction]; - bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; + bool drawRail = kDiagSpriteMap[direction][trackSequence]; static constexpr int8_t railOffsets[] = { +8, 0, +8, +8 }; @@ -2077,7 +2072,7 @@ static void MiniatureRailwayTrackDiag25DegUpToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AD260 */ @@ -2108,14 +2103,12 @@ static void MiniatureRailwayTrackDiag25DegDown( if (trackSequence == 3) { hasSupports = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType, height + supportOffsets[direction][trackSequence], - session.SupportColours); + session, kSupportType, supportType, height + supportOffsets[direction][trackSequence], session.SupportColours); } else { hasSupports = WoodenBSupportsPaintSetup( - session, WoodenSupportType::Truss, supportType, height + supportOffsets[direction][trackSequence], - session.SupportColours); + session, kSupportType, supportType, height + supportOffsets[direction][trackSequence], session.SupportColours); } } @@ -2125,7 +2118,7 @@ static void MiniatureRailwayTrackDiag25DegDown( } uint32_t imageId = miniature_railway_track_pieces_diag_25_deg_up[(direction + 2) % 4]; - bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; + bool drawRail = kDiagSpriteMap[direction][trackSequence]; static constexpr int8_t railOffsets[] = { 0, +8, +8, +8 }; static constexpr int8_t offsetsB[4][4][2] = { @@ -2155,7 +2148,7 @@ static void MiniatureRailwayTrackDiag25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AD240 */ @@ -2185,14 +2178,12 @@ static void MiniatureRailwayTrackDiagFlatTo25DegDown( if (trackSequence == 3) { hasSupports = WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportType, height + supportOffsets[direction][trackSequence], - session.SupportColours); + session, kSupportType, supportType, height + supportOffsets[direction][trackSequence], session.SupportColours); } else { hasSupports = WoodenBSupportsPaintSetup( - session, WoodenSupportType::Truss, supportType, height + supportOffsets[direction][trackSequence], - session.SupportColours); + session, kSupportType, supportType, height + supportOffsets[direction][trackSequence], session.SupportColours); } } @@ -2209,7 +2200,7 @@ static void MiniatureRailwayTrackDiagFlatTo25DegDown( }; uint32_t imageId = miniature_railway_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4]; - bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; + bool drawRail = kDiagSpriteMap[direction][trackSequence]; static constexpr int8_t railOffsets[] = { 0, +8, +8, +8 }; if (hasSupports) @@ -2232,7 +2223,7 @@ static void MiniatureRailwayTrackDiagFlatTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void MiniatureRailwayTrackDiag25DegDownToFlat( @@ -2251,7 +2242,7 @@ static void MiniatureRailwayTrackDiag25DegDownToFlat( floorImage = floors[enumValue].image_id; floorBoundSize = floors[enumValue].bound_size; floorBoundOffset = floors[enumValue].bound_offset; - hasSupports = WoodenASupportsPaintSetup(session, WoodenSupportType::Truss, supportType, height, session.SupportColours); + hasSupports = WoodenASupportsPaintSetup(session, kSupportType, supportType, height, session.SupportColours); } if (direction == 1 && trackSequence == 3) @@ -2260,7 +2251,7 @@ static void MiniatureRailwayTrackDiag25DegDownToFlat( } uint32_t imageId = miniature_railway_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4]; - bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; + bool drawRail = kDiagSpriteMap[direction][trackSequence]; if (hasSupports) { @@ -2281,7 +2272,7 @@ static void MiniatureRailwayTrackDiag25DegDownToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 590907ce4f..c5774d2f9e 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -13,12 +13,17 @@ #include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../world/Map.h" #include "../RideData.h" #include "../Track.h" #include "../TrackPaint.h" #include "../VehiclePaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Boxed; + enum { SPR_MONORAIL_FLAT_SW_NE = 23231, @@ -133,14 +138,14 @@ enum SPR_MONORAIL_DIAG_25_DEG_UP_S_N = 23340, }; -static constexpr uint32_t monorail_track_pieces_flat[4] = { +static constexpr uint32_t monorail_track_pieces_flat[kNumOrthogonalDirections] = { SPR_MONORAIL_FLAT_SW_NE, SPR_MONORAIL_FLAT_NW_SE, SPR_MONORAIL_FLAT_SW_NE, SPR_MONORAIL_FLAT_NW_SE, }; -static constexpr uint32_t monorail_track_pieces_flat_quarter_turn_5_tiles[4][5] = { +static constexpr uint32_t monorail_track_pieces_flat_quarter_turn_5_tiles[kNumOrthogonalDirections][5] = { { SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_0, SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_1, @@ -171,28 +176,28 @@ static constexpr uint32_t monorail_track_pieces_flat_quarter_turn_5_tiles[4][5] }, }; -static constexpr uint32_t monorail_track_pieces_25_deg_up[4] = { +static constexpr uint32_t monorail_track_pieces_25_deg_up[kNumOrthogonalDirections] = { SPR_MONORAIL_25_DEG_UP_SW_NE, SPR_MONORAIL_25_DEG_UP_NW_SE, SPR_MONORAIL_25_DEG_UP_NE_SW, SPR_MONORAIL_25_DEG_UP_SE_NW, }; -static constexpr uint32_t monorail_track_pieces_flat_to_25_deg_up[4] = { +static constexpr uint32_t monorail_track_pieces_flat_to_25_deg_up[kNumOrthogonalDirections] = { SPR_MONORAIL_FLAT_TO_25_DEG_UP_SW_NE, SPR_MONORAIL_FLAT_TO_25_DEG_UP_NW_SE, SPR_MONORAIL_FLAT_TO_25_DEG_UP_NE_SW, SPR_MONORAIL_FLAT_TO_25_DEG_UP_SE_NW, }; -static constexpr uint32_t monorail_track_pieces_25_deg_up_to_flat[4] = { +static constexpr uint32_t monorail_track_pieces_25_deg_up_to_flat[kNumOrthogonalDirections] = { SPR_MONORAIL_25_DEG_UP_TO_FLAT_SW_NE, SPR_MONORAIL_25_DEG_UP_TO_FLAT_NW_SE, SPR_MONORAIL_25_DEG_UP_TO_FLAT_NE_SW, SPR_MONORAIL_25_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr uint32_t monorail_track_pieces_s_bend_left[2][4] = { +static constexpr uint32_t monorail_track_pieces_s_bend_left[2][kNumOrthogonalDirections] = { { SPR_MONORAIL_S_BEND_LEFT_SW_NE_PART_0, SPR_MONORAIL_S_BEND_LEFT_SW_NE_PART_1, @@ -207,7 +212,7 @@ static constexpr uint32_t monorail_track_pieces_s_bend_left[2][4] = { }, }; -static constexpr uint32_t monorail_track_pieces_s_bend_right[2][4] = { +static constexpr uint32_t monorail_track_pieces_s_bend_right[2][kNumOrthogonalDirections] = { { SPR_MONORAIL_S_BEND_RIGHT_SW_NE_PART_0, SPR_MONORAIL_S_BEND_RIGHT_SW_NE_PART_1, @@ -222,7 +227,7 @@ static constexpr uint32_t monorail_track_pieces_s_bend_right[2][4] = { }, }; -static constexpr uint32_t monorail_track_pieces_flat_quarter_turn_3_tiles[4][3] = { +static constexpr uint32_t monorail_track_pieces_flat_quarter_turn_3_tiles[kNumOrthogonalDirections][3] = { { SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_1, @@ -355,34 +360,55 @@ static constexpr BoundBoxXY GhostTrainTrackPiecesLeftEightToDiagBoxes[4][4] = { }, }; -static constexpr uint32_t monorail_track_pieces_diag_flat[4] = { +static constexpr uint32_t monorail_track_pieces_diag_flat[kNumOrthogonalDirections] = { SPR_MONORAIL_DIAG_FLAT_W_E, SPR_MONORAIL_DIAG_FLAT_N_S, SPR_MONORAIL_DIAG_FLAT_E_W, SPR_MONORAIL_DIAG_FLAT_S_N, }; -static constexpr uint32_t monorail_track_pieces_diag_flat_to_25_deg_up[4] = { +static constexpr uint32_t monorail_track_pieces_diag_flat_to_25_deg_up[kNumOrthogonalDirections] = { SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_W_E, SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_N_S, SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_E_W, SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_S_N, }; -static constexpr uint32_t monorail_track_pieces_diag_25_deg_up_to_flat[4] = { +static constexpr uint32_t monorail_track_pieces_diag_25_deg_down_to_flat[kNumOrthogonalDirections] = { + SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_E_W, + SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_S_N, + SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_W_E, + SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_N_S, +}; + +static constexpr uint32_t monorail_track_pieces_diag_25_deg_up_to_flat[kNumOrthogonalDirections] = { SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_W_E, SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_N_S, SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_E_W, SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_S_N, }; -static constexpr uint32_t monorail_track_pieces_diag_25_deg_up[4] = { +static constexpr uint32_t monorail_track_pieces_diag_flat_to_25_deg_down[kNumOrthogonalDirections] = { + SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_E_W, + SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_S_N, + SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_W_E, + SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_N_S, +}; + +static constexpr uint32_t monorail_track_pieces_diag_25_deg_up[kNumOrthogonalDirections] = { SPR_MONORAIL_DIAG_25_DEG_UP_W_E, SPR_MONORAIL_DIAG_25_DEG_UP_N_S, SPR_MONORAIL_DIAG_25_DEG_UP_E_W, SPR_MONORAIL_DIAG_25_DEG_UP_S_N, }; +static constexpr uint32_t monorail_track_pieces_diag_25_deg_down[kNumOrthogonalDirections] = { + SPR_MONORAIL_DIAG_25_DEG_UP_E_W, + SPR_MONORAIL_DIAG_25_DEG_UP_S_N, + SPR_MONORAIL_DIAG_25_DEG_UP_W_E, + SPR_MONORAIL_DIAG_25_DEG_UP_N_S, +}; + /** rct2: 0x008AE1AC */ static void PaintMonorailTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -401,17 +427,16 @@ static void PaintMonorailTrackFlat( if (direction == 0 || direction == 2) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -419,7 +444,7 @@ static void PaintMonorailTrackFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AE25C, 0x008AE26C, 0x008AE27C */ @@ -458,19 +483,19 @@ static void PaintMonorailStation( if (direction == 0 || direction == 2) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AE1BC */ @@ -492,23 +517,22 @@ static void PaintMonorailTrack25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -516,7 +540,7 @@ static void PaintMonorailTrack25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AE1CC */ @@ -538,23 +562,22 @@ static void PaintMonorailTrackFlatTo25DegUp( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; case 3: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -562,7 +585,7 @@ static void PaintMonorailTrackFlatTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE1DC */ @@ -584,23 +607,22 @@ static void PaintMonorailTrack25DegUpToFlat( switch (direction) { case 0: - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareFlat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::_14); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::_14); break; case 3: - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareFlat); break; } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -608,7 +630,7 @@ static void PaintMonorailTrack25DegUpToFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } /** rct2: 0x008AE1EC */ @@ -642,35 +664,34 @@ static void PaintMonorailTrackRightQuarterTurn5Tiles( { TrackPaintUtilRightQuarterTurn5TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours, monorail_track_pieces_flat_quarter_turn_5_tiles, - defaultRightQuarterTurn5TilesOffsets, defaultRightQuarterTurn5TilesBoundLengths, nullptr); + kDefaultRightQuarterTurn5TilesOffsets, kDefaultRightQuarterTurn5TilesBoundLengths, nullptr); switch (trackSequence) { case 0: case 6: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } int32_t blockedSegments = 0; @@ -702,7 +723,7 @@ static void PaintMonorailTrackRightQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AE21C */ @@ -710,7 +731,7 @@ static void PaintMonorailTrackLeftQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; PaintMonorailTrackRightQuarterTurn5Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -747,22 +768,20 @@ static void PaintMonorailTrackSBendLeft( { if (trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height, session.SupportColours); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } } @@ -770,22 +789,20 @@ static void PaintMonorailTrackSBendLeft( { if (trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height, session.SupportColours); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } } @@ -814,7 +831,7 @@ static void PaintMonorailTrackSBendLeft( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction & 1), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AE24C */ @@ -847,22 +864,20 @@ static void PaintMonorailTrackSBendRight( { if (trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height, session.SupportColours); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } } @@ -870,22 +885,20 @@ static void PaintMonorailTrackSBendRight( { if (trackSequence == 3) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height, session.SupportColours); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } } @@ -914,7 +927,7 @@ static void PaintMonorailTrackSBendRight( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction & 1), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AE29C */ @@ -925,14 +938,13 @@ static void PaintMonorailTrackRightQuarterTurn3Tiles( TrackPaintUtilRightQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours, monorail_track_pieces_flat_quarter_turn_3_tiles, defaultRightQuarterTurn3TilesOffsets, defaultRightQuarterTurn3TilesBoundLengths, nullptr); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::SquareFlat); switch (trackSequence) { case 0: case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } @@ -954,7 +966,7 @@ static void PaintMonorailTrackRightQuarterTurn3Tiles( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AE28C */ @@ -962,7 +974,7 @@ static void PaintMonorailTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; PaintMonorailTrackRightQuarterTurn3Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -988,32 +1000,31 @@ static void PaintMonorailTrackLeftEighthToDiag( switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 4: if (direction == 0) MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); if (direction == 1) MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); if (direction == 2) MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); if (direction == 3) MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } int32_t blockedSegments = 0; @@ -1044,7 +1055,7 @@ static void PaintMonorailTrackLeftEighthToDiag( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AE32C */ @@ -1065,32 +1076,31 @@ static void PaintMonorailTrackRightEighthToDiag( switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; case 4: if (direction == 0) MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours); if (direction == 1) MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height, session.SupportColours); if (direction == 2) MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height, session.SupportColours); if (direction == 3) MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } int32_t blockedSegments = 0; @@ -1121,7 +1131,7 @@ static void PaintMonorailTrackRightEighthToDiag( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AE33C */ @@ -1129,8 +1139,7 @@ static void PaintMonorailTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr uint8_t map[] = { 4, 2, 3, 1, 0 }; - trackSequence = map[trackSequence]; + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; PaintMonorailTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } @@ -1139,38 +1148,17 @@ static void PaintMonorailTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr uint8_t map[] = { 4, 2, 3, 1, 0 }; - trackSequence = map[trackSequence]; + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; PaintMonorailTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } -static constexpr bool monorail_diag_image_segment[][4] = { - { false, true, false, false }, - { false, false, false, true }, - { false, false, true, false }, - { true, false, false, false }, -}; - /** rct2: 0x008AE2AC */ static void PaintMonorailTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - if (monorail_diag_image_segment[direction][trackSequence]) - { - auto imageId = session.TrackColours.WithIndex(monorail_track_pieces_diag_flat[direction]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); - } - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 0, height, session.SupportColours); - } - - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + TrackPaintUtilDiagTilesPaintExtra( + session, 2, height, direction, trackSequence, monorail_track_pieces_diag_flat, kSupportType); } /** rct2: 0x008AE2DC */ @@ -1178,21 +1166,18 @@ static void PaintMonorailTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - if (monorail_diag_image_segment[direction][trackSequence]) - { - auto imageId = session.TrackColours.WithIndex(monorail_track_pieces_diag_25_deg_up[direction]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); - } + TrackPaintUtilDiagTilesPaint( + session, 2, height, direction, trackSequence, monorail_track_pieces_diag_25_deg_up, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 8, height, session.SupportColours); + MetalBSupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 8, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AE2BC */ @@ -1200,21 +1185,18 @@ static void PaintMonorailTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - if (monorail_diag_image_segment[direction][trackSequence]) - { - auto imageId = session.TrackColours.WithIndex(monorail_track_pieces_diag_flat_to_25_deg_up[direction]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); - } + TrackPaintUtilDiagTilesPaint( + session, 2, height, direction, trackSequence, monorail_track_pieces_diag_flat_to_25_deg_up, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalBSupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AE2CC */ @@ -1222,21 +1204,18 @@ static void PaintMonorailTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - if (monorail_diag_image_segment[direction][trackSequence]) - { - auto imageId = session.TrackColours.WithIndex(monorail_track_pieces_diag_25_deg_up_to_flat[direction]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); - } + TrackPaintUtilDiagTilesPaint( + session, 2, height, direction, trackSequence, monorail_track_pieces_diag_25_deg_up_to_flat, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 4, height, session.SupportColours); + MetalBSupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 4, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AE30C */ @@ -1244,21 +1223,18 @@ static void PaintMonorailTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - if (monorail_diag_image_segment[direction][trackSequence]) - { - auto imageId = session.TrackColours.WithIndex(monorail_track_pieces_diag_25_deg_up[(direction + 2) % 4]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); - } + TrackPaintUtilDiagTilesPaint( + session, 2, height, direction, trackSequence, monorail_track_pieces_diag_25_deg_down, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 8, height, session.SupportColours); + MetalBSupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 8, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AE2EC */ @@ -1266,21 +1242,18 @@ static void PaintMonorailTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - if (monorail_diag_image_segment[direction][trackSequence]) - { - auto imageId = session.TrackColours.WithIndex(monorail_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); - } + TrackPaintUtilDiagTilesPaint( + session, 2, height, direction, trackSequence, monorail_track_pieces_diag_flat_to_25_deg_down, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 4, height, session.SupportColours); + MetalBSupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 4, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AE2FC */ @@ -1288,21 +1261,18 @@ static void PaintMonorailTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - if (monorail_diag_image_segment[direction][trackSequence]) - { - auto imageId = session.TrackColours.WithIndex(monorail_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); - } + TrackPaintUtilDiagTilesPaint( + session, 2, height, direction, trackSequence, monorail_track_pieces_diag_25_deg_down_to_flat, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { - MetalBSupportsPaintSetup( - session, MetalSupportType::Boxed, DiagSupportPlacement[direction], 0, height, session.SupportColours); + MetalBSupportsPaintSetup(session, kSupportType, kDiagSupportPlacement[direction], 0, height, session.SupportColours); } - int32_t blockedSegments = kDiagBlockedSegments[trackSequence]; + int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** diff --git a/src/openrct2/ride/transport/SuspendedMonorail.cpp b/src/openrct2/ride/transport/SuspendedMonorail.cpp index 1ad1713012..8a2158e31f 100644 --- a/src/openrct2/ride/transport/SuspendedMonorail.cpp +++ b/src/openrct2/ride/transport/SuspendedMonorail.cpp @@ -13,12 +13,18 @@ #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" #include "../../paint/tile_element/Paint.TileElement.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" #include "../../sprites.h" #include "../../world/Map.h" #include "../RideData.h" #include "../TrackData.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Boxed; + +static constexpr ImageIndex kSuspendedMonorailDiagFlatImages[kNumOrthogonalDirections] = { 25935, 25936, 25935, 25936 }; + /** rct2: 0x008636F4 */ static void SuspendedMonorailTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -40,19 +46,14 @@ static void SuspendedMonorailTrackFlat( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008637A4, 0x008637B4, 0x008637C4 */ @@ -76,11 +77,11 @@ static void SuspendedMonorailTrackStation( 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, MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00863704 */ @@ -112,45 +113,39 @@ static void SuspendedMonorailTrack25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 60, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 60, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 60, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 60, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 60, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 60, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 60, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 60, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x00863714 */ @@ -182,45 +177,39 @@ static void SuspendedMonorailTrackFlatTo25DegUp( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 52, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 52, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 52, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 52, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 52, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); } /** rct2: 0x00863724 */ @@ -252,45 +241,39 @@ static void SuspendedMonorailTrack25DegUpToFlat( break; } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 50, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 50, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 50, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 50, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 50, session.SupportColours); break; } } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::InvertedSquare); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_15); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_15); } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x00863734 */ @@ -357,17 +340,16 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -399,7 +381,7 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -432,10 +414,10 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 5: switch (direction) @@ -467,7 +449,7 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 6: switch (direction) @@ -502,19 +484,18 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -524,7 +505,7 @@ static void SuspendedMonorailTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; SuspendedMonorailTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -568,14 +549,13 @@ static void SuspendedMonorailTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -612,17 +592,15 @@ static void SuspendedMonorailTrackSBendLeft( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -659,17 +637,15 @@ static void SuspendedMonorailTrackSBendLeft( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopLeftSide, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::TopRightSide, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -704,19 +680,18 @@ static void SuspendedMonorailTrackSBendLeft( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -761,14 +736,13 @@ static void SuspendedMonorailTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -805,17 +779,15 @@ static void SuspendedMonorailTrackSBendRight( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -852,17 +824,15 @@ static void SuspendedMonorailTrackSBendRight( { case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomRightSide, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomLeftSide, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -897,19 +867,18 @@ static void SuspendedMonorailTrackSBendRight( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); switch (direction) { case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -954,17 +923,16 @@ static void SuspendedMonorailTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -997,7 +965,7 @@ static void SuspendedMonorailTrackLeftQuarterTurn3( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: switch (direction) @@ -1032,19 +1000,18 @@ static void SuspendedMonorailTrackLeftQuarterTurn3( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); switch (direction) { case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); break; case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1054,7 +1021,7 @@ static void SuspendedMonorailTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; SuspendedMonorailTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } @@ -1091,18 +1058,14 @@ static void SuspendedMonorailTrackLeftEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -1136,7 +1099,7 @@ static void SuspendedMonorailTrackLeftEighthToDiag( PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1170,7 +1133,7 @@ static void SuspendedMonorailTrackLeftEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1181,7 +1144,7 @@ static void SuspendedMonorailTrackLeftEighthToDiag( PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -1220,26 +1183,23 @@ static void SuspendedMonorailTrackLeftEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1277,18 +1237,14 @@ static void SuspendedMonorailTrackRightEighthToDiag( } PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); + session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height + 42, session.SupportColours); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: switch (direction) @@ -1322,7 +1278,7 @@ static void SuspendedMonorailTrackRightEighthToDiag( PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: switch (direction) @@ -1356,7 +1312,7 @@ static void SuspendedMonorailTrackRightEighthToDiag( PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: PaintUtilSetSegmentSupportHeight( @@ -1367,7 +1323,7 @@ static void SuspendedMonorailTrackRightEighthToDiag( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 4: switch (direction) @@ -1406,26 +1362,23 @@ static void SuspendedMonorailTrackRightEighthToDiag( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 42, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 42, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 42, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); break; } } @@ -1453,108 +1406,18 @@ static void SuspendedMonorailTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25936), { -16, -16, height + 32 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25935), { -16, -16, height + 32 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25935), { -16, -16, height + 32 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(25936), { -16, -16, height + 32 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } + TrackPaintUtilDiagTilesPaint( + session, 3, height + 32, direction, trackSequence, kSuspendedMonorailDiagFlatImages, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 42, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 42, session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 42, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 42, - session.SupportColours); - break; - } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(BlockedSegments::kDiagStraightFlat[trackSequence], direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } + if (trackSequence == 3) + MetalASupportsPaintSetupRotated( + session, kSupportType, MetalSupportPlace::LeftCorner, direction, 0, height + 42, session.SupportColours); + + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00863824 */ @@ -1581,7 +1444,7 @@ static void SuspendedMonorailTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -1599,7 +1462,7 @@ static void SuspendedMonorailTrackDiag25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1618,7 +1481,7 @@ static void SuspendedMonorailTrackDiag25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1642,26 +1505,23 @@ static void SuspendedMonorailTrackDiag25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 55, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 55, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 55, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 55, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 55, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 57, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 57, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1690,7 +1550,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -1708,7 +1568,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegUp( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -1727,7 +1587,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegUp( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -1751,26 +1611,23 @@ static void SuspendedMonorailTrackDiagFlatTo25DegUp( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 50, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 50, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } @@ -1799,7 +1656,7 @@ static void SuspendedMonorailTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -1817,7 +1674,7 @@ static void SuspendedMonorailTrackDiag25DegUpToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1836,7 +1693,7 @@ static void SuspendedMonorailTrackDiag25DegUpToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1860,26 +1717,23 @@ static void SuspendedMonorailTrackDiag25DegUpToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 51, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 51, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 51, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 51, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 51, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -1908,7 +1762,7 @@ static void SuspendedMonorailTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: switch (direction) @@ -1926,7 +1780,7 @@ static void SuspendedMonorailTrackDiag25DegDown( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: switch (direction) @@ -1945,7 +1799,7 @@ static void SuspendedMonorailTrackDiag25DegDown( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: switch (direction) @@ -1969,26 +1823,23 @@ static void SuspendedMonorailTrackDiag25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 54, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 54, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 54, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 54, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 51, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 51, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 58, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 58, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); break; } } @@ -2075,28 +1926,25 @@ static void SuspendedMonorailTrackDiagFlatTo25DegDown( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 48, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 48, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 48, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 48, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 48, session.SupportColours); break; } break; } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } /** rct2: 0x00863844 */ @@ -2123,7 +1971,7 @@ static void SuspendedMonorailTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: switch (direction) @@ -2141,7 +1989,7 @@ static void SuspendedMonorailTrackDiag25DegDownToFlat( PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: switch (direction) @@ -2160,7 +2008,7 @@ static void SuspendedMonorailTrackDiag25DegDownToFlat( PaintSegment::bottomRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: switch (direction) @@ -2184,26 +2032,23 @@ static void SuspendedMonorailTrackDiag25DegDownToFlat( { case 0: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::LeftCorner, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::LeftCorner, 0, height + 46, session.SupportColours); break; case 1: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopCorner, 0, height + 46, session.SupportColours); + session, kSupportType, MetalSupportPlace::TopCorner, 0, height + 46, session.SupportColours); break; case 2: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::RightCorner, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::RightCorner, 0, height + 46, session.SupportColours); break; case 3: MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomCorner, 0, height + 46, - session.SupportColours); + session, kSupportType, MetalSupportPlace::BottomCorner, 0, height + 46, session.SupportColours); break; } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 64); break; } } diff --git a/src/openrct2/ride/transport/meta/Chairlift.h b/src/openrct2/ride/transport/meta/Chairlift.h index c07deef1a7..fe99e2b73f 100644 --- a/src/openrct2/ride/transport/meta/Chairlift.h +++ b/src/openrct2/ride/transport/meta/Chairlift.h @@ -33,7 +33,7 @@ constexpr RideTypeDescriptor ChairliftRTD = RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT | RIDE_TYPE_FLAG_IS_SUSPENDED, .RideModes = EnumsToFlags(RideMode::StationToStation), .DefaultMode = RideMode::StationToStation, - .OperatingSettings = { 1, 4, 0, 0, 0, 0 }, + .OperatingSettings = { 1, 4 }, .Naming = { STR_RIDE_NAME_CHAIRLIFT, STR_RIDE_DESCRIPTION_CHAIRLIFT }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_CHAIRLIFT), diff --git a/src/openrct2/ride/transport/meta/Lift.h b/src/openrct2/ride/transport/meta/Lift.h index aeb651bb8e..cd8f003e11 100644 --- a/src/openrct2/ride/transport/meta/Lift.h +++ b/src/openrct2/ride/transport/meta/Lift.h @@ -31,7 +31,6 @@ constexpr RideTypeDescriptor LiftRTD = RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_TRANSPORT_RIDE | RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER, .RideModes = EnumsToFlags(RideMode::Shuttle), .DefaultMode = RideMode::Shuttle, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_LIFT, STR_RIDE_DESCRIPTION_LIFT }, .NameConvention = { RideComponentType::Cabin, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_LIFT), diff --git a/src/openrct2/ride/transport/meta/MiniatureRailway.h b/src/openrct2/ride/transport/meta/MiniatureRailway.h index 0d85ecae90..1f242cc5d7 100644 --- a/src/openrct2/ride/transport/meta/MiniatureRailway.h +++ b/src/openrct2/ride/transport/meta/MiniatureRailway.h @@ -34,7 +34,6 @@ constexpr RideTypeDescriptor MiniatureRailwayRTD = RIDE_TYPE_FLAG_SUPPORTS_LEVEL_CROSSINGS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::Shuttle), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MINIATURE_RAILWAY, STR_RIDE_DESCRIPTION_MINIATURE_RAILWAY }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MINIATURE_RAILWAY), diff --git a/src/openrct2/ride/transport/meta/Monorail.h b/src/openrct2/ride/transport/meta/Monorail.h index bf00e87d78..ddef6943fe 100644 --- a/src/openrct2/ride/transport/meta/Monorail.h +++ b/src/openrct2/ride/transport/meta/Monorail.h @@ -34,7 +34,6 @@ constexpr RideTypeDescriptor MonorailRTD = RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_TRANSPORT_RIDE | RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::Shuttle), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_MONORAIL, STR_RIDE_DESCRIPTION_MONORAIL }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_MONORAIL), diff --git a/src/openrct2/ride/transport/meta/SuspendedMonorail.h b/src/openrct2/ride/transport/meta/SuspendedMonorail.h index 572dc296ba..80424be6de 100644 --- a/src/openrct2/ride/transport/meta/SuspendedMonorail.h +++ b/src/openrct2/ride/transport/meta/SuspendedMonorail.h @@ -34,7 +34,6 @@ constexpr RideTypeDescriptor SuspendedMonorailRTD = RIDE_TYPE_FLAG_IS_SUSPENDED, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::Shuttle), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_SUSPENDED_MONORAIL, STR_RIDE_DESCRIPTION_SUSPENDED_MONORAIL }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SUSPENDED_MONORAIL), diff --git a/src/openrct2/ride/water/BoatHire.cpp b/src/openrct2/ride/water/BoatHire.cpp index 77afdc4587..53cd4d9ff7 100644 --- a/src/openrct2/ride/water/BoatHire.cpp +++ b/src/openrct2/ride/water/BoatHire.cpp @@ -11,6 +11,9 @@ #include "../../common.h" #include "../../interface/Viewport.h" #include "../../paint/Paint.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" @@ -61,7 +64,7 @@ static void PaintBoatHireTrackFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 16, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 16); } /** rct2: 0x008B0E50 */ @@ -73,19 +76,19 @@ static void PaintBoatHireStation( if (direction & 1) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); TrackPaintUtilDrawPier( session, ride, stationObj, session.MapPosition, direction, height, trackElement, session.CurrentRotation); } else { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); TrackPaintUtilDrawPier( session, ride, stationObj, session.MapPosition, direction, height, trackElement, session.CurrentRotation); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008B0E80 */ @@ -132,7 +135,7 @@ static void PaintBoatHireTrackLeftQuarterTurn1Tile( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 16, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 16); } /** rct2: 0x008B0E90 */ diff --git a/src/openrct2/ride/water/DinghySlide.cpp b/src/openrct2/ride/water/DinghySlide.cpp index b9c94ca63d..af9f784e08 100644 --- a/src/openrct2/ride/water/DinghySlide.cpp +++ b/src/openrct2/ride/water/DinghySlide.cpp @@ -10,9 +10,14 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../Track.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + enum { SPR_DINGHY_SLIDE_FLAT_SW_NE = 19720, @@ -231,18 +236,17 @@ static void DinghySlideTrackFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackStation( @@ -263,14 +267,14 @@ static void DinghySlideTrackStation( session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrack25DegUp( @@ -301,17 +305,16 @@ static void DinghySlideTrack25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -319,7 +322,7 @@ static void DinghySlideTrack25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void DinghySlideTrack60DegUp( @@ -341,17 +344,16 @@ static void DinghySlideTrack60DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -359,7 +361,7 @@ static void DinghySlideTrack60DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void DinghySlideTrackFlatTo25DegUp( @@ -390,17 +392,16 @@ static void DinghySlideTrackFlatTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -408,7 +409,7 @@ static void DinghySlideTrackFlatTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void DinghySlideTrack25DegUpTo60DegUp( @@ -430,17 +431,16 @@ static void DinghySlideTrack25DegUpTo60DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -448,7 +448,7 @@ static void DinghySlideTrack25DegUpTo60DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void DinghySlideTrack60DegUpTo25DegUp( @@ -470,17 +470,16 @@ static void DinghySlideTrack60DegUpTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -488,7 +487,7 @@ static void DinghySlideTrack60DegUpTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void DinghySlideTrack25DegUpToFlat( @@ -519,17 +518,16 @@ static void DinghySlideTrack25DegUpToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } PaintUtilSetSegmentSupportHeight( @@ -537,7 +535,7 @@ static void DinghySlideTrack25DegUpToFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void DinghySlideTrack25DegDown( @@ -647,26 +645,25 @@ static void DinghySlideTrackRightQuarterTurn5( { case 0: case 6: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -722,14 +719,14 @@ static void DinghySlideTrackRightQuarterTurn5( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; DinghySlideTrackRightQuarterTurn5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -781,8 +778,7 @@ static void DinghySlideTrackSBendLeft( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -800,8 +796,7 @@ static void DinghySlideTrackSBendLeft( if (direction == 0 || direction == 1) { const auto supportPlace = (direction & 1) ? MetalSupportPlace::TopRightSide : MetalSupportPlace::TopLeftSide; - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, supportPlace, (direction & 1), height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, (direction & 1), height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -820,8 +815,7 @@ static void DinghySlideTrackSBendLeft( if (direction == 2 || direction == 3) { const auto supportPlace = (direction & 1) ? MetalSupportPlace::TopRightSide : MetalSupportPlace::TopLeftSide; - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, supportPlace, (direction & 1), height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, (direction & 1), height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -836,8 +830,7 @@ static void DinghySlideTrackSBendLeft( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -853,18 +846,18 @@ static void DinghySlideTrackSBendLeft( { if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } else if (trackSequence == 3) { if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackSBendRight( @@ -908,8 +901,7 @@ static void DinghySlideTrackSBendRight( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -928,7 +920,7 @@ static void DinghySlideTrackSBendRight( { const auto supportPlace = (direction & 1) ? MetalSupportPlace::BottomLeftSide : MetalSupportPlace::BottomRightSide; - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, supportPlace, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -948,7 +940,7 @@ static void DinghySlideTrackSBendRight( { const auto supportPlace = (direction & 1) ? MetalSupportPlace::BottomLeftSide : MetalSupportPlace::BottomRightSide; - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, supportPlace, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -963,8 +955,7 @@ static void DinghySlideTrackSBendRight( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -980,18 +971,18 @@ static void DinghySlideTrackSBendRight( { if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } else if (trackSequence == 3) { if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackRightQuarterTurn3( @@ -1045,14 +1036,13 @@ static void DinghySlideTrackRightQuarterTurn3( TrackPaintUtilRightQuarterTurn3TilesPaint3(session, height, direction, trackSequence, session.TrackColours, imageIds); TrackPaintUtilRightQuarterTurn3TilesPaint3(session, height, direction, trackSequence, session.TrackColours, frontImageIds); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::StandardFlat); switch (trackSequence) { case 0: case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } @@ -1074,14 +1064,14 @@ static void DinghySlideTrackRightQuarterTurn3( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; DinghySlideTrackRightQuarterTurn3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } diff --git a/src/openrct2/ride/water/DinghySlideCovered.cpp b/src/openrct2/ride/water/DinghySlideCovered.cpp index 84b51152ab..b05e9dacea 100644 --- a/src/openrct2/ride/water/DinghySlideCovered.cpp +++ b/src/openrct2/ride/water/DinghySlideCovered.cpp @@ -10,9 +10,14 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../Track.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Tubes; + enum { SPR_DINGHY_SLIDE_FLAT_COVERED_SW_NE = 19736, @@ -187,18 +192,17 @@ static void DinghySlideTrackCoveredFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackCovered25DegUp( @@ -220,17 +224,16 @@ static void DinghySlideTrackCovered25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -238,7 +241,7 @@ static void DinghySlideTrackCovered25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void DinghySlideTrackCovered60DegUp( @@ -260,17 +263,16 @@ static void DinghySlideTrackCovered60DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 32, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 32, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -278,7 +280,7 @@ static void DinghySlideTrackCovered60DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void DinghySlideTrackCoveredFlatTo25DegUp( @@ -300,17 +302,16 @@ static void DinghySlideTrackCoveredFlatTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -318,7 +319,7 @@ static void DinghySlideTrackCoveredFlatTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void DinghySlideTrackCovered25DegUpTo60DegUp( @@ -340,17 +341,16 @@ static void DinghySlideTrackCovered25DegUpTo60DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 12, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 12, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -358,7 +358,7 @@ static void DinghySlideTrackCovered25DegUpTo60DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void DinghySlideTrackCovered60DegUpTo25DegUp( @@ -380,17 +380,16 @@ static void DinghySlideTrackCovered60DegUpTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 20, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 20, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } PaintUtilSetSegmentSupportHeight( @@ -398,7 +397,7 @@ static void DinghySlideTrackCovered60DegUpTo25DegUp( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void DinghySlideTrackCovered25DegUpToFlat( @@ -420,17 +419,16 @@ static void DinghySlideTrackCovered25DegUpToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } PaintUtilSetSegmentSupportHeight( @@ -438,7 +436,7 @@ static void DinghySlideTrackCovered25DegUpToFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void DinghySlideTrackCovered25DegDown( @@ -548,26 +546,25 @@ static void DinghySlideTrackCoveredRightQuarterTurn5( { case 0: case 6: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } if (direction == 0 && trackSequence == 0) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 0 && trackSequence == 6) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } if (direction == 1 && trackSequence == 6) { - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + PaintUtilPushTunnelLeft(session, height, TunnelType::StandardFlat); } if (direction == 3 && trackSequence == 0) { - PaintUtilPushTunnelRight(session, height, TUNNEL_0); + PaintUtilPushTunnelRight(session, height, TunnelType::StandardFlat); } switch (trackSequence) @@ -623,14 +620,14 @@ static void DinghySlideTrackCoveredRightQuarterTurn5( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackCoveredLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; DinghySlideTrackCoveredRightQuarterTurn5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } @@ -675,8 +672,7 @@ static void DinghySlideTrackCoveredSBendLeft( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -694,8 +690,7 @@ static void DinghySlideTrackCoveredSBendLeft( if (direction == 0 || direction == 1) { const auto supportPlace = (direction & 1) ? MetalSupportPlace::TopRightSide : MetalSupportPlace::TopLeftSide; - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, supportPlace, (direction & 1), height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, (direction & 1), height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -714,8 +709,7 @@ static void DinghySlideTrackCoveredSBendLeft( if (direction == 2 || direction == 3) { const auto supportPlace = (direction & 1) ? MetalSupportPlace::TopRightSide : MetalSupportPlace::TopLeftSide; - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, supportPlace, (direction & 1), height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, (direction & 1), height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -730,8 +724,7 @@ static void DinghySlideTrackCoveredSBendLeft( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -747,18 +740,18 @@ static void DinghySlideTrackCoveredSBendLeft( { if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } else if (trackSequence == 3) { if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackCoveredSBendRight( @@ -802,8 +795,7 @@ static void DinghySlideTrackCoveredSBendRight( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -822,7 +814,7 @@ static void DinghySlideTrackCoveredSBendRight( { const auto supportPlace = (direction & 1) ? MetalSupportPlace::BottomLeftSide : MetalSupportPlace::BottomRightSide; - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, supportPlace, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -842,7 +834,7 @@ static void DinghySlideTrackCoveredSBendRight( { const auto supportPlace = (direction & 1) ? MetalSupportPlace::BottomLeftSide : MetalSupportPlace::BottomRightSide; - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, supportPlace, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -857,8 +849,7 @@ static void DinghySlideTrackCoveredSBendRight( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -874,18 +865,18 @@ static void DinghySlideTrackCoveredSBendRight( { if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } else if (trackSequence == 3) { if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackCoveredRightQuarterTurn3( @@ -939,14 +930,13 @@ static void DinghySlideTrackCoveredRightQuarterTurn3( TrackPaintUtilRightQuarterTurn3TilesPaint3(session, height, direction, trackSequence, session.TrackColours, imageIds); TrackPaintUtilRightQuarterTurn3TilesPaint3(session, height, direction, trackSequence, session.TrackColours, frontImageIds); - TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TunnelType::StandardFlat); switch (trackSequence) { case 0: case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); break; } @@ -968,14 +958,14 @@ static void DinghySlideTrackCoveredRightQuarterTurn3( } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void DinghySlideTrackCoveredLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + trackSequence = kMapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; DinghySlideTrackCoveredRightQuarterTurn3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } diff --git a/src/openrct2/ride/water/LogFlume.cpp b/src/openrct2/ride/water/LogFlume.cpp index 97dfd921c3..cd8d679329 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -10,10 +10,15 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../../sprites.h" #include "../Track.h" #include "../TrackPaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Boxed; + enum { SPR_LOG_FLUME_FLAT_SW_NE = 20996, @@ -173,17 +178,12 @@ static void PaintLogFlumeTrackFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintLogFlumeTrackStation( @@ -203,15 +203,15 @@ static void PaintLogFlumeTrackStation( } PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, kSupportType); TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); // Covers shouldn't be offset by +2 - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintLogFlumeTrack25DegUp( @@ -233,24 +233,19 @@ static void PaintLogFlumeTrack25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void PaintLogFlumeTrackFlatTo25DegUp( @@ -272,24 +267,19 @@ static void PaintLogFlumeTrackFlatTo25DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void PaintLogFlumeTrack25DegUpToFlat( @@ -311,24 +301,19 @@ static void PaintLogFlumeTrack25DegUpToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void PaintLogFlumeTrack25DegDown( @@ -350,24 +335,19 @@ static void PaintLogFlumeTrack25DegDown( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::StandardSlopeEnd); } else { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardSlopeStart); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void PaintLogFlumeTrackFlatTo25DegDown( @@ -389,24 +369,19 @@ static void PaintLogFlumeTrackFlatTo25DegDown( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 6, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 6, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_12); } else { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::StandardFlat); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void PaintLogFlumeTrack25DegDownToFlat( @@ -428,24 +403,19 @@ static void PaintLogFlumeTrack25DegDownToFlat( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 3, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 3, height, session.SupportColours); } if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeEnd); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void PaintLogFlumeTrackSBendLeft( @@ -489,8 +459,7 @@ static void PaintLogFlumeTrackSBendLeft( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -508,8 +477,7 @@ static void PaintLogFlumeTrackSBendLeft( if (direction == 0 || direction == 1) { const auto supportPlace = (direction & 1) ? MetalSupportPlace::TopRightSide : MetalSupportPlace::TopLeftSide; - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, supportPlace, (direction & 1), height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, (direction & 1), height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -528,8 +496,7 @@ static void PaintLogFlumeTrackSBendLeft( if (direction == 2 || direction == 3) { const auto supportPlace = (direction & 1) ? MetalSupportPlace::TopRightSide : MetalSupportPlace::TopLeftSide; - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, supportPlace, (direction & 1), height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, (direction & 1), height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -544,8 +511,7 @@ static void PaintLogFlumeTrackSBendLeft( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -561,18 +527,18 @@ static void PaintLogFlumeTrackSBendLeft( { if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } else if (trackSequence == 3) { if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintLogFlumeTrackSBendRight( @@ -616,8 +582,7 @@ static void PaintLogFlumeTrackSBendRight( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -636,7 +601,7 @@ static void PaintLogFlumeTrackSBendRight( { const auto supportPlace = (direction & 1) ? MetalSupportPlace::BottomLeftSide : MetalSupportPlace::BottomRightSide; - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, supportPlace, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -656,7 +621,7 @@ static void PaintLogFlumeTrackSBendRight( { const auto supportPlace = (direction & 1) ? MetalSupportPlace::BottomLeftSide : MetalSupportPlace::BottomRightSide; - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, supportPlace, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, supportPlace, 0, height, session.SupportColours); } PaintUtilSetSegmentSupportHeight( session, @@ -671,8 +636,7 @@ static void PaintLogFlumeTrackSBendRight( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -688,18 +652,18 @@ static void PaintLogFlumeTrackSBendRight( { if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } else if (trackSequence == 3) { if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintLogFlumeTrackLeftQuarterTurn3Tiles( @@ -742,8 +706,7 @@ static void PaintLogFlumeTrackLeftQuarterTurn3Tiles( if (trackSequence != 1 && trackSequence != 2) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } switch (trackSequence) @@ -751,13 +714,13 @@ static void PaintLogFlumeTrackLeftQuarterTurn3Tiles( case 0: if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } break; case 3: if (direction == 2 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction ^ 1, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction ^ 1, height, TunnelType::StandardFlat); } break; } @@ -796,7 +759,7 @@ static void PaintLogFlumeTrackLeftQuarterTurn3Tiles( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintLogFlumeTrackRightQuarterTurn3Tiles( @@ -839,8 +802,7 @@ static void PaintLogFlumeTrackRightQuarterTurn3Tiles( if (trackSequence != 1 && trackSequence != 2) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); } switch (trackSequence) @@ -848,13 +810,13 @@ static void PaintLogFlumeTrackRightQuarterTurn3Tiles( case 0: if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); } break; case 3: if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction ^ 1, height, TUNNEL_0); + PaintUtilPushTunnelRotated(session, direction ^ 1, height, TunnelType::StandardFlat); } break; } @@ -893,14 +855,14 @@ static void PaintLogFlumeTrackRightQuarterTurn3Tiles( break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintLogFlumeTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Boxed); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, kSupportType); auto imageId = session.TrackColours.WithIndex(LogFlumeTrackFlatImageIds[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); @@ -910,9 +872,9 @@ static void PaintLogFlumeTrackOnRidePhoto( TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void PaintLogFlumeTrackReverser( @@ -932,15 +894,11 @@ static void PaintLogFlumeTrackReverser( PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - MetalASupportsPaintSetup(session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 0, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 0, height, session.SupportColours); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardFlat); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } // Steep Additions added by OpenRCT2 @@ -966,28 +924,22 @@ static void LogFlumeTrack25Down60( { if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::_14); } else { if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height + 12, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height + 12, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::StandardSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void LogFlumeTrack60Down( @@ -1011,28 +963,22 @@ static void LogFlumeTrack60Down( { if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height + 12, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height + 12, session.SupportColours); } - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void LogFlumeTrack60Down25( @@ -1054,30 +1000,24 @@ static void LogFlumeTrack60Down25( if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_1); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::StandardSlopeStart); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height, session.SupportColours); } } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareFlat); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::Centre, 8, height + 8, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, 8, height + 8, session.SupportColours); } } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionLogFlume(int32_t trackType) diff --git a/src/openrct2/ride/water/RiverRapids.cpp b/src/openrct2/ride/water/RiverRapids.cpp index b74c93cea5..a775dedceb 100644 --- a/src/openrct2/ride/water/RiverRapids.cpp +++ b/src/openrct2/ride/water/RiverRapids.cpp @@ -13,6 +13,9 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#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 "../Track.h" @@ -22,6 +25,8 @@ using namespace OpenRCT2; +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + #ifndef NO_VEHICLES // 0x0099279E: static constexpr VehicleBoundBox _riverRapidsBoundbox[] = { @@ -297,19 +302,19 @@ static void PaintRiverRapidsTrackFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction & 1) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x007576C0 */ @@ -319,7 +324,7 @@ static void PaintRiverRapidsStation( { PaintRiverRapidsTrackFlat(session, ride, trackSequence, direction, height, trackElement); TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 12, trackElement); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintRiverRapidsTrack25Deg(PaintSession& session, uint8_t direction, int32_t height, const uint32_t sprites[4][2]) @@ -337,9 +342,9 @@ static void PaintRiverRapidsTrack25Deg(PaintSession& session, uint8_t direction, PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareSlopeStart); break; case 1: @@ -351,9 +356,9 @@ static void PaintRiverRapidsTrack25Deg(PaintSession& session, uint8_t direction, PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::SquareSlopeEnd); break; case 2: @@ -365,9 +370,9 @@ static void PaintRiverRapidsTrack25Deg(PaintSession& session, uint8_t direction, PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::SquareSlopeEnd); break; case 3: @@ -378,14 +383,14 @@ static void PaintRiverRapidsTrack25Deg(PaintSession& session, uint8_t direction, PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareSlopeStart); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void PaintRiverRapidsTrack25DegToFlatA( @@ -404,9 +409,9 @@ static void PaintRiverRapidsTrack25DegToFlatA( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 18 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); - PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height - 8, TunnelType::SquareFlat); break; case 1: @@ -418,9 +423,9 @@ static void PaintRiverRapidsTrack25DegToFlatA( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 18 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelRight(session, height + 8, TunnelType::_14); break; case 2: @@ -433,9 +438,9 @@ static void PaintRiverRapidsTrack25DegToFlatA( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 18 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_14); + PaintUtilPushTunnelLeft(session, height + 8, TunnelType::_14); break; case 3: @@ -446,14 +451,14 @@ static void PaintRiverRapidsTrack25DegToFlatA( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 18 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); - PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height - 8, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void PaintRiverRapidsTrack25DegToFlatB( @@ -472,9 +477,9 @@ static void PaintRiverRapidsTrack25DegToFlatB( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 26 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: @@ -486,9 +491,9 @@ static void PaintRiverRapidsTrack25DegToFlatB( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 26 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareSlopeEnd); break; case 2: @@ -500,9 +505,9 @@ static void PaintRiverRapidsTrack25DegToFlatB( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 26 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareSlopeEnd); break; case 3: @@ -513,14 +518,14 @@ static void PaintRiverRapidsTrack25DegToFlatB( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 26 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00757660 */ @@ -586,7 +591,7 @@ static void PaintRiverRapidsTrackLeftQuarterTurn1Tile( imageId = session.TrackColours.WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SW_NW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 27, height }, { 2, 1, 7 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 1: @@ -607,7 +612,7 @@ static void PaintRiverRapidsTrackLeftQuarterTurn1Tile( imageId = session.TrackColours.WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_NE_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 10, 10, height }, { 1, 2, 5 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 3: @@ -617,15 +622,15 @@ static void PaintRiverRapidsTrackLeftQuarterTurn1Tile( imageId = session.TrackColours.WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 28, height }, { 1, 1, 7 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00757700 */ @@ -644,8 +649,8 @@ static void PaintRiverRapidsTrackRightQuarterTurn1Tile( imageId = session.TrackColours.WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 28, height + 2 }, { 1, 1, 7 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; case 1: @@ -655,7 +660,7 @@ static void PaintRiverRapidsTrackRightQuarterTurn1Tile( imageId = session.TrackColours.WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SE_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 27, height }, { 2, 1, 7 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); break; case 2: @@ -676,14 +681,14 @@ static void PaintRiverRapidsTrackRightQuarterTurn1Tile( imageId = session.TrackColours.WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_NW_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 2, height }, { 1, 28, 7 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); break; } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NwSe, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NwSe, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00757710 */ @@ -742,19 +747,19 @@ static void PaintRiverRapidsTrackWaterfall( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction & 1) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelRight(session, height, TunnelType::InvertedSquare); } else { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilPushTunnelLeft(session, height, TunnelType::InvertedSquare); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x00757720 */ @@ -784,19 +789,19 @@ static void PaintRiverRapidsTrackRapids( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction & 1) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x00757740 */ @@ -806,7 +811,7 @@ static void PaintRiverRapidsTrackOnRidePhoto( { PaintRiverRapidsTrackFlat(session, ride, trackSequence, direction, height, trackElement); TrackPaintUtilOnridePhotoPaint(session, direction, height + 13, trackElement); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x */ @@ -854,19 +859,19 @@ static void PaintRiverRapidsTrackWhirlpool( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction & 1) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** diff --git a/src/openrct2/ride/water/SplashBoats.cpp b/src/openrct2/ride/water/SplashBoats.cpp index 07b01abd73..2e1beb6832 100644 --- a/src/openrct2/ride/water/SplashBoats.cpp +++ b/src/openrct2/ride/water/SplashBoats.cpp @@ -7,16 +7,20 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "../../config/Config.h" #include "../../entity/EntityRegistry.h" #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/WoodenSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" #include "../VehiclePaint.h" +static constexpr WoodenSupportType kSupportType = WoodenSupportType::Truss; + enum { SPR_SPLASH_BOATS_FLAT_TOP_SW_NE = 20820, @@ -485,19 +489,19 @@ static void PaintSplashBoatsTrack25DegUp( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void PaintSplashBoatsTrack60DegUp( @@ -512,19 +516,19 @@ static void PaintSplashBoatsTrack60DegUp( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 56, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 104); } static void PaintSplashBoatsTrackFlatTo25DegUp( @@ -538,19 +542,19 @@ static void PaintSplashBoatsTrackFlatTo25DegUp( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } static void PaintSplashBoatsTrack25DegUpToFlat( @@ -564,19 +568,19 @@ static void PaintSplashBoatsTrack25DegUpToFlat( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void PaintSplashBoatsTrack25DegUpTo60DegUp( @@ -591,19 +595,19 @@ static void PaintSplashBoatsTrack25DegUpTo60DegUp( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToUp60Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void PaintSplashBoatsTrack60DegUpTo25DegUp( @@ -618,19 +622,19 @@ static void PaintSplashBoatsTrack60DegUpTo25DegUp( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up60DegToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } else { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 24, TunnelType::SquareSlopeEnd); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 72); } static void PaintSplashBoatsTrack25DegDown( @@ -644,19 +648,19 @@ static void PaintSplashBoatsTrack25DegDown( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, (direction + 2) % NumOrthogonalDirections, height, + session, kSupportType, WoodenSupportSubType::NeSw, (direction + 2) % kNumOrthogonalDirections, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::SquareSlopeEnd); } else { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_7); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareSlopeStart); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void PaintSplashBoatsTrack60DegDown( @@ -677,19 +681,19 @@ static void PaintSplashBoatsTrackFlatTo25DegDown( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, (direction + 2) % NumOrthogonalDirections, height, + session, kSupportType, WoodenSupportSubType::NeSw, (direction + 2) % kNumOrthogonalDirections, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_14); + PaintUtilPushTunnelRotated(session, direction, height + 8, TunnelType::_14); } else { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height - 8, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 40); } static void PaintSplashBoatsTrack25DegDownTo60DegDown( @@ -717,19 +721,19 @@ static void PaintSplashBoatsTrack25DegDownToFlat( PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, (direction + 2) % NumOrthogonalDirections, height, + session, kSupportType, WoodenSupportSubType::NeSw, (direction + 2) % kNumOrthogonalDirections, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_8); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareSlopeEnd); } else { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** Start of elements originally from River Rafts */ @@ -762,19 +766,19 @@ static void PaintSplashBoatsTrackFlat( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); if (direction & 1) { - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); } else { - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0089B1A0 */ @@ -802,14 +806,14 @@ static void PaintSplashBoatsStation( } WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 7, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0089B1D0 */ @@ -822,7 +826,7 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours, RiverRaftsLeftQuarterTurn5_Side); - static constexpr WoodenSupportSubType supportTypes[NumOrthogonalDirections][7] = { + static constexpr WoodenSupportSubType supportTypes[kNumOrthogonalDirections][7] = { { WoodenSupportSubType::NeSw, WoodenSupportSubType::Null, @@ -864,7 +868,7 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( if (supportTypes[direction][trackSequence] != WoodenSupportSubType::Null) { WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportTypes[direction][trackSequence], height, session.SupportColours); + session, kSupportType, supportTypes[direction][trackSequence], height, session.SupportColours); } switch (trackSequence) @@ -929,18 +933,18 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( case 0: if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } break; case 6: if (direction == 2 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction ^ 1, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction ^ 1, height, TunnelType::SquareFlat); } break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0089B1D0 */ @@ -995,7 +999,7 @@ static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( if (supportTypes[direction][trackSequence] != WoodenSupportSubType::Null) { WoodenASupportsPaintSetup( - session, WoodenSupportType::Truss, supportTypes[direction][trackSequence], height, session.SupportColours); + session, kSupportType, supportTypes[direction][trackSequence], height, session.SupportColours); } switch (trackSequence) @@ -1058,18 +1062,18 @@ static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( case 0: if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } break; case 6: if (direction == 0 || direction == 1) { - PaintUtilPushTunnelRotated(session, direction ^ 1, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction ^ 1, height, TunnelType::SquareFlat); } break; } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0089B180 */ @@ -1115,7 +1119,7 @@ static void PaintSplashBoatsTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; case 1: @@ -1125,7 +1129,7 @@ static void PaintSplashBoatsTrackSBendLeft( session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner3, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -1143,7 +1147,7 @@ static void PaintSplashBoatsTrackSBendLeft( session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner1, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -1159,7 +1163,7 @@ static void PaintSplashBoatsTrackSBendLeft( PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; } @@ -1168,18 +1172,18 @@ static void PaintSplashBoatsTrackSBendLeft( { if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } } else if (trackSequence == 3) { if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x0089B190 */ @@ -1225,7 +1229,7 @@ static void PaintSplashBoatsTrackSBendRight( PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; case 1: @@ -1235,7 +1239,7 @@ static void PaintSplashBoatsTrackSBendRight( session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner2, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -1253,7 +1257,7 @@ static void PaintSplashBoatsTrackSBendRight( session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::Corner0, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, @@ -1269,7 +1273,7 @@ static void PaintSplashBoatsTrackSBendRight( PaintAddImageAsParentRotated( session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetupRotated( - session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); + session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; } @@ -1278,18 +1282,18 @@ static void PaintSplashBoatsTrackSBendRight( { if (direction == 0 || direction == 3) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } } else if (trackSequence == 3) { if (direction == 1 || direction == 2) { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); } } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void PaintSplashBoatsTrackOnRidePhoto( @@ -1319,9 +1323,9 @@ static void PaintSplashBoatsTrackOnRidePhoto( PaintSplashBoatsTrackFlat(session, ride, trackSequence, direction, height, trackElement); TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRotated(session, direction, height, TunnelType::SquareFlat); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 48); } TRACK_PAINT_FUNCTION GetTrackPaintFunctionSplashBoats(int32_t trackType) diff --git a/src/openrct2/ride/water/SubmarineRide.cpp b/src/openrct2/ride/water/SubmarineRide.cpp index 95f48f484a..5ef0cb3a85 100644 --- a/src/openrct2/ride/water/SubmarineRide.cpp +++ b/src/openrct2/ride/water/SubmarineRide.cpp @@ -10,12 +10,17 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Segment.h" +#include "../../paint/track/Segment.h" +#include "../../paint/track/Support.h" #include "../RideData.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" #include "../VehiclePaint.h" +static constexpr MetalSupportType kSupportType = MetalSupportType::Stick; + static uint32_t SubmarineVehicleGetBaseImageId(const Vehicle* vehicle, const CarEntry* carEntry, int32_t imageDirection) { uint32_t result = imageDirection; @@ -77,7 +82,7 @@ static void SubmarineRidePaintTrackStation( imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { { 6, 0, heightLower }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelRight(session, height, TunnelType::SquareFlat); TrackPaintUtilDrawPier( session, ride, stationObj, session.MapPosition, direction, height, trackElement, session.CurrentRotation); } @@ -86,13 +91,13 @@ static void SubmarineRidePaintTrackStation( imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { { 0, 6, heightLower }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); + PaintUtilPushTunnelLeft(session, height, TunnelType::SquareFlat); TrackPaintUtilDrawPier( session, ride, stationObj, session.MapPosition, direction, height, trackElement, session.CurrentRotation); } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static void SubmarineRidePaintTrackFlat( @@ -106,20 +111,20 @@ static void SubmarineRidePaintTrackFlat( { imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { { 6, 0, heightLower }, { 20, 32, 3 } }); - PaintUtilPushTunnelRight(session, heightLower, TUNNEL_0); + PaintUtilPushTunnelRight(session, heightLower, TunnelType::StandardFlat); } else { imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { { 0, 6, heightLower }, { 32, 20, 3 } }); - PaintUtilPushTunnelLeft(session, heightLower, TUNNEL_0); + PaintUtilPushTunnelLeft(session, heightLower, TunnelType::StandardFlat); } if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? MetalSupportType::StickAlt : MetalSupportType::Stick, MetalSupportPlace::Centre, -1, - heightLower, session.SupportColours); + session, (direction & 1) ? MetalSupportType::StickAlt : kSupportType, MetalSupportPlace::Centre, -1, heightLower, + session.SupportColours); } PaintUtilSetSegmentSupportHeight( @@ -127,7 +132,7 @@ static void SubmarineRidePaintTrackFlat( PaintUtilRotateSegments( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 16, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 16); } static void SubmarineRidePaintTrackLeftQuarterTurn3Tiles( @@ -136,14 +141,13 @@ static void SubmarineRidePaintTrackLeftQuarterTurn3Tiles( { TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 3, height - 16, direction, trackSequence, session.TrackColours, - trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles); - TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height - 16, TUNNEL_0, direction, trackSequence); + kTrackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles); + TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height - 16, TunnelType::StandardFlat, direction, trackSequence); switch (trackSequence) { case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -1, height - 16, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height - 16, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -164,8 +168,7 @@ static void SubmarineRidePaintTrackLeftQuarterTurn3Tiles( 0xFFFF, 0); break; case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::Stick, MetalSupportPlace::Centre, -1, height - 16, session.SupportColours); + MetalASupportsPaintSetup(session, kSupportType, MetalSupportPlace::Centre, -1, height - 16, session.SupportColours); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( @@ -177,7 +180,7 @@ static void SubmarineRidePaintTrackLeftQuarterTurn3Tiles( break; } - PaintUtilSetGeneralSupportHeight(session, height + 16, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 16); } static constexpr uint8_t submarine_ride_right_quarter_turn_3_tiles_to_left_turn_map[] = { @@ -199,8 +202,9 @@ static void SubmarineRidePaintTrackLeftQuarterTurn1Tile( const TrackElement& trackElement) { TrackPaintUtilLeftQuarterTurn1TilePaint( - session, 1, height - 16, 0, direction, session.TrackColours, trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile); - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height - 16, 0, TUNNEL_0, 0, TUNNEL_0); + session, 1, height - 16, 0, direction, session.TrackColours, kTrackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile); + TrackPaintUtilLeftQuarterTurn1TileTunnel( + session, direction, height - 16, 0, TunnelType::StandardFlat, 0, TunnelType::StandardFlat); PaintUtilSetSegmentSupportHeight( session, @@ -209,7 +213,7 @@ static void SubmarineRidePaintTrackLeftQuarterTurn1Tile( PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide), direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 16, 0x20); + PaintUtilSetGeneralSupportHeight(session, height + 16); } static void SubmarineRidePaintTrackRightQuarterTurn1Tile( diff --git a/src/openrct2/ride/water/meta/BoatHire.h b/src/openrct2/ride/water/meta/BoatHire.h index 6da96f60eb..ab6f0322b5 100644 --- a/src/openrct2/ride/water/meta/BoatHire.h +++ b/src/openrct2/ride/water/meta/BoatHire.h @@ -31,7 +31,6 @@ constexpr RideTypeDescriptor BoatHireRTD = RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT, .RideModes = EnumsToFlags(RideMode::BoatHire), .DefaultMode = RideMode::BoatHire, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_BOAT_HIRE, STR_RIDE_DESCRIPTION_BOAT_HIRE }, .NameConvention = { RideComponentType::Boat, RideComponentType::DockingPlatform, RideComponentType::DockingPlatform }, .EnumName = nameof(RIDE_TYPE_BOAT_HIRE), diff --git a/src/openrct2/ride/water/meta/DinghySlide.h b/src/openrct2/ride/water/meta/DinghySlide.h index bad3c78765..491dd3989d 100644 --- a/src/openrct2/ride/water/meta/DinghySlide.h +++ b/src/openrct2/ride/water/meta/DinghySlide.h @@ -41,7 +41,6 @@ constexpr RideTypeDescriptor DinghySlideRTD = RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_DINGHY_SLIDE, STR_RIDE_DESCRIPTION_DINGHY_SLIDE }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_DINGHY_SLIDE), diff --git a/src/openrct2/ride/water/meta/LogFlume.h b/src/openrct2/ride/water/meta/LogFlume.h index 3791042a82..129306c08b 100644 --- a/src/openrct2/ride/water/meta/LogFlume.h +++ b/src/openrct2/ride/water/meta/LogFlume.h @@ -33,7 +33,6 @@ constexpr RideTypeDescriptor LogFlumeRTD = RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_LOG_FLUME, STR_RIDE_DESCRIPTION_LOG_FLUME }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_LOG_FLUME), diff --git a/src/openrct2/ride/water/meta/RiverRafts.h b/src/openrct2/ride/water/meta/RiverRafts.h index 411e8b374d..3946fc31ca 100644 --- a/src/openrct2/ride/water/meta/RiverRafts.h +++ b/src/openrct2/ride/water/meta/RiverRafts.h @@ -33,7 +33,6 @@ constexpr RideTypeDescriptor RiverRaftsRTD = RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER | RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_RIVER_RAFTS, STR_RIDE_DESCRIPTION_RIVER_RAFTS }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_RIVER_RAFTS), diff --git a/src/openrct2/ride/water/meta/RiverRapids.h b/src/openrct2/ride/water/meta/RiverRapids.h index 75798341e1..964e7cd163 100644 --- a/src/openrct2/ride/water/meta/RiverRapids.h +++ b/src/openrct2/ride/water/meta/RiverRapids.h @@ -34,7 +34,6 @@ constexpr RideTypeDescriptor RiverRapidsRTD = RIDE_TYPE_FLAG_HAS_AIR_TIME | RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_RIVER_RAPIDS, STR_RIDE_DESCRIPTION_RIVER_RAPIDS }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_RIVER_RAPIDS), diff --git a/src/openrct2/ride/water/meta/SplashBoats.h b/src/openrct2/ride/water/meta/SplashBoats.h index 8b09a53eab..bb1c7822cd 100644 --- a/src/openrct2/ride/water/meta/SplashBoats.h +++ b/src/openrct2/ride/water/meta/SplashBoats.h @@ -34,7 +34,6 @@ constexpr RideTypeDescriptor SplashBoatsRTD = RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER | RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_SPLASH_BOATS, STR_RIDE_DESCRIPTION_SPLASH_BOATS }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .EnumName = nameof(RIDE_TYPE_SPLASH_BOATS), diff --git a/src/openrct2/ride/water/meta/SubmarineRide.h b/src/openrct2/ride/water/meta/SubmarineRide.h index 285fdcc33d..ab9442828c 100644 --- a/src/openrct2/ride/water/meta/SubmarineRide.h +++ b/src/openrct2/ride/water/meta/SubmarineRide.h @@ -33,7 +33,6 @@ constexpr RideTypeDescriptor SubmarineRideRTD = RIDE_TYPE_FLAG_ALLOW_MORE_VEHICLES_THAN_STATION_FITS, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 0, 0, 0, 0, 0, 0 }, .Naming = { STR_RIDE_NAME_SUBMARINE_RIDE, STR_RIDE_DESCRIPTION_SUBMARINE_RIDE }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::DockingPlatform }, .EnumName = nameof(RIDE_TYPE_SUBMARINE_RIDE), diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index 6c31c7b02b..8735a6ee15 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -160,7 +160,7 @@ void ScenarioReset(GameState_t& gameState) gameState.LastEntranceStyle = 0; } - gMarketingCampaigns.clear(); + gameState.MarketingCampaigns.clear(); gameState.Park.RatingCasualtyPenalty = 0; // Open park with free entry when there is no money @@ -232,7 +232,7 @@ void ScenarioSuccessSubmitName(GameState_t& gameState, const char* name) static void ScenarioCheckEntranceFeeTooHigh() { const auto& gameState = GetGameState(); - const auto max_fee = AddClamp_money64(gameState.TotalRideValueForMoney, gameState.TotalRideValueForMoney / 2); + const auto max_fee = AddClamp(gameState.TotalRideValueForMoney, gameState.TotalRideValueForMoney / 2); if ((gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) && Park::GetEntranceFee() > max_fee) { @@ -243,7 +243,7 @@ static void ScenarioCheckEntranceFeeTooHigh() auto y = entrance.y + 16; uint32_t packed_xy = (y << 16) | x; - if (gConfigNotifications.ParkWarnings) + if (Config::Get().notifications.ParkWarnings) { News::AddItemToQueue(News::ItemType::Blank, STR_ENTRANCE_FEE_TOO_HI, packed_xy, {}); } @@ -260,7 +260,7 @@ void ScenarioAutosaveCheck() uint32_t timeSinceSave = Platform::GetTicks() - gLastAutoSaveUpdate; bool shouldSave = false; - switch (gConfigGeneral.AutosaveFrequency) + switch (Config::Get().general.AutosaveFrequency) { case AUTOSAVE_EVERY_MINUTE: shouldSave = timeSinceSave >= 1 * 60 * 1000; @@ -356,7 +356,7 @@ static void ScenarioUpdateDayNightCycle() float currentDayNightCycle = gDayNightCycle; gDayNightCycle = 0; - if (gScreenFlags == SCREEN_FLAGS_PLAYING && gConfigGeneral.DayNightCycle) + if (gScreenFlags == SCREEN_FLAGS_PLAYING && Config::Get().general.DayNightCycle) { float monthFraction = GetDate().GetMonthTicks() / static_cast(kTicksPerMonth); if (monthFraction < (1 / 8.0f)) @@ -659,7 +659,8 @@ ObjectiveStatus Objective::Check10RollerCoasters() const BitSet type_already_counted; for (const auto& ride : GetRideManager()) { - if (ride.status == RideStatus::Open && ride.excitement >= RIDE_RATING(6, 00) && ride.subtype != OBJECT_ENTRY_INDEX_NULL) + if (ride.status == RideStatus::Open && ride.ratings.excitement >= RIDE_RATING(6, 00) + && ride.subtype != OBJECT_ENTRY_INDEX_NULL) { auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) @@ -692,28 +693,28 @@ ObjectiveStatus Objective::CheckGuestsAndRating() const gameState.ScenarioParkRatingWarningDays++; if (gameState.ScenarioParkRatingWarningDays == 1) { - if (gConfigNotifications.ParkRatingWarnings) + if (Config::Get().notifications.ParkRatingWarnings) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING, 0, {}); } } else if (gameState.ScenarioParkRatingWarningDays == 8) { - if (gConfigNotifications.ParkRatingWarnings) + if (Config::Get().notifications.ParkRatingWarnings) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING, 0, {}); } } else if (gameState.ScenarioParkRatingWarningDays == 15) { - if (gConfigNotifications.ParkRatingWarnings) + if (Config::Get().notifications.ParkRatingWarnings) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING, 0, {}); } } else if (gameState.ScenarioParkRatingWarningDays == 22) { - if (gConfigNotifications.ParkRatingWarnings) + if (Config::Get().notifications.ParkRatingWarnings) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_1_WEEK_REMAINING, 0, {}); } @@ -760,7 +761,8 @@ ObjectiveStatus Objective::Check10RollerCoastersLength() const auto rcs = 0; for (const auto& ride : GetRideManager()) { - if (ride.status == RideStatus::Open && ride.excitement >= RIDE_RATING(7, 00) && ride.subtype != OBJECT_ENTRY_INDEX_NULL) + if (ride.status == RideStatus::Open && ride.ratings.excitement >= RIDE_RATING(7, 00) + && ride.subtype != OBJECT_ENTRY_INDEX_NULL) { auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) @@ -791,7 +793,7 @@ ObjectiveStatus Objective::CheckFinish5RollerCoasters() const auto rcs = 0; for (const auto& ride : GetRideManager()) { - if (ride.status != RideStatus::Closed && ride.excitement >= MinimumExcitement) + if (ride.status != RideStatus::Closed && ride.ratings.excitement >= MinimumExcitement) { auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) @@ -855,7 +857,7 @@ bool AllowEarlyCompletion() case NETWORK_MODE_NONE: case NETWORK_MODE_SERVER: default: - return gConfigGeneral.AllowEarlyCompletion; + return Config::Get().general.AllowEarlyCompletion; } } diff --git a/src/openrct2/scenario/ScenarioRepository.cpp b/src/openrct2/scenario/ScenarioRepository.cpp index a7e3d5af2b..573fd5f0aa 100644 --- a/src/openrct2/scenario/ScenarioRepository.cpp +++ b/src/openrct2/scenario/ScenarioRepository.cpp @@ -596,7 +596,7 @@ private: void Sort() { - if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) { std::sort( _scenarios.begin(), _scenarios.end(), [](const ScenarioIndexEntry& a, const ScenarioIndexEntry& b) -> bool { diff --git a/src/openrct2/scenario/ScenarioSources.cpp b/src/openrct2/scenario/ScenarioSources.cpp index e9bbee8360..2caace10eb 100644 --- a/src/openrct2/scenario/ScenarioSources.cpp +++ b/src/openrct2/scenario/ScenarioSources.cpp @@ -260,17 +260,17 @@ namespace ScenarioSources { SC_UNIDENTIFIED, "Dark Age - Robin Hood", SCENARIO_CATEGORY_BEGINNER }, { SC_UNIDENTIFIED, "Prehistoric - After the Asteroid", SCENARIO_CATEGORY_BEGINNER }, { SC_UNIDENTIFIED, "Roaring Twenties - Prison Island", SCENARIO_CATEGORY_BEGINNER }, - { SC_UNIDENTIFIED, "Rock 'n' Roll - Flower Power", SCENARIO_CATEGORY_BEGINNER }, - { SC_UNIDENTIFIED, "Dark Age - Castle", SCENARIO_CATEGORY_CHALLENGING }, - { SC_UNIDENTIFIED, "Future - First Encounters", SCENARIO_CATEGORY_CHALLENGING }, - { SC_UNIDENTIFIED, "Mythological - Animatronic Film Set", SCENARIO_CATEGORY_CHALLENGING }, - { SC_UNIDENTIFIED, "Prehistoric - Jurassic Safari", SCENARIO_CATEGORY_CHALLENGING }, + { SC_UNIDENTIFIED, "Future - First Encounters", SCENARIO_CATEGORY_BEGINNER }, { SC_UNIDENTIFIED, "Roaring Twenties - Schneider Cup", SCENARIO_CATEGORY_CHALLENGING }, - { SC_UNIDENTIFIED, "Future - Future World", SCENARIO_CATEGORY_EXPERT }, - { SC_UNIDENTIFIED, "Mythological - Cradle of Civilisation", SCENARIO_CATEGORY_EXPERT }, - { SC_UNIDENTIFIED, "Prehistoric - Stone Age", SCENARIO_CATEGORY_EXPERT }, + { SC_UNIDENTIFIED, "Prehistoric - Stone Age", SCENARIO_CATEGORY_CHALLENGING }, + { SC_UNIDENTIFIED, "Mythological - Cradle of Civilisation", SCENARIO_CATEGORY_CHALLENGING }, + { SC_UNIDENTIFIED, "Rock 'n' Roll - Rock 'n' Roll", SCENARIO_CATEGORY_CHALLENGING }, + { SC_UNIDENTIFIED, "Future - Future World", SCENARIO_CATEGORY_CHALLENGING }, { SC_UNIDENTIFIED, "Roaring Twenties - Skyscrapers", SCENARIO_CATEGORY_EXPERT }, - { SC_UNIDENTIFIED, "Rock 'n' Roll - Rock 'n' Roll", SCENARIO_CATEGORY_EXPERT }, + { SC_UNIDENTIFIED, "Rock 'n' Roll - Flower Power", SCENARIO_CATEGORY_EXPERT }, + { SC_UNIDENTIFIED, "Dark Age - Castle", SCENARIO_CATEGORY_EXPERT }, + { SC_UNIDENTIFIED, "Mythological - Animatronic Film Set", SCENARIO_CATEGORY_EXPERT }, + { SC_UNIDENTIFIED, "Prehistoric - Jurassic Safari", SCENARIO_CATEGORY_EXPERT }, }; // User Created Expansion Sets diff --git a/src/openrct2/scenes/Scene.cpp b/src/openrct2/scenes/Scene.cpp index 8f2681b29e..af5d8fdc7f 100644 --- a/src/openrct2/scenes/Scene.cpp +++ b/src/openrct2/scenes/Scene.cpp @@ -28,3 +28,16 @@ GameState_t& Scene::GetGameState() { return OpenRCT2::GetGameState(); } + +void Scene::FinishScene() +{ + if (_onComplete != nullptr) + { + _onComplete(); + } +} + +void Scene::SetOnComplete(std::function onComplete) +{ + _onComplete = onComplete; +} diff --git a/src/openrct2/scenes/Scene.h b/src/openrct2/scenes/Scene.h index 4e1e135d88..fce0571ad9 100644 --- a/src/openrct2/scenes/Scene.h +++ b/src/openrct2/scenes/Scene.h @@ -11,6 +11,8 @@ #include "../common.h" +#include + namespace OpenRCT2 { struct GameState_t; @@ -27,6 +29,8 @@ namespace OpenRCT2 virtual void Load() = 0; virtual void Tick() = 0; virtual void Stop() = 0; + + virtual void SetOnComplete(std::function) = 0; }; class Scene : public IScene @@ -37,8 +41,14 @@ namespace OpenRCT2 GameState_t& GetGameState() override; IContext& GetContext() override; + void SetOnComplete(std::function) override; + + protected: + void FinishScene(); + protected: IContext& _context; + std::function _onComplete{}; }; } // namespace OpenRCT2 diff --git a/src/openrct2/scenes/preloader/PreloaderScene.cpp b/src/openrct2/scenes/preloader/PreloaderScene.cpp new file mode 100644 index 0000000000..ad520cc16c --- /dev/null +++ b/src/openrct2/scenes/preloader/PreloaderScene.cpp @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 "PreloaderScene.h" + +#include "../../Context.h" +#include "../../Game.h" +#include "../../GameState.h" +#include "../../OpenRCT2.h" +#include "../../audio/audio.h" +#include "../../drawing/IDrawingContext.h" +#include "../../drawing/IDrawingEngine.h" +#include "../../interface/Viewport.h" +#include "../../interface/Window.h" +#include "../../localisation/LocalisationService.h" +#include "../../localisation/StringIds.h" +#include "../../windows/Intent.h" + +#include + +using namespace OpenRCT2; + +PreloaderScene::PreloaderScene(IContext& context) + : Scene(context) + , _jobs(1) +{ +} + +void PreloaderScene::Load() +{ + LOG_VERBOSE("PreloaderScene::Load()"); + + gScreenFlags = SCREEN_FLAGS_PLAYING; + gameStateInitAll(GetGameState(), DEFAULT_MAP_SIZE); + ViewportInitAll(); + ContextOpenWindow(WindowClass::MainWindow); + WindowResizeGui(ContextGetWidth(), ContextGetHeight()); + + // Reset screen + auto* engine = GetContext().GetDrawingEngine(); + auto* drawingContext = engine->GetDrawingContext(); + drawingContext->Clear(*engine->GetDrawingPixelInfo(), PALETTE_INDEX_10); + + LOG_VERBOSE("PreloaderScene::Load() finished"); +} + +void PreloaderScene::Tick() +{ + gInUpdateCode = true; + + ContextHandleInput(); + WindowInvalidateAll(); + + gInUpdateCode = false; + + if (_jobs.CountPending() == 0 && _jobs.CountProcessing() == 0) + { + // Make sure the job is fully completed. + _jobs.Join(); + + FinishScene(); + } +} + +void PreloaderScene::Stop() +{ + Audio::StopAll(); +} diff --git a/src/openrct2/scenes/preloader/PreloaderScene.h b/src/openrct2/scenes/preloader/PreloaderScene.h new file mode 100644 index 0000000000..09324df707 --- /dev/null +++ b/src/openrct2/scenes/preloader/PreloaderScene.h @@ -0,0 +1,34 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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/JobPool.h" +#include "../../drawing/Drawing.h" +#include "../Scene.h" + +namespace OpenRCT2 +{ + class PreloaderScene final : public Scene + { + public: + PreloaderScene(IContext& context); + + void Load() override; + void Tick() override; + void Stop() override; + void AddJob(const std::function& fn) + { + _jobs.AddTask(fn); + } + + private: + JobPool _jobs; + }; +} // namespace OpenRCT2 diff --git a/src/openrct2/scenes/title/Command/FollowEntity.h b/src/openrct2/scenes/title/Command/FollowEntity.h index 4499292efa..0cc98a18a9 100644 --- a/src/openrct2/scenes/title/Command/FollowEntity.h +++ b/src/openrct2/scenes/title/Command/FollowEntity.h @@ -25,7 +25,7 @@ namespace OpenRCT2::Title struct { EntityId SpriteIndex{ EntityId::GetNull() }; - utf8 SpriteName[USER_STRING_MAX_LENGTH]{}; + utf8 SpriteName[kUserStringMaxLength]{}; } Follow; int16_t operator()(int16_t timer); diff --git a/src/openrct2/scenes/title/TitleScene.cpp b/src/openrct2/scenes/title/TitleScene.cpp index bc9e06b89a..6fff90c50b 100644 --- a/src/openrct2/scenes/title/TitleScene.cpp +++ b/src/openrct2/scenes/title/TitleScene.cpp @@ -18,7 +18,7 @@ #include "../../audio/audio.h" #include "../../config/Config.h" #include "../../core/Console.hpp" -#include "../../drawing/Drawing.h" +#include "../../drawing/Text.h" #include "../../interface/Screenshot.h" #include "../../interface/Viewport.h" #include "../../interface/Window.h" @@ -29,6 +29,7 @@ #include "../../scenario/ScenarioRepository.h" #include "../../ui/UiContext.h" #include "../../util/Util.h" +#include "../../windows/Intent.h" #include "TitleSequence.h" #include "TitleSequenceManager.h" #include "TitleSequencePlayer.h" @@ -120,6 +121,9 @@ void TitleScene::Load() ViewportInitAll(); ContextOpenWindow(WindowClass::MainWindow); CreateWindows(); + + GetContext().OpenProgress(STR_LOADING_TITLE_SEQUENCE); + TitleInitialise(); OpenRCT2::Audio::PlayTitleMusic(); @@ -138,6 +142,8 @@ void TitleScene::Load() _sequencePlayer->Update(); } + GetContext().CloseProgress(); + LOG_VERBOSE("TitleScene::Load() finished"); } @@ -187,7 +193,7 @@ void TitleScene::ChangePresetSequence(size_t preset) } const utf8* configId = TitleSequenceManagerGetConfigID(preset); - gConfigInterface.CurrentTitleSequencePreset = configId; + Config::Get().interface.CurrentTitleSequencePreset = configId; if (!_previewingSequence) _currentSequence = preset; @@ -214,7 +220,7 @@ void TitleScene::TitleInitialise() { _sequencePlayer = GetContext().GetUiContext()->GetTitleSequencePlayer(); } - if (gConfigInterface.RandomTitleSequence) + if (Config::Get().interface.RandomTitleSequence) { const size_t total = TitleSequenceManager::GetCount(); if (total > 0) @@ -310,7 +316,7 @@ bool TitleScene::TryLoadSequence(bool loadPreview) { // Forcefully change the preset to a preset that works. const utf8* configId = TitleSequenceManagerGetConfigID(targetSequence); - gConfigInterface.CurrentTitleSequencePreset = configId; + Config::Get().interface.CurrentTitleSequencePreset = configId; } _currentSequence = targetSequence; GfxInvalidateScreen(); @@ -387,7 +393,7 @@ void TitleSetHideVersionInfo(bool value) size_t TitleGetConfigSequence() { - return TitleSequenceManagerGetIndexForConfigID(gConfigInterface.CurrentTitleSequencePreset.c_str()); + return TitleSequenceManagerGetIndexForConfigID(Config::Get().interface.CurrentTitleSequencePreset.c_str()); } size_t TitleGetCurrentSequence() @@ -442,7 +448,7 @@ void DrawOpenRCT2(DrawPixelInfo& dpi, const ScreenCoordsXY& screenCoords) // Write name and version information buffer += gVersionInfoFull; - GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 5 - 13), buffer.c_str(), { COLOUR_BLACK }); + DrawText(dpi, screenCoords + ScreenCoordsXY(5, 5 - 13), { COLOUR_BLACK }, buffer.c_str()); int16_t width = static_cast(GfxGetStringWidth(buffer, FontStyle::Medium)); // Write platform information @@ -452,7 +458,7 @@ void DrawOpenRCT2(DrawPixelInfo& dpi, const ScreenCoordsXY& screenCoords) buffer.append(OPENRCT2_ARCHITECTURE); buffer.append(")"); - GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 5), buffer.c_str(), { COLOUR_BLACK }); + DrawText(dpi, screenCoords + ScreenCoordsXY(5, 5), { COLOUR_BLACK }, buffer.c_str()); width = std::max(width, static_cast(GfxGetStringWidth(buffer, FontStyle::Medium))); // Invalidate screen area diff --git a/src/openrct2/scenes/title/TitleSequence.cpp b/src/openrct2/scenes/title/TitleSequence.cpp index 45bddbd18c..a96a2e7229 100644 --- a/src/openrct2/scenes/title/TitleSequence.cpp +++ b/src/openrct2/scenes/title/TitleSequence.cpp @@ -380,7 +380,7 @@ namespace OpenRCT2::Title { auto entityID = EntityId::FromUnderlying(atoi(parts[1].data()) & 0xFFFF); auto followCommand = FollowEntityCommand{ entityID }; - SafeStrCpy(followCommand.Follow.SpriteName, parts[2].data(), USER_STRING_MAX_LENGTH); + SafeStrCpy(followCommand.Follow.SpriteName, parts[2].data(), kUserStringMaxLength); command = followCommand; } else if (String::IEquals(token, "WAIT")) diff --git a/src/openrct2/scenes/title/TitleSequenceManager.cpp b/src/openrct2/scenes/title/TitleSequenceManager.cpp index f4ff56ffb6..abce274104 100644 --- a/src/openrct2/scenes/title/TitleSequenceManager.cpp +++ b/src/openrct2/scenes/title/TitleSequenceManager.cpp @@ -18,10 +18,11 @@ #include "../../core/Memory.hpp" #include "../../core/Path.hpp" #include "../../core/String.hpp" -#include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../platform/Platform.h" #include "TitleSequence.h" +#include #include #include diff --git a/src/openrct2/scripting/IconNames.hpp b/src/openrct2/scripting/IconNames.hpp index f15ed49527..e9c6cd7bf3 100644 --- a/src/openrct2/scripting/IconNames.hpp +++ b/src/openrct2/scripting/IconNames.hpp @@ -19,7 +19,60 @@ namespace OpenRCT2::Scripting { // When adding to this map, also add to IconName in openrct2.d.ts - static EnumMap G2SpriteLookupTable = { + static EnumMap SpriteLookupTable = { + // G1 Icons + { "previous", SPR_PREVIOUS }, + { "next", SPR_NEXT }, + { "chain_lift", SPR_CHAIN_LIFT }, + { "construction", SPR_CONSTRUCTION }, + { "demolish", SPR_DEMOLISH }, + { "locate", SPR_LOCATE }, + { "rename", SPR_RENAME }, + { "rotate_arrow", SPR_ROTATE_ARROW }, + { "scenery", SPR_SCENERY }, + { "scenery_cluster", SPR_SCENERY_CLUSTER }, + { "paintbrush", SPR_PAINTBRUSH }, + { "pickup", SPR_PICKUP_BTN }, + { "patrol", SPR_PATROL_BTN }, + { "no_entry", SPR_NO_ENTRY }, + { "closed", SPR_CLOSED }, + { "open", SPR_OPEN }, + { "testing", SPR_TESTING }, + { "floppy_disk", SPR_FLOPPY }, + { "ride", SPR_TAB_RIDE_0 }, + { "new_ride", SPR_NEW_RIDE }, + { "finance", SPR_FINANCE }, + { "map", SPR_MAP }, + { "guests", SPR_GUESTS }, + { "award", SPR_AWARD }, + { "awards", SPR_TAB_AWARDS }, + { "graph", SPR_GRAPH }, + { "mechanic", SPR_MECHANIC }, + { "guest_inventory", SPR_TAB_GUEST_INVENTORY }, + { "research", SPR_TAB_FINANCES_RESEARCH_0 }, + { "music", SPR_TAB_MUSIC_0 }, + { "shops_and_stalls", SPR_TAB_SHOPS_AND_STALLS_0 }, + { "kiosks_and_facilities", SPR_TAB_KIOSKS_AND_FACILITIES_0 }, + { "scenery_trees", SPR_TAB_SCENERY_TREES }, + { "scenery_urban", SPR_TAB_SCENERY_URBAN }, + { "scenery_walls", SPR_TAB_SCENERY_WALLS }, + { "scenery_signage", SPR_TAB_SCENERY_SIGNAGE }, + { "scenery_paths", SPR_TAB_SCENERY_PATHS }, + { "scenery_paths_items", SPR_TAB_SCENERY_PATH_ITEMS }, + { "scenery_statues", SPR_TAB_SCENERY_STATUES }, + { "park", SPR_TAB_PARK }, + { "water", SPR_TAB_WATER }, + { "stats", SPR_TAB_STATS }, + { "question", SPR_TAB_QUESTION }, + { "rides_shop", SPR_TAB_RIDES_SHOP_0 }, + { "rides_transport", SPR_TAB_RIDES_TRANSPORT_0 }, + { "rides_gentle", SPR_TAB_RIDES_GENTLE_0 }, + { "rides_rollercoasters", SPR_TAB_RIDES_ROLLER_COASTERS_0 }, + { "rides_water", SPR_TAB_RIDES_WATER_0 }, + { "rides_thrill", SPR_TAB_RIDES_THRILL_0 }, + { "pause", SPR_TOOLBAR_PAUSE }, + + // G2 Icons { "empty", SPR_G2_EMPTY }, { "placeholder", SPR_G2_PLACEHOLDER }, { "logo", SPR_G2_LOGO }, @@ -213,8 +266,8 @@ namespace OpenRCT2::Scripting inline uint32_t GetIconByName(const std::string& input) { - auto result = G2SpriteLookupTable.find(input); - if (result != G2SpriteLookupTable.end()) + auto result = SpriteLookupTable.find(input); + if (result != SpriteLookupTable.end()) return result->second; return SPR_G2_EMPTY; } diff --git a/src/openrct2/scripting/Plugin.cpp b/src/openrct2/scripting/Plugin.cpp index 81a199dad9..7a6d7efa69 100644 --- a/src/openrct2/scripting/Plugin.cpp +++ b/src/openrct2/scripting/Plugin.cpp @@ -68,7 +68,7 @@ void Plugin::Load() { auto val = std::string(duk_safe_to_string(_context, -1)); duk_pop(_context); - throw std::runtime_error("Failed to load plug-in script: " + val); + throw std::runtime_error("Failed to load plug-in script: " + val + " at " + _path); } _metadata = GetMetadata(DukValue::take_from_stack(_context)); @@ -160,13 +160,13 @@ PluginMetadata Plugin::GetMetadata(const DukValue& dukMetadata) auto dukMinApiVersion = dukMetadata["minApiVersion"]; if (dukMinApiVersion.type() == DukValue::Type::NUMBER) { - metadata.MinApiVersion = dukMinApiVersion.as_int(); + metadata.MinApiVersion = dukMinApiVersion.as_uint(); } auto dukTargetApiVersion = dukMetadata["targetApiVersion"]; if (dukTargetApiVersion.type() == DukValue::Type::NUMBER) { - metadata.TargetApiVersion = dukTargetApiVersion.as_int(); + metadata.TargetApiVersion = dukTargetApiVersion.as_uint(); } else { diff --git a/src/openrct2/scripting/ScriptEngine.cpp b/src/openrct2/scripting/ScriptEngine.cpp index 42fec5d6e3..0ae1e48a2c 100644 --- a/src/openrct2/scripting/ScriptEngine.cpp +++ b/src/openrct2/scripting/ScriptEngine.cpp @@ -12,10 +12,13 @@ # include "ScriptEngine.h" # include "../PlatformEnvironment.h" +# include "../actions/BannerPlaceAction.h" # include "../actions/CustomAction.h" # include "../actions/GameAction.h" +# include "../actions/LargeSceneryPlaceAction.h" # include "../actions/RideCreateAction.h" # include "../actions/StaffHireNewAction.h" +# include "../actions/WallPlaceAction.h" # include "../config/Config.h" # include "../core/EnumMap.hpp" # include "../core/File.h" @@ -27,6 +30,7 @@ # include "bindings/entity/ScEntity.hpp" # include "bindings/entity/ScGuest.hpp" # include "bindings/entity/ScLitter.hpp" +# include "bindings/entity/ScParticle.hpp" # include "bindings/entity/ScPeep.hpp" # include "bindings/entity/ScStaff.hpp" # include "bindings/entity/ScVehicle.hpp" @@ -433,6 +437,7 @@ void ScriptEngine::Initialise() ScEntity::Register(ctx); ScLitter::Register(ctx); ScVehicle::Register(ctx); + ScCrashedVehicleParticle::Register(ctx); ScPeep::Register(ctx); ScGuest::Register(ctx); ScThought::Register(ctx); @@ -572,7 +577,7 @@ void ScriptEngine::RefreshPlugins() } // Turn on hot reload if not already enabled - if (!_hotReloadingInitialised && gConfigPlugin.EnableHotReloading && NetworkGetMode() == NETWORK_MODE_NONE) + if (!_hotReloadingInitialised && Config::Get().plugin.EnableHotReloading && NetworkGetMode() == NETWORK_MODE_NONE) { SetupHotReloading(); } @@ -1220,6 +1225,26 @@ DukValue ScriptEngine::GameActionResultToDuk(const GameAction& action, const Gam } } } + // BannerPlaceAction, LargeSceneryPlaceAction, WallPlaceAction + auto bannerId = BannerIndex::GetNull(); + switch (action.GetType()) + { + case GameCommand::PlaceBanner: + bannerId = result.GetData().bannerId; + break; + case GameCommand::PlaceLargeScenery: + bannerId = result.GetData().bannerId; + break; + case GameCommand::PlaceWall: + bannerId = result.GetData().BannerId; + break; + default: + break; + } + if (!bannerId.IsNull()) + { + obj.Set("bannerIndex", bannerId.ToUnderlying()); + } return obj.Take(); } diff --git a/src/openrct2/scripting/ScriptEngine.h b/src/openrct2/scripting/ScriptEngine.h index e0e64948bd..0ccdce54a5 100644 --- a/src/openrct2/scripting/ScriptEngine.h +++ b/src/openrct2/scripting/ScriptEngine.h @@ -47,7 +47,7 @@ namespace OpenRCT2 namespace OpenRCT2::Scripting { - static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 85; + static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 94; // Versions marking breaking changes. static constexpr int32_t API_VERSION_33_PEEP_DEPRECATION = 33; @@ -262,6 +262,9 @@ namespace OpenRCT2::Scripting IntervalHandle AddInterval(const std::shared_ptr& plugin, int32_t delay, bool repeat, DukValue&& callback); void RemoveInterval(const std::shared_ptr& plugin, IntervalHandle handle); + static std::string_view ExpenditureTypeToString(ExpenditureType expenditureType); + static ExpenditureType StringToExpenditureType(std::string_view expenditureType); + # ifndef DISABLE_NETWORK void AddSocket(const std::shared_ptr& socket); # endif @@ -289,8 +292,6 @@ namespace OpenRCT2::Scripting void ProcessREPL(); void RemoveCustomGameActions(const std::shared_ptr& plugin); [[nodiscard]] GameActions::Result DukToGameActionResult(const DukValue& d); - static std::string_view ExpenditureTypeToString(ExpenditureType expenditureType); - static ExpenditureType StringToExpenditureType(std::string_view expenditureType); void InitSharedStorage(); void LoadSharedStorage(); diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index f6072f989d..bde8fd4b48 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -11,8 +11,11 @@ # include "ScGuest.hpp" +# include "../../../GameState.h" # include "../../../entity/Guest.h" # include "../../../localisation/Localisation.h" +# include "../../../peep/PeepAnimationData.h" +# include "../../../ride/RideEntry.h" namespace OpenRCT2::Scripting { @@ -144,6 +147,35 @@ namespace OpenRCT2::Scripting { "here_we_are", PeepThoughtType::HereWeAre }, }); + static const DukEnumMap availableGuestAnimations({ + { "walking", PeepActionSpriteType::None }, + { "checkTime", PeepActionSpriteType::CheckTime }, + { "watchRide", PeepActionSpriteType::WatchRide }, + { "eatFood", PeepActionSpriteType::EatFood }, + { "shakeHead", PeepActionSpriteType::ShakeHead }, + { "emptyPockets", PeepActionSpriteType::EmptyPockets }, + { "holdMat", PeepActionSpriteType::HoldMat }, + { "sittingIdle", PeepActionSpriteType::SittingIdle }, + { "sittingEatFood", PeepActionSpriteType::SittingEatFood }, + { "sittingLookAroundLeft", PeepActionSpriteType::SittingLookAroundLeft }, + { "sittingLookAroundRight", PeepActionSpriteType::SittingLookAroundRight }, + { "hanging", PeepActionSpriteType::Ui }, + { "wow", PeepActionSpriteType::Wow }, + { "throwUp", PeepActionSpriteType::ThrowUp }, + { "jump", PeepActionSpriteType::Jump }, + { "drowning", PeepActionSpriteType::Drowning }, + { "joy", PeepActionSpriteType::Joy }, + { "readMap", PeepActionSpriteType::ReadMap }, + { "wave", PeepActionSpriteType::Wave }, + { "wave2", PeepActionSpriteType::Wave2 }, + { "takePhoto", PeepActionSpriteType::TakePhoto }, + { "clap", PeepActionSpriteType::Clap }, + { "disgust", PeepActionSpriteType::Disgust }, + { "drawPicture", PeepActionSpriteType::DrawPicture }, + { "beingWatched", PeepActionSpriteType::BeingWatched }, + { "withdrawMoney", PeepActionSpriteType::WithdrawMoney }, + }); + ScGuest::ScGuest(EntityId id) : ScPeep(id) { @@ -172,8 +204,14 @@ namespace OpenRCT2::Scripting dukglue_register_property(ctx, &ScGuest::isInPark_get, nullptr, "isInPark"); dukglue_register_property(ctx, &ScGuest::isLost_get, nullptr, "isLost"); dukglue_register_property(ctx, &ScGuest::lostCountdown_get, &ScGuest::lostCountdown_set, "lostCountdown"); + dukglue_register_property(ctx, &ScGuest::favouriteRide_get, &ScGuest::favouriteRide_set, "favouriteRide"); dukglue_register_property(ctx, &ScGuest::thoughts_get, nullptr, "thoughts"); dukglue_register_property(ctx, &ScGuest::items_get, nullptr, "items"); + dukglue_register_property(ctx, &ScGuest::availableAnimations_get, nullptr, "availableAnimations"); + dukglue_register_property(ctx, &ScGuest::animation_get, &ScGuest::animation_set, "animation"); + dukglue_register_property(ctx, &ScGuest::animationOffset_get, &ScGuest::animationOffset_set, "animationOffset"); + dukglue_register_property(ctx, &ScGuest::animationLength_get, nullptr, "animationLength"); + dukglue_register_method(ctx, &ScGuest::getAnimationSpriteIds, "getAnimationSpriteIds"); dukglue_register_method(ctx, &ScGuest::has_item, "hasItem"); dukglue_register_method(ctx, &ScGuest::give_item, "giveItem"); dukglue_register_method(ctx, &ScGuest::remove_item, "removeItem"); @@ -472,6 +510,47 @@ namespace OpenRCT2::Scripting } } + DukValue ScGuest::favouriteRide_get() const + { + auto& scriptEngine = GetContext()->GetScriptEngine(); + auto* ctx = scriptEngine.GetContext(); + auto peep = GetGuest(); + if (peep != nullptr) + { + if (peep->FavouriteRide != RideId::GetNull()) + { + duk_push_int(ctx, peep->FavouriteRide.ToUnderlying()); + } + else + { + duk_push_null(ctx); + } + } + else + { + duk_push_null(ctx); + } + return DukValue::take_from_stack(ctx); + } + + void ScGuest::favouriteRide_set(const DukValue& value) + { + ThrowIfGameStateNotMutable(); + auto peep = GetGuest(); + if (peep != nullptr) + { + if (value.type() == DukValue::Type::NUMBER && value.as_uint() < GetGameState().Rides.size() + && GetGameState().Rides[value.as_uint()].type != RIDE_TYPE_NULL) + { + peep->FavouriteRide = RideId::FromUnderlying(value.as_uint()); + } + else + { + peep->FavouriteRide = RideId::GetNull(); + } + } + } + DukValue ScGuest::thoughts_get() const { auto ctx = GetContext()->GetScriptEngine().GetContext(); @@ -791,6 +870,131 @@ namespace OpenRCT2::Scripting } } + std::vector ScGuest::availableAnimations_get() const + { + std::vector availableAnimations{}; + for (auto& animation : availableGuestAnimations) + { + availableAnimations.push_back(std::string(animation.first)); + } + return availableAnimations; + } + + std::vector ScGuest::getAnimationSpriteIds(std::string groupKey, uint8_t rotation) const + { + std::vector spriteIds{}; + + auto animationType = availableGuestAnimations.TryGet(groupKey); + if (animationType == std::nullopt) + { + return spriteIds; + } + + auto peep = GetPeep(); + if (peep != nullptr) + { + auto& animationGroup = GetPeepAnimation(peep->SpriteType, *animationType); + for (auto frameOffset : animationGroup.frame_offsets) + { + auto imageId = animationGroup.base_image; + if (animationType != PeepActionSpriteType::Ui) + imageId += rotation + frameOffset * 4; + else + imageId += frameOffset; + + spriteIds.push_back(imageId); + } + } + return spriteIds; + } + + std::string ScGuest::animation_get() const + { + auto* peep = GetGuest(); + if (peep == nullptr) + { + return nullptr; + } + + std::string_view action = availableGuestAnimations[peep->ActionSpriteType]; + + // Special consideration for sitting peeps + // TODO: something funky going on in the state machine + if (peep->ActionSpriteType == PeepActionSpriteType::None && peep->State == PeepState::Sitting) + action = availableGuestAnimations[PeepActionSpriteType::SittingIdle]; + + return std::string(action); + } + + void ScGuest::animation_set(std::string groupKey) + { + ThrowIfGameStateNotMutable(); + + auto newType = availableGuestAnimations.TryGet(groupKey); + if (newType == std::nullopt) + { + throw DukException() << "Invalid animation for this guest (" << groupKey << ")"; + } + + auto* peep = GetGuest(); + peep->ActionSpriteType = peep->NextActionSpriteType = *newType; + + auto offset = 0; + if (peep->IsActionWalking()) + peep->WalkingFrameNum = offset; + else + peep->ActionFrame = offset; + + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->UpdateSpriteBoundingBox(); + } + + uint8_t ScGuest::animationOffset_get() const + { + auto* peep = GetGuest(); + if (peep == nullptr) + { + return 0; + } + + if (peep->IsActionWalking()) + return peep->WalkingFrameNum; + else + return peep->ActionFrame; + } + + void ScGuest::animationOffset_set(uint8_t offset) + { + ThrowIfGameStateNotMutable(); + + auto* peep = GetGuest(); + + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto length = animationGroup.frame_offsets.size(); + offset %= length; + + if (peep->IsActionWalking()) + peep->WalkingFrameNum = offset; + else + peep->ActionFrame = offset; + + peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->UpdateSpriteBoundingBox(); + } + + uint8_t ScGuest::animationLength_get() const + { + auto* peep = GetGuest(); + if (peep == nullptr) + { + return 0; + } + + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + return static_cast(animationGroup.frame_offsets.size()); + } + ScThought::ScThought(PeepThought backing) : _backing(backing) { diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.hpp b/src/openrct2/scripting/bindings/entity/ScGuest.hpp index 4aa6f48285..3f37303da9 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.hpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.hpp @@ -14,6 +14,8 @@ # include "../../../entity/Guest.h" # include "ScPeep.hpp" +enum class PeepActionSpriteType : uint8_t; + namespace OpenRCT2::Scripting { static const DukEnumMap ShopItemMap({ @@ -165,6 +167,9 @@ namespace OpenRCT2::Scripting uint8_t lostCountdown_get() const; void lostCountdown_set(uint8_t value); + DukValue favouriteRide_get() const; + void favouriteRide_set(const DukValue& value); + DukValue thoughts_get() const; DukValue items_get() const; @@ -172,6 +177,14 @@ namespace OpenRCT2::Scripting void give_item(const DukValue& item) const; void remove_item(const DukValue& item) const; void remove_all_items() const; + + std::vector availableAnimations_get() const; + std::vector getAnimationSpriteIds(std::string groupKey, uint8_t rotation) const; + std::string animation_get() const; + void animation_set(std::string groupKey); + uint8_t animationOffset_get() const; + void animationOffset_set(uint8_t offset); + uint8_t animationLength_get() const; }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/entity/ScParticle.cpp b/src/openrct2/scripting/bindings/entity/ScParticle.cpp new file mode 100644 index 0000000000..e65cad7033 --- /dev/null +++ b/src/openrct2/scripting/bindings/entity/ScParticle.cpp @@ -0,0 +1,225 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 "ScParticle.hpp" + +#include "../ride/ScRide.hpp" + +#ifdef ENABLE_SCRIPTING + +namespace OpenRCT2::Scripting +{ + static const DukEnumMap CrashParticleTypeMap({ + { "corner", 0 }, + { "rod", 1 }, + { "wheel", 2 }, + { "panel", 3 }, + { "seat", 4 }, + }); + + ScCrashedVehicleParticle::ScCrashedVehicleParticle(EntityId id) + : ScEntity(id) + { + } + + void ScCrashedVehicleParticle::Register(duk_context* ctx) + { + dukglue_set_base_class(ctx); + dukglue_register_property( + ctx, &ScCrashedVehicleParticle::acceleration_get, &ScCrashedVehicleParticle::acceleration_set, "acceleration"); + dukglue_register_property( + ctx, &ScCrashedVehicleParticle::velocity_get, &ScCrashedVehicleParticle::velocity_set, "velocity"); + dukglue_register_property( + ctx, &ScCrashedVehicleParticle::colours_get, &ScCrashedVehicleParticle::colours_set, "colours"); + dukglue_register_property( + ctx, &ScCrashedVehicleParticle::timeToLive_get, &ScCrashedVehicleParticle::timeToLive_set, "timeToLive"); + dukglue_register_property( + ctx, &ScCrashedVehicleParticle::crashedSpriteBase_get, &ScCrashedVehicleParticle::crashedSpriteBase_set, + "crashParticleType"); + dukglue_register_property(ctx, &ScCrashedVehicleParticle::frame_get, &ScCrashedVehicleParticle::frame_set, "frame"); + dukglue_register_method(ctx, &ScCrashedVehicleParticle::Launch, "launch"); + } + + VehicleCrashParticle* ScCrashedVehicleParticle::GetCrashedVehicleParticle() const + { + return ::GetEntity(_id); + } + + void ScCrashedVehicleParticle::frame_set(uint8_t value) + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + entity->frame = std::clamp(value, 0, kCrashedVehicleParticleNumberSprites - 1) + * kCrashedVehicleParticleFrameToSprite; + } + } + uint8_t ScCrashedVehicleParticle::frame_get() const + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + return entity->frame / kCrashedVehicleParticleFrameToSprite; + } + return 0; + } + + void ScCrashedVehicleParticle::crashedSpriteBase_set(const std::string& value) + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + entity->crashed_sprite_base = CrashParticleTypeMap[value]; + } + } + std::string ScCrashedVehicleParticle::crashedSpriteBase_get() const + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + return std::string(CrashParticleTypeMap[entity->crashed_sprite_base]); + } + return {}; + } + + void ScCrashedVehicleParticle::timeToLive_set(uint16_t value) + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + entity->time_to_live = value; + } + } + uint16_t ScCrashedVehicleParticle::timeToLive_get() const + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + return entity->time_to_live; + } + return 0; + } + + void ScCrashedVehicleParticle::velocity_set(const DukValue& value) + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + auto velocity = FromDuk(value); + entity->velocity_x = velocity.x; + entity->velocity_y = velocity.y; + entity->velocity_z = velocity.z; + } + } + DukValue ScCrashedVehicleParticle::velocity_get() const + { + auto ctx = GetContext()->GetScriptEngine().GetContext(); + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + return ToDuk(ctx, CoordsXYZ(entity->velocity_x, entity->velocity_y, entity->velocity_z)); + } + return {}; + } + + void ScCrashedVehicleParticle::acceleration_set(const DukValue& value) + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + auto acceleration = FromDuk(value); + entity->acceleration_x = acceleration.x; + entity->acceleration_y = acceleration.y; + entity->acceleration_z = acceleration.z; + } + } + DukValue ScCrashedVehicleParticle::acceleration_get() const + { + auto ctx = GetContext()->GetScriptEngine().GetContext(); + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + return ToDuk(ctx, CoordsXYZ(entity->acceleration_x, entity->acceleration_y, entity->acceleration_z)); + } + return {}; + } + + void ScCrashedVehicleParticle::Launch(const DukValue& value) + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + entity->SetSpriteData(); + entity->Launch(); + + if (value.type() == DukValue::Type::UNDEFINED) + return; + + if (value["colours"].type() == DukValue::Type::OBJECT) + { + auto coloursInt = FromDuk(value["colours"]); + entity->colour[0] = coloursInt.Body; + entity->colour[1] = coloursInt.Trim; + } + if (value["acceleration"].type() == DukValue::Type::OBJECT) + { + auto accelerationXYZ = FromDuk(value["acceleration"]); + entity->acceleration_x = accelerationXYZ.x; + entity->acceleration_y = accelerationXYZ.y; + entity->acceleration_z = accelerationXYZ.z; + } + if (value["velocity"].type() == DukValue::Type::OBJECT) + { + auto velocityXYZ = FromDuk(value["velocity"]); + entity->velocity_x = velocityXYZ.x; + entity->velocity_y = velocityXYZ.y; + entity->velocity_z = velocityXYZ.z; + } + if (value["timeToLive"].type() == DukValue::Type::NUMBER) + { + entity->time_to_live = value["timeToLive"].as_uint(); + } + if (value["frame"].type() == DukValue::Type::NUMBER) + { + entity->frame = std::clamp(value["frame"].as_uint(), 0, kCrashedVehicleParticleNumberSprites - 1) + * kCrashedVehicleParticleFrameToSprite; + } + if (value["crashParticleType"].type() == DukValue::Type::STRING) + { + entity->crashed_sprite_base = CrashParticleTypeMap[value["crashParticleType"].as_string()]; + } + } + } + + DukValue ScCrashedVehicleParticle::colours_get() const + { + auto ctx = GetContext()->GetScriptEngine().GetContext(); + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + DukObject dukColour(ctx); + dukColour.Set("body", entity->colour[0]); + dukColour.Set("trim", entity->colour[1]); + return dukColour.Take(); + } + return ToDuk(ctx, nullptr); + } + void ScCrashedVehicleParticle::colours_set(const DukValue& value) + { + auto entity = GetCrashedVehicleParticle(); + if (entity != nullptr) + { + auto colours = FromDuk(value); + entity->colour[0] = colours.Body; + entity->colour[1] = colours.Trim; + } + } +}; // namespace OpenRCT2::Scripting + +#endif diff --git a/src/openrct2/scripting/bindings/entity/ScParticle.hpp b/src/openrct2/scripting/bindings/entity/ScParticle.hpp new file mode 100644 index 0000000000..1dbdec41dc --- /dev/null +++ b/src/openrct2/scripting/bindings/entity/ScParticle.hpp @@ -0,0 +1,54 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +#ifdef ENABLE_SCRIPTING + +# include "../../../entity/Particle.h" +# include "../../../world/Location.hpp" +# include "ScEntity.hpp" + +# include + +namespace OpenRCT2::Scripting +{ + class ScCrashedVehicleParticle : public ScEntity + { + public: + ScCrashedVehicleParticle(EntityId id); + + static void Register(duk_context* ctx); + + private: + VehicleCrashParticle* GetCrashedVehicleParticle() const; + + DukValue colours_get() const; + void colours_set(const DukValue& value); + + DukValue acceleration_get() const; + void acceleration_set(const DukValue& value); + + DukValue velocity_get() const; + void velocity_set(const DukValue& value); + + uint8_t frame_get() const; + void frame_set(uint8_t value); + + void crashedSpriteBase_set(const std::string& value); + std::string crashedSpriteBase_get() const; + + void timeToLive_set(uint16_t value); + uint16_t timeToLive_get() const; + + void Launch(const DukValue& value); + }; +}; // namespace OpenRCT2::Scripting + +#endif diff --git a/src/openrct2/scripting/bindings/entity/ScPeep.hpp b/src/openrct2/scripting/bindings/entity/ScPeep.hpp index 2ccbb5f4d7..8cc4d4287a 100644 --- a/src/openrct2/scripting/bindings/entity/ScPeep.hpp +++ b/src/openrct2/scripting/bindings/entity/ScPeep.hpp @@ -41,6 +41,8 @@ namespace OpenRCT2::Scripting { "angry", PEEP_FLAGS_ANGRY }, { "iceCream", PEEP_FLAGS_ICE_CREAM }, { "hereWeAre", PEEP_FLAGS_HERE_WE_ARE }, + { "positionFrozen", PEEP_FLAGS_POSITION_FROZEN }, + { "animationFrozen", PEEP_FLAGS_ANIMATION_FROZEN }, }); class ScPeep : public ScEntity @@ -57,6 +59,7 @@ namespace OpenRCT2::Scripting dukglue_register_property(ctx, &ScPeep::peepType_get, nullptr, "peepType"); dukglue_register_property(ctx, &ScPeep::name_get, &ScPeep::name_set, "name"); dukglue_register_property(ctx, &ScPeep::destination_get, &ScPeep::destination_set, "destination"); + dukglue_register_property(ctx, &ScPeep::direction_get, &ScPeep::direction_set, "direction"); dukglue_register_property(ctx, &ScPeep::energy_get, &ScPeep::energy_set, "energy"); dukglue_register_property(ctx, &ScPeep::energyTarget_get, &ScPeep::energyTarget_set, "energyTarget"); dukglue_register_method(ctx, &ScPeep::getFlag, "getFlag"); @@ -138,6 +141,23 @@ namespace OpenRCT2::Scripting } } + uint8_t direction_get() const + { + auto peep = GetPeep(); + return peep != nullptr ? peep->PeepDirection : 0; + } + + void direction_set(const uint8_t value) + { + ThrowIfGameStateNotMutable(); + auto peep = GetPeep(); + if (peep != nullptr && value < kNumOrthogonalDirections) + { + peep->PeepDirection = value; + peep->Orientation = value << 3; + } + } + uint8_t energy_get() const { auto peep = GetPeep(); @@ -149,6 +169,7 @@ namespace OpenRCT2::Scripting auto peep = GetPeep(); if (peep != nullptr) { + value = std::clamp(value, kPeepMinEnergy, kPeepMaxEnergy); peep->Energy = value; } } @@ -164,6 +185,7 @@ namespace OpenRCT2::Scripting auto peep = GetPeep(); if (peep != nullptr) { + value = std::clamp(value, kPeepMinEnergy, kPeepMaxEnergyTarget); peep->EnergyTarget = value; } } diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index 1796decbac..6d6efa4dd0 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -13,9 +13,52 @@ # include "../../../entity/PatrolArea.h" # include "../../../entity/Staff.h" +# include "../../../peep/PeepAnimationData.h" namespace OpenRCT2::Scripting { + static const DukEnumMap availableHandymanAnimations({ + { "walking", PeepActionSpriteType::None }, + { "watchRide", PeepActionSpriteType::WatchRide }, + { "hanging", PeepActionSpriteType::Ui }, + { "staffMower", PeepActionSpriteType::StaffMower }, + { "staffSweep", PeepActionSpriteType::StaffSweep }, + { "drowning", PeepActionSpriteType::Drowning }, + { "staffWatering", PeepActionSpriteType::StaffWatering }, + { "staffEmptyBin", PeepActionSpriteType::StaffEmptyBin }, + }); + + static const DukEnumMap availableMechanicAnimations({ + { "walking", PeepActionSpriteType::None }, + { "watchRide", PeepActionSpriteType::WatchRide }, + { "hanging", PeepActionSpriteType::Ui }, + { "drowning", PeepActionSpriteType::Drowning }, + { "staffAnswerCall", PeepActionSpriteType::StaffAnswerCall }, + { "staffAnswerCall2", PeepActionSpriteType::StaffAnswerCall2 }, + { "staffCheckBoard", PeepActionSpriteType::StaffCheckboard }, + { "staffFix", PeepActionSpriteType::StaffFix }, + { "staffFix2", PeepActionSpriteType::StaffFix2 }, + { "staffFixGround", PeepActionSpriteType::StaffFixGround }, + { "staffFix3", PeepActionSpriteType::StaffFix3 }, + }); + + static const DukEnumMap availableSecurityAnimations({ + { "walking", PeepActionSpriteType::None }, + { "watchRide", PeepActionSpriteType::WatchRide }, + { "hanging", PeepActionSpriteType::Ui }, + { "drowning", PeepActionSpriteType::Drowning }, + }); + + static const DukEnumMap availableEntertainerAnimations({ + { "walking", PeepActionSpriteType::None }, + { "watchRide", PeepActionSpriteType::WatchRide }, + { "wave", PeepActionSpriteType::EatFood }, // NB: this not a typo + { "hanging", PeepActionSpriteType::Ui }, + { "drowning", PeepActionSpriteType::Drowning }, + { "joy", PeepActionSpriteType::Joy }, + { "wave2", PeepActionSpriteType::Wave2 }, + }); + ScStaff::ScStaff(EntityId Id) : ScPeep(Id) { @@ -26,9 +69,15 @@ namespace OpenRCT2::Scripting dukglue_set_base_class(ctx); dukglue_register_property(ctx, &ScStaff::staffType_get, &ScStaff::staffType_set, "staffType"); dukglue_register_property(ctx, &ScStaff::colour_get, &ScStaff::colour_set, "colour"); + dukglue_register_property(ctx, &ScStaff::availableCostumes_get, nullptr, "availableCostumes"); dukglue_register_property(ctx, &ScStaff::costume_get, &ScStaff::costume_set, "costume"); dukglue_register_property(ctx, &ScStaff::patrolArea_get, nullptr, "patrolArea"); dukglue_register_property(ctx, &ScStaff::orders_get, &ScStaff::orders_set, "orders"); + dukglue_register_property(ctx, &ScStaff::availableAnimations_get, nullptr, "availableAnimations"); + dukglue_register_property(ctx, &ScStaff::animation_get, &ScStaff::animation_set, "animation"); + dukglue_register_property(ctx, &ScStaff::animationOffset_get, &ScStaff::animationOffset_set, "animationOffset"); + dukglue_register_property(ctx, &ScStaff::animationLength_get, nullptr, "animationLength"); + dukglue_register_method(ctx, &ScStaff::getAnimationSpriteIds, "getAnimationSpriteIds"); } Staff* ScStaff::GetStaff() const @@ -108,24 +157,117 @@ namespace OpenRCT2::Scripting } } - uint8_t ScStaff::costume_get() const + static const DukEnumMap availableHandymanCostumes({ + { "handyman", PeepSpriteType::Handyman }, + }); + + static const DukEnumMap availableMechanicCostumes({ + { "mechanic", PeepSpriteType::Mechanic }, + }); + + static const DukEnumMap availableSecurityCostumes({ + { "security1", PeepSpriteType::Security }, + { "security2", PeepSpriteType::SecurityAlt }, + }); + + static const DukEnumMap availableEntertainerCostumes({ + { "none", PeepSpriteType::Normal }, + { "panda", PeepSpriteType::EntertainerPanda }, + { "tiger", PeepSpriteType::EntertainerTiger }, + { "elephant", PeepSpriteType::EntertainerElephant }, + { "roman", PeepSpriteType::EntertainerRoman }, + { "gorilla", PeepSpriteType::EntertainerGorilla }, + { "snowman", PeepSpriteType::EntertainerSnowman }, + { "knight", PeepSpriteType::EntertainerKnight }, + { "astronaut", PeepSpriteType::EntertainerAstronaut }, + { "bandit", PeepSpriteType::EntertainerBandit }, + { "sheriff", PeepSpriteType::EntertainerSheriff }, + { "pirate", PeepSpriteType::EntertainerPirate }, + }); + + static const DukEnumMap& costumesByStaffType(StaffType staffType) { - auto peep = GetStaff(); - if (peep != nullptr && peep->AssignedStaffType == StaffType::Entertainer) + switch (staffType) { - return peep->GetCostume(); + case StaffType::Handyman: + return availableHandymanCostumes; + case StaffType::Mechanic: + return availableMechanicCostumes; + case StaffType::Security: + return availableSecurityCostumes; + case StaffType::Entertainer: + default: + return availableEntertainerCostumes; } - return 0; } - void ScStaff::costume_set(uint8_t value) + std::vector ScStaff::availableCostumes_get() const { - ThrowIfGameStateNotMutable(); + std::vector availableCostumes{}; auto peep = GetStaff(); if (peep != nullptr) { - peep->SetCostume(value); + for (auto& costume : costumesByStaffType(peep->AssignedStaffType)) + { + availableCostumes.push_back(std::string(costume.first)); + } } + return availableCostumes; + } + + std::string ScStaff::costume_get() const + { + auto peep = GetStaff(); + if (peep == nullptr) + { + return nullptr; + } + + auto& availableCostumes = costumesByStaffType(peep->AssignedStaffType); + + auto costume = availableCostumes.find(peep->SpriteType); + if (costume != availableCostumes.end()) + { + return std::string(costume->first); + } + else + return nullptr; + } + + void ScStaff::costume_set(const DukValue& value) + { + ThrowIfGameStateNotMutable(); + + auto peep = GetStaff(); + if (peep == nullptr) + { + return; + } + + auto& availableCostumes = costumesByStaffType(peep->AssignedStaffType); + + // Split by type passed so as to not break old plugins + if (value.type() == DukValue::Type::STRING) + { + std::string newCostume = value.as_string(); + auto newSpriteType = availableCostumes.TryGet(newCostume); + if (newSpriteType != std::nullopt) + { + peep->SpriteType = *newSpriteType; + return; + } + } + else if (value.type() == DukValue::Type::NUMBER) + { + auto newSpriteType = PeepSpriteType(value.as_uint() + EnumValue(PeepSpriteType::EntertainerPanda)); + if (availableCostumes.find(newSpriteType) != availableCostumes.end()) + { + peep->SpriteType = newSpriteType; + return; + } + } + + throw DukException() << "Invalid costume for this staff member"; } std::shared_ptr ScStaff::patrolArea_get() const @@ -149,6 +291,153 @@ namespace OpenRCT2::Scripting } } + const DukEnumMap& ScStaff::animationsByStaffType(StaffType staffType) const + { + switch (staffType) + { + case StaffType::Handyman: + return availableHandymanAnimations; + case StaffType::Mechanic: + return availableMechanicAnimations; + case StaffType::Security: + return availableSecurityAnimations; + case StaffType::Entertainer: + default: + return availableEntertainerAnimations; + } + } + + std::vector ScStaff::availableAnimations_get() const + { + std::vector availableAnimations{}; + + auto* peep = GetStaff(); + if (peep != nullptr) + { + for (auto& animation : animationsByStaffType(peep->AssignedStaffType)) + { + availableAnimations.push_back(std::string(animation.first)); + } + } + + return availableAnimations; + } + + std::vector ScStaff::getAnimationSpriteIds(std::string groupKey, uint8_t rotation) const + { + std::vector spriteIds{}; + + auto* peep = GetStaff(); + if (peep == nullptr) + { + return spriteIds; + } + + auto& animationGroups = animationsByStaffType(peep->AssignedStaffType); + auto animationType = animationGroups.TryGet(groupKey); + if (animationType == std::nullopt) + { + return spriteIds; + } + + auto& animationGroup = GetPeepAnimation(peep->SpriteType, *animationType); + for (auto frameOffset : animationGroup.frame_offsets) + { + auto imageId = animationGroup.base_image; + if (animationType != PeepActionSpriteType::Ui) + imageId += rotation + frameOffset * 4; + else + imageId += frameOffset; + + spriteIds.push_back(imageId); + } + + return spriteIds; + } + + std::string ScStaff::animation_get() const + { + auto* peep = GetStaff(); + if (peep == nullptr) + { + return nullptr; + } + + auto& animationGroups = animationsByStaffType(peep->AssignedStaffType); + std::string_view action = animationGroups[peep->ActionSpriteType]; + return std::string(action); + } + + void ScStaff::animation_set(std::string groupKey) + { + ThrowIfGameStateNotMutable(); + + auto* peep = GetStaff(); + auto& animationGroups = animationsByStaffType(peep->AssignedStaffType); + auto newType = animationGroups.TryGet(groupKey); + if (newType == std::nullopt) + { + throw DukException() << "Invalid animation for this staff member (" << groupKey << ")"; + } + + peep->ActionSpriteType = peep->NextActionSpriteType = *newType; + + auto offset = 0; + if (peep->IsActionWalking()) + peep->WalkingFrameNum = offset; + else + peep->ActionFrame = offset; + + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->UpdateSpriteBoundingBox(); + } + + uint8_t ScStaff::animationOffset_get() const + { + auto* peep = GetStaff(); + if (peep == nullptr) + { + return 0; + } + + if (peep->IsActionWalking()) + return peep->WalkingFrameNum; + else + return peep->ActionFrame; + } + + void ScStaff::animationOffset_set(uint8_t offset) + { + ThrowIfGameStateNotMutable(); + + auto* peep = GetStaff(); + + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto length = animationGroup.frame_offsets.size(); + offset %= length; + + if (peep->IsActionWalking()) + peep->WalkingFrameNum = offset; + else + peep->ActionFrame = offset; + + peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->UpdateSpriteBoundingBox(); + } + + uint8_t ScStaff::animationLength_get() const + { + auto* peep = GetStaff(); + if (peep == nullptr) + { + return 0; + } + + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + return static_cast(animationGroup.frame_offsets.size()); + } + ScPatrolArea::ScPatrolArea(EntityId id) : _staffId(id) { diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.hpp b/src/openrct2/scripting/bindings/entity/ScStaff.hpp index 0cd72b7473..3e4a94aa41 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.hpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.hpp @@ -15,6 +15,9 @@ # include +enum class PeepActionSpriteType : uint8_t; +enum class StaffType : uint8_t; + namespace OpenRCT2::Scripting { class ScPatrolArea @@ -56,13 +59,23 @@ namespace OpenRCT2::Scripting uint8_t colour_get() const; void colour_set(uint8_t value); - uint8_t costume_get() const; - void costume_set(uint8_t value); + std::vector availableCostumes_get() const; + std::string costume_get() const; + void costume_set(const DukValue& value); std::shared_ptr patrolArea_get() const; uint8_t orders_get() const; void orders_set(uint8_t value); + + const DukEnumMap& animationsByStaffType(StaffType staffType) const; + std::vector getAnimationSpriteIds(std::string groupKey, uint8_t rotation) const; + std::vector availableAnimations_get() const; + std::string animation_get() const; + void animation_set(std::string groupKey); + uint8_t animationOffset_get() const; + void animationOffset_set(uint8_t offset); + uint8_t animationLength_get() const; }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp index abd7a939fb..c62818b158 100644 --- a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp +++ b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp @@ -71,7 +71,9 @@ namespace OpenRCT2::Scripting dukglue_register_property(ctx, &ScVehicle::acceleration_get, &ScVehicle::acceleration_set, "acceleration"); dukglue_register_property(ctx, &ScVehicle::velocity_get, &ScVehicle::velocity_set, "velocity"); dukglue_register_property(ctx, &ScVehicle::bankRotation_get, &ScVehicle::bankRotation_set, "bankRotation"); - dukglue_register_property(ctx, &ScVehicle::isReversed_get, &ScVehicle::isReversed_set, "isReversed"); + dukglue_register_property( + 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::trackProgress_get, nullptr, "trackProgress"); @@ -189,7 +191,7 @@ namespace OpenRCT2::Scripting { if (value.type() == DukValue::Type::NUMBER) { - vehicle->next_vehicle_on_train = EntityId::FromUnderlying(value.as_int()); + vehicle->next_vehicle_on_train = EntityId::FromUnderlying(value.as_uint()); } else { @@ -333,12 +335,13 @@ namespace OpenRCT2::Scripting } } - bool ScVehicle::isReversed_get() const + template bool ScVehicle::flag_get() const { auto vehicle = GetVehicle(); - return vehicle != nullptr ? vehicle->HasFlag(VehicleFlags::CarIsReversed) : false; + return vehicle != nullptr ? vehicle->HasFlag(flag) : false; } - void ScVehicle::isReversed_set(bool value) + + template void ScVehicle::flag_set(bool value) { ThrowIfGameStateNotMutable(); auto vehicle = GetVehicle(); @@ -346,11 +349,11 @@ namespace OpenRCT2::Scripting { if (value) { - vehicle->SetFlag(VehicleFlags::CarIsReversed); + vehicle->SetFlag(flag); } else { - vehicle->ClearFlag(VehicleFlags::CarIsReversed); + vehicle->ClearFlag(flag); } } } diff --git a/src/openrct2/scripting/bindings/entity/ScVehicle.hpp b/src/openrct2/scripting/bindings/entity/ScVehicle.hpp index 48e670f55c..f05556e658 100644 --- a/src/openrct2/scripting/bindings/entity/ScVehicle.hpp +++ b/src/openrct2/scripting/bindings/entity/ScVehicle.hpp @@ -67,8 +67,8 @@ namespace OpenRCT2::Scripting uint8_t bankRotation_get() const; void bankRotation_set(uint8_t value); - bool isReversed_get() const; - void isReversed_set(bool value); + template bool flag_get() const; + template void flag_set(bool value); DukValue colours_get() const; void colours_set(const DukValue& value); diff --git a/src/openrct2/scripting/bindings/game/ScConfiguration.hpp b/src/openrct2/scripting/bindings/game/ScConfiguration.hpp index 1874a9bc64..452aa69094 100644 --- a/src/openrct2/scripting/bindings/game/ScConfiguration.hpp +++ b/src/openrct2/scripting/bindings/game/ScConfiguration.hpp @@ -173,8 +173,8 @@ namespace OpenRCT2::Scripting DukObject obj(ctx); if (ns == "general") { - obj.Set("general.language", gConfigGeneral.Language); - obj.Set("general.showFps", gConfigGeneral.ShowFPS); + obj.Set("general.language", Config::Get().general.Language); + obj.Set("general.showFps", Config::Get().general.ShowFPS); } result = obj.Take(); } @@ -205,7 +205,7 @@ namespace OpenRCT2::Scripting } if (key == "general.showFps") { - duk_push_boolean(ctx, gConfigGeneral.ShowFPS); + duk_push_boolean(ctx, Config::Get().general.ShowFPS); return DukValue::take_from_stack(ctx); } } @@ -246,7 +246,7 @@ namespace OpenRCT2::Scripting { if (key == "general.showFps") { - gConfigGeneral.ShowFPS = value.as_bool(); + Config::Get().general.ShowFPS = value.as_bool(); } else { diff --git a/src/openrct2/scripting/bindings/game/ScContext.hpp b/src/openrct2/scripting/bindings/game/ScContext.hpp index 13beeb76c9..f398c39f14 100644 --- a/src/openrct2/scripting/bindings/game/ScContext.hpp +++ b/src/openrct2/scripting/bindings/game/ScContext.hpp @@ -131,6 +131,13 @@ namespace OpenRCT2::Scripting return GameIsPaused(); } + void paused_set(const bool& value) + { + ThrowIfGameStateNotMutable(); + if (value != GameIsPaused()) + PauseToggle(); + } + void captureImage(const DukValue& options) { auto ctx = GetContext()->GetScriptEngine().GetContext(); @@ -138,8 +145,8 @@ namespace OpenRCT2::Scripting { CaptureOptions captureOptions; captureOptions.Filename = fs::u8path(AsOrDefault(options["filename"], "")); - captureOptions.Rotation = options["rotation"].as_int() & 3; - captureOptions.Zoom = ZoomLevel(options["zoom"].as_int()); + captureOptions.Rotation = options["rotation"].as_uint() & 3; + captureOptions.Zoom = ZoomLevel(options["zoom"].as_uint()); captureOptions.Transparent = AsOrDefault(options["transparent"], false); auto dukPosition = options["position"]; @@ -438,7 +445,7 @@ namespace OpenRCT2::Scripting dukglue_register_property(ctx, &ScContext::sharedStorage_get, nullptr, "sharedStorage"); dukglue_register_method(ctx, &ScContext::getParkStorage, "getParkStorage"); dukglue_register_property(ctx, &ScContext::mode_get, nullptr, "mode"); - dukglue_register_property(ctx, &ScContext::paused_get, nullptr, "paused"); + dukglue_register_property(ctx, &ScContext::paused_get, &ScContext::paused_set, "paused"); dukglue_register_method(ctx, &ScContext::captureImage, "captureImage"); dukglue_register_method(ctx, &ScContext::getObject, "getObject"); dukglue_register_method(ctx, &ScContext::getAllObjects, "getAllObjects"); diff --git a/src/openrct2/scripting/bindings/network/ScNetwork.cpp b/src/openrct2/scripting/bindings/network/ScNetwork.cpp index d7a88ec0c4..a3b1f08f5c 100644 --- a/src/openrct2/scripting/bindings/network/ScNetwork.cpp +++ b/src/openrct2/scripting/bindings/network/ScNetwork.cpp @@ -268,7 +268,7 @@ namespace OpenRCT2::Scripting { if (item.type() == DukValue::Type::NUMBER) { - playerIds.push_back(static_cast(item.as_int())); + playerIds.push_back(static_cast(item.as_uint())); } } if (!playerArray.empty()) diff --git a/src/openrct2/scripting/bindings/network/ScSocket.hpp b/src/openrct2/scripting/bindings/network/ScSocket.hpp index ca570629ec..f5a6ab4e0d 100644 --- a/src/openrct2/scripting/bindings/network/ScSocket.hpp +++ b/src/openrct2/scripting/bindings/network/ScSocket.hpp @@ -89,15 +89,16 @@ namespace OpenRCT2::Scripting constexpr char delimiter = ','; size_t start_pos = 0; size_t end_pos = 0; - while ((end_pos = gConfigPlugin.AllowedHosts.find(delimiter, start_pos)) != std::string::npos) + while ((end_pos = Config::Get().plugin.AllowedHosts.find(delimiter, start_pos)) != std::string::npos) { - if (host == gConfigPlugin.AllowedHosts.substr(start_pos, end_pos - start_pos)) + if (host == Config::Get().plugin.AllowedHosts.substr(start_pos, end_pos - start_pos)) { return true; } start_pos = end_pos + 1; } - return host == gConfigPlugin.AllowedHosts.substr(start_pos, gConfigPlugin.AllowedHosts.length() - start_pos); + return host + == Config::Get().plugin.AllowedHosts.substr(start_pos, Config::Get().plugin.AllowedHosts.length() - start_pos); } public: @@ -343,7 +344,7 @@ namespace OpenRCT2::Scripting } else if (status == SocketStatus::Connected) { - char buffer[2048]; + char buffer[16384]; size_t bytesRead{}; auto result = _socket->ReceiveData(buffer, sizeof(buffer), &bytesRead); switch (result) diff --git a/src/openrct2/scripting/bindings/object/ScObject.hpp b/src/openrct2/scripting/bindings/object/ScObject.hpp index 89e439cab4..688cf5bc68 100644 --- a/src/openrct2/scripting/bindings/object/ScObject.hpp +++ b/src/openrct2/scripting/bindings/object/ScObject.hpp @@ -864,7 +864,7 @@ namespace OpenRCT2::Scripting return 0; } - uint8_t price_get() const + money64 price_get() const { auto sceneryEntry = GetLegacyData(); if (sceneryEntry != nullptr) @@ -874,7 +874,7 @@ namespace OpenRCT2::Scripting return 0; } - uint8_t removalPrice_get() const + money64 removalPrice_get() const { auto sceneryEntry = GetLegacyData(); if (sceneryEntry != nullptr) diff --git a/src/openrct2/scripting/bindings/object/ScObjectManager.cpp b/src/openrct2/scripting/bindings/object/ScObjectManager.cpp index cd38f55b18..8d4d0fa6ef 100644 --- a/src/openrct2/scripting/bindings/object/ScObjectManager.cpp +++ b/src/openrct2/scripting/bindings/object/ScObjectManager.cpp @@ -105,7 +105,7 @@ DukValue ScObjectManager::load(const DukValue& p1, const DukValue& p2) if (p2.type() != DukValue::NUMBER) throw DukException() << "Expected number for 'index'."; - auto index = static_cast(p2.as_int()); + auto index = static_cast(p2.as_uint()); auto limit = getObjectTypeLimit(installedObject->Type); if (index < limit) { @@ -155,7 +155,7 @@ void ScObjectManager::unload(const DukValue& p1, const DukValue& p2) if (p2.type() != DukValue::NUMBER) throw DukException() << "'index' is invalid."; - auto objIndex = p2.as_int(); + auto objIndex = p2.as_uint(); auto obj = objectManager.GetLoadedObject(*objType, objIndex); if (obj != nullptr) { diff --git a/src/openrct2/scripting/bindings/ride/ScRide.cpp b/src/openrct2/scripting/bindings/ride/ScRide.cpp index acfc3a2b21..748b87a0d6 100644 --- a/src/openrct2/scripting/bindings/ride/ScRide.cpp +++ b/src/openrct2/scripting/bindings/ride/ScRide.cpp @@ -325,7 +325,7 @@ namespace OpenRCT2::Scripting auto numPrices = std::min(value.size(), ride->GetNumPrices()); for (size_t i = 0; i < numPrices; i++) { - ride->price[i] = static_cast(value[i]); + ride->price[i] = std::clamp(value[i], kRideMinPrice, kRideMaxPrice); } } } @@ -333,7 +333,7 @@ namespace OpenRCT2::Scripting int32_t ScRide::excitement_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->excitement : 0; + return ride != nullptr ? ride->ratings.excitement : 0; } void ScRide::excitement_set(int32_t value) { @@ -341,14 +341,14 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->excitement = value; + ride->ratings.excitement = value; } } int32_t ScRide::intensity_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->intensity : 0; + return ride != nullptr ? ride->ratings.intensity : 0; } void ScRide::intensity_set(int32_t value) { @@ -356,14 +356,14 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->intensity = value; + ride->ratings.intensity = value; } } int32_t ScRide::nausea_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->nausea : 0; + return ride != nullptr ? ride->ratings.nausea : 0; } void ScRide::nausea_set(int32_t value) { @@ -371,7 +371,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->nausea = value; + ride->ratings.nausea = value; } } diff --git a/src/openrct2/scripting/bindings/world/ScMap.cpp b/src/openrct2/scripting/bindings/world/ScMap.cpp index df3b8560d6..bd14c9bf81 100644 --- a/src/openrct2/scripting/bindings/world/ScMap.cpp +++ b/src/openrct2/scripting/bindings/world/ScMap.cpp @@ -29,6 +29,7 @@ # include "../entity/ScEntity.hpp" # include "../entity/ScGuest.hpp" # include "../entity/ScLitter.hpp" +# include "../entity/ScParticle.hpp" # include "../entity/ScStaff.hpp" # include "../entity/ScVehicle.hpp" # include "../ride/ScRide.hpp" @@ -161,6 +162,13 @@ namespace OpenRCT2::Scripting result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } + else if (type == "crashed_vehicle_particle") + { + for (auto sprite : EntityList()) + { + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); + } + } else { duk_error(_context, DUK_ERR_ERROR, "Invalid entity type."); @@ -221,6 +229,13 @@ namespace OpenRCT2::Scripting result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } + else if (type == "crashed_vehicle_particle") + { + for (auto sprite : EntityTileList(pos)) + { + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); + } + } else { // If the given type isn't valid, throw an error @@ -272,7 +287,7 @@ namespace OpenRCT2::Scripting } else if (type == "crashed_vehicle_particle") { - res = createEntityType(_context, initializer); + res = createEntityType(_context, initializer); } else if (type == "explosion_cloud") { @@ -348,6 +363,8 @@ namespace OpenRCT2::Scripting return GetObjectAsDukValue(_context, std::make_shared(spriteId)); case EntityType::Litter: return GetObjectAsDukValue(_context, std::make_shared(spriteId)); + case EntityType::CrashedVehicleParticle: + return GetObjectAsDukValue(_context, std::make_shared(spriteId)); default: return GetObjectAsDukValue(_context, std::make_shared(spriteId)); } diff --git a/src/openrct2/scripting/bindings/world/ScPark.cpp b/src/openrct2/scripting/bindings/world/ScPark.cpp index 71b4cde7c2..4c1dadf217 100644 --- a/src/openrct2/scripting/bindings/world/ScPark.cpp +++ b/src/openrct2/scripting/bindings/world/ScPark.cpp @@ -12,6 +12,7 @@ # include "ScPark.hpp" # include "../../../Context.h" +# include "../../../Date.h" # include "../../../GameState.h" # include "../../../common.h" # include "../../../core/String.hpp" @@ -390,7 +391,7 @@ namespace OpenRCT2::Scripting auto dukSubject = message["subject"]; if (dukSubject.type() == DukValue::Type::NUMBER) { - assoc = static_cast(dukSubject.as_int()); + assoc = static_cast(dukSubject.as_uint()); } } News::AddItemToQueue(type, text.c_str(), assoc); @@ -401,6 +402,23 @@ namespace OpenRCT2::Scripting } } + std::vector ScPark::getMonthlyExpenditure(const std::string& expenditureType) const + { + auto recordedMonths = std::clamp( + GetDate().GetMonthsElapsed() + 1, static_cast(0), static_cast(kExpenditureTableMonthCount)); + std::vector result(recordedMonths, 0); + auto type = ScriptEngine::StringToExpenditureType(expenditureType); + if (type != ExpenditureType::Count) + { + auto& gameState = GetGameState(); + for (size_t i = 0; i < recordedMonths; ++i) + { + result[i] = gameState.ExpenditureTable[i][EnumValue(type)]; + } + } + return result; + } + void ScPark::Register(duk_context* ctx) { dukglue_register_property(ctx, &ScPark::cash_get, &ScPark::cash_set, "cash"); @@ -432,6 +450,7 @@ namespace OpenRCT2::Scripting dukglue_register_method(ctx, &ScPark::getFlag, "getFlag"); dukglue_register_method(ctx, &ScPark::setFlag, "setFlag"); dukglue_register_method(ctx, &ScPark::postMessage, "postMessage"); + dukglue_register_method(ctx, &ScPark::getMonthlyExpenditure, "getMonthlyExpenditure"); } } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/world/ScPark.hpp b/src/openrct2/scripting/bindings/world/ScPark.hpp index a8f9454805..2ffa992b40 100644 --- a/src/openrct2/scripting/bindings/world/ScPark.hpp +++ b/src/openrct2/scripting/bindings/world/ScPark.hpp @@ -98,6 +98,8 @@ namespace OpenRCT2::Scripting void postMessage(DukValue message); + std::vector getMonthlyExpenditure(const std::string& expenditureType) const; + static void Register(duk_context* ctx); }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/world/ScParkMessage.hpp b/src/openrct2/scripting/bindings/world/ScParkMessage.hpp index 8a38a04185..3464669341 100644 --- a/src/openrct2/scripting/bindings/world/ScParkMessage.hpp +++ b/src/openrct2/scripting/bindings/world/ScParkMessage.hpp @@ -53,10 +53,10 @@ namespace OpenRCT2::Scripting { News::Item result{}; result.Type = GetParkMessageType(value["type"].as_string()); - result.Assoc = value["subject"].as_int(); - result.Ticks = value["tickCount"].as_int(); - result.MonthYear = value["month"].as_int(); - result.Day = value["day"].as_int(); + result.Assoc = value["subject"].as_uint(); + result.Ticks = value["tickCount"].as_uint(); + result.MonthYear = value["month"].as_uint(); + result.Day = value["day"].as_uint(); result.Text = value["text"].as_string(); return result; } diff --git a/src/openrct2/scripting/bindings/world/ScResearch.cpp b/src/openrct2/scripting/bindings/world/ScResearch.cpp index fe9a602275..efb6b28204 100644 --- a/src/openrct2/scripting/bindings/world/ScResearch.cpp +++ b/src/openrct2/scripting/bindings/world/ScResearch.cpp @@ -83,8 +83,8 @@ namespace OpenRCT2::Scripting result.type = FromDuk(d["type"]); auto baseRideType = d["rideType"]; if (baseRideType.type() == DukValue::NUMBER) - result.baseRideType = baseRideType.as_int(); - result.entryIndex = d["object"].as_int(); + result.baseRideType = baseRideType.as_uint(); + result.entryIndex = d["object"].as_uint(); return result; } diff --git a/src/openrct2/scripting/bindings/world/ScTile.cpp b/src/openrct2/scripting/bindings/world/ScTile.cpp index 1eece1c9c9..913a7a5c93 100644 --- a/src/openrct2/scripting/bindings/world/ScTile.cpp +++ b/src/openrct2/scripting/bindings/world/ScTile.cpp @@ -15,6 +15,7 @@ # include "../../../common.h" # include "../../../core/Guard.hpp" # include "../../../entity/EntityRegistry.h" +# include "../../../object/LargeSceneryEntry.h" # include "../../../ride/Track.h" # include "../../../world/Footpath.h" # include "../../../world/Scenery.h" @@ -195,6 +196,13 @@ namespace OpenRCT2::Scripting auto first = GetFirstElement(); if (index < GetNumElements(first)) { + auto element = &first[index]; + if (element->GetType() != TileElementType::LargeScenery + || element->AsLargeScenery()->GetEntry()->scrolling_mode == SCROLLING_MODE_NONE + || ScTileElement::GetOtherLargeSceneryElement(_coords, element->AsLargeScenery()) == nullptr) + { + element->RemoveBannerEntry(); + } TileElementRemove(&first[index]); MapInvalidateTileFull(_coords); } diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index 09f73229b8..3166a68c49 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -15,6 +15,8 @@ # include "../../../common.h" # include "../../../core/Guard.hpp" # include "../../../entity/EntityRegistry.h" +# include "../../../object/LargeSceneryEntry.h" +# include "../../../object/WallSceneryEntry.h" # include "../../../ride/Ride.h" # include "../../../ride/RideData.h" # include "../../../ride/Track.h" @@ -63,6 +65,7 @@ namespace OpenRCT2::Scripting void ScTileElement::type_set(std::string value) { + RemoveBannerEntryIfNeeded(); if (value == "surface") _element->SetType(TileElementType::Surface); else if (value == "footpath") @@ -85,7 +88,7 @@ namespace OpenRCT2::Scripting scriptEngine.LogPluginInfo("Element type not recognised!"); return; } - + CreateBannerEntryIfNeeded(); Invalidate(); } @@ -537,8 +540,10 @@ namespace OpenRCT2::Scripting { case TileElementType::LargeScenery: { + RemoveBannerEntryIfNeeded(); auto* el = _element->AsLargeScenery(); el->SetSequenceIndex(value.as_uint()); + CreateBannerEntryIfNeeded(); Invalidate(); break; } @@ -914,7 +919,7 @@ namespace OpenRCT2::Scripting if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) throw DukException() << "Cannot set 'colourScheme' property, TrackElement belongs to a maze."; - el->SetColourScheme(value.as_uint()); + el->SetColourScheme(static_cast(value.as_uint())); Invalidate(); } catch (const DukException& e) @@ -1194,15 +1199,19 @@ namespace OpenRCT2::Scripting } case TileElementType::LargeScenery: { + RemoveBannerEntryIfNeeded(); auto* el = _element->AsLargeScenery(); el->SetEntryIndex(index); + CreateBannerEntryIfNeeded(); Invalidate(); break; } case TileElementType::Wall: { + RemoveBannerEntryIfNeeded(); auto* el = _element->AsWall(); el->SetEntryIndex(index); + CreateBannerEntryIfNeeded(); Invalidate(); break; } @@ -1653,7 +1662,7 @@ namespace OpenRCT2::Scripting if (value.type() == DukValue::Type::NUMBER) { el->SetSloped(true); - el->SetSlopeDirection(value.as_int()); + el->SetSlopeDirection(value.as_uint()); } else { @@ -1706,7 +1715,7 @@ namespace OpenRCT2::Scripting if (value.type() == DukValue::Type::NUMBER) { el->SetHasQueueBanner(true); - el->SetQueueBannerDirection(value.as_int()); + el->SetQueueBannerDirection(value.as_uint()); } else { @@ -1856,8 +1865,8 @@ namespace OpenRCT2::Scripting { if (value.type() == DukValue::Type::NUMBER) { - auto addition = value.as_int(); - if (addition >= 0 && addition <= 254) + auto addition = value.as_uint(); + if (addition <= 254) { el->SetAdditionEntryIndex(addition); } @@ -2140,6 +2149,129 @@ namespace OpenRCT2::Scripting MapInvalidateTileFull(_coords); } + const LargeSceneryElement* ScTileElement::GetOtherLargeSceneryElement( + const CoordsXY& loc, const LargeSceneryElement* const largeScenery) + { + const auto* const largeEntry = largeScenery->GetEntry(); + const auto direction = largeScenery->GetDirection(); + const auto sequenceIndex = largeScenery->GetSequenceIndex(); + const auto* tiles = largeEntry->tiles; + const auto& tile = tiles[sequenceIndex]; + const auto rotatedFirstTile = CoordsXYZ{ + CoordsXY{ tile.x_offset, tile.y_offset }.Rotate(direction), + tile.z_offset, + }; + + const auto firstTile = CoordsXYZ{ loc, largeScenery->GetBaseZ() } - rotatedFirstTile; + for (int32_t i = 0; tiles[i].x_offset != -1; i++) + { + const auto rotatedCurrentTile = CoordsXYZ{ CoordsXY{ tiles[i].x_offset, tiles[i].y_offset }.Rotate(direction), + tiles[i].z_offset }; + + const auto currentTile = firstTile + rotatedCurrentTile; + + const TileElement* tileElement = MapGetFirstElementAt(currentTile); + if (tileElement != nullptr) + { + do + { + if (tileElement->GetType() != TileElementType::LargeScenery) + continue; + if (tileElement->GetDirection() != direction) + continue; + if (tileElement->GetBaseZ() != currentTile.z) + continue; + + if (tileElement->AsLargeScenery() == largeScenery) + continue; + if (tileElement->AsLargeScenery()->GetEntryIndex() != largeScenery->GetEntryIndex()) + continue; + if (tileElement->AsLargeScenery()->GetSequenceIndex() != i) + continue; + + return tileElement->AsLargeScenery(); + } while (!(tileElement++)->IsLastForTile()); + } + } + return nullptr; + } + + void ScTileElement::RemoveBannerEntryIfNeeded() + { + // check if other element still uses the banner entry + if (_element->GetType() == TileElementType::LargeScenery + && _element->AsLargeScenery()->GetEntry()->scrolling_mode != SCROLLING_MODE_NONE + && GetOtherLargeSceneryElement(_coords, _element->AsLargeScenery()) != nullptr) + return; + // remove banner entry (if one exists) + _element->RemoveBannerEntry(); + } + + void ScTileElement::CreateBannerEntryIfNeeded() + { + // check if creation is needed + switch (_element->GetType()) + { + case TileElementType::Banner: + break; + case TileElementType::Wall: + { + auto wallEntry = _element->AsWall()->GetEntry(); + if (wallEntry->scrolling_mode == SCROLLING_MODE_NONE) + return; + break; + } + case TileElementType::LargeScenery: + { + auto largeScenery = _element->AsLargeScenery(); + auto largeSceneryEntry = largeScenery->GetEntry(); + if (largeSceneryEntry == nullptr || largeSceneryEntry->scrolling_mode == SCROLLING_MODE_NONE) + return; + + auto otherElement = GetOtherLargeSceneryElement(_coords, largeScenery); + if (otherElement != nullptr) + { + largeScenery->SetBannerIndex(otherElement->GetBannerIndex()); + return; + } + + break; + } + default: + return; + } + + // create banner entry and initialise it + auto* banner = CreateBanner(); + if (banner == nullptr) + GetContext()->GetScriptEngine().LogPluginInfo("No free banners available."); + else + { + banner->text = {}; + banner->colour = 0; + banner->text_colour = 0; + banner->flags = 0; + if (_element->GetType() == TileElementType::Wall) + banner->flags = BANNER_FLAG_IS_WALL; + if (_element->GetType() == TileElementType::LargeScenery) + banner->flags = BANNER_FLAG_IS_LARGE_SCENERY; + banner->type = 0; + banner->position = TileCoordsXY(_coords); + + if (_element->GetType() == TileElementType::Wall || _element->GetType() == TileElementType::LargeScenery) + { + RideId rideIndex = BannerGetClosestRideIndex({ _coords, _element->BaseHeight }); + if (!rideIndex.IsNull()) + { + banner->ride_index = rideIndex; + banner->flags |= BANNER_FLAG_LINKED_TO_RIDE; + } + } + + _element->SetBannerIndex(banner->id); + } + } + void ScTileElement::Register(duk_context* ctx) { // All diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.hpp b/src/openrct2/scripting/bindings/world/ScTileElement.hpp index 1d039d8325..a5bcddc084 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.hpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.hpp @@ -210,7 +210,12 @@ namespace OpenRCT2::Scripting void Invalidate(); + void RemoveBannerEntryIfNeeded(); + void CreateBannerEntryIfNeeded(); + public: + static const LargeSceneryElement* GetOtherLargeSceneryElement( + const CoordsXY& loc, const LargeSceneryElement* const largeScenery); static void Register(duk_context* ctx); }; diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 235fe5d510..5573eb803c 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -976,6 +976,18 @@ enum SPR_G2_ICON_PALETTE_INVISIBLE, SPR_G2_ICON_PALETTE_INVISIBLE_PRESSED, + // G2 Loading progress + + SPR_G2_LOADER_HYBRID_SUPPORTS, + SPR_G2_LOADER_HYBRID_TRACK, + SPR_G2_LOADER_HYBRID_VEHICLE, + SPR_G2_LOADER_STEEL_SUPPORTS, + SPR_G2_LOADER_STEEL_TRACK, + SPR_G2_LOADER_STEEL_VEHICLE, + SPR_G2_LOADER_WOODEN_SUPPORTS, + SPR_G2_LOADER_WOODEN_TRACK, + SPR_G2_LOADER_WOODEN_VEHICLE, + // G2 Palette maps SPR_G2_PALETTE_BEGIN, @@ -1505,7 +1517,7 @@ enum SPR_G2_END, SPR_CSG_BEGIN = SPR_G2_END, - SPR_CSG_END = SPR_CSG_BEGIN + RCT1::Limits::Num_LL_CSG_Entries, + SPR_CSG_END = SPR_CSG_BEGIN + RCT1::Limits::kNumLLCsgEntries, G2_SPRITE_COUNT = SPR_G2_END - SPR_G2_BEGIN, diff --git a/src/openrct2/ui/DummyUiContext.cpp b/src/openrct2/ui/DummyUiContext.cpp index 9104dcecd2..72ef0af253 100644 --- a/src/openrct2/ui/DummyUiContext.cpp +++ b/src/openrct2/ui/DummyUiContext.cpp @@ -7,7 +7,6 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "../config/Config.h" #include "../drawing/X8DrawingEngine.h" #include "UiContext.h" #include "WindowManager.h" diff --git a/src/openrct2/ui/DummyWindowManager.cpp b/src/openrct2/ui/DummyWindowManager.cpp index bb88203631..a00e0964c2 100644 --- a/src/openrct2/ui/DummyWindowManager.cpp +++ b/src/openrct2/ui/DummyWindowManager.cpp @@ -27,11 +27,12 @@ namespace OpenRCT2::Ui { return nullptr; } - WindowBase* ShowError(StringId /*title*/, StringId /*message*/, const Formatter& /*formatter*/) override + WindowBase* ShowError( + StringId /*title*/, StringId /*message*/, const Formatter& /*formatter*/, bool /*autoClose*/) override { return nullptr; } - WindowBase* ShowError(std::string_view /*title*/, std::string_view /*message*/) override + WindowBase* ShowError(std::string_view /*title*/, std::string_view /*message*/, bool /*autoClose*/) override { return nullptr; } diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index d561ec2d30..7f86450917 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -11,7 +11,7 @@ #include "../Context.h" #include "../common.h" -#include "../config/Config.h" +#include "../config/ConfigTypes.h" #include "../interface/Cursors.h" #include diff --git a/src/openrct2/ui/WindowManager.h b/src/openrct2/ui/WindowManager.h index 399e347683..ee29a32067 100644 --- a/src/openrct2/ui/WindowManager.h +++ b/src/openrct2/ui/WindowManager.h @@ -33,8 +33,9 @@ namespace OpenRCT2::Ui virtual WindowBase* OpenDetails(uint8_t type, int32_t id) abstract; virtual WindowBase* OpenIntent(Intent* intent) abstract; virtual void BroadcastIntent(const Intent& intent) abstract; - virtual WindowBase* ShowError(StringId title, StringId message, const Formatter& formatter) abstract; - virtual WindowBase* ShowError(std::string_view title, std::string_view message) abstract; + virtual WindowBase* ShowError( + StringId title, StringId message, const Formatter& formatter, bool autoClose = false) abstract; + virtual WindowBase* ShowError(std::string_view title, std::string_view message, bool autoClose = false) abstract; virtual void ForceClose(WindowClass windowClass) abstract; virtual void UpdateMapTooltip() abstract; virtual void HandleInput() abstract; diff --git a/src/openrct2/util/SawyerCoding.cpp b/src/openrct2/util/SawyerCoding.cpp index 30ffb110df..014acd2a77 100644 --- a/src/openrct2/util/SawyerCoding.cpp +++ b/src/openrct2/util/SawyerCoding.cpp @@ -219,8 +219,9 @@ static size_t DecodeChunkRLEWithSize(const uint8_t* src_buffer, uint8_t* dst_buf dst = dst_buffer; - assert(length > 0); - assert(dstSize > 0); + if (length <= 0 || dstSize <= 0) + throw std::out_of_range("Invalid RLE string!"); + for (size_t i = 0; i < length; i++) { rleCodeByte = src_buffer[i]; @@ -235,8 +236,8 @@ static size_t DecodeChunkRLEWithSize(const uint8_t* src_buffer, uint8_t* dst_buf } else { - assert(dst + rleCodeByte + 1 <= dst_buffer + dstSize); - assert(i + 1 < length); + if ((dst + rleCodeByte + 1 > dst_buffer + dstSize) || (i + 1 >= length)) + throw std::out_of_range("Invalid RLE string!"); std::memcpy(dst, src_buffer + i + 1, rleCodeByte + 1); dst = reinterpret_cast(reinterpret_cast(dst) + rleCodeByte + 1); i += rleCodeByte + 1; diff --git a/src/openrct2/util/Util.cpp b/src/openrct2/util/Util.cpp index 2b2b366d8a..0f18aacac5 100644 --- a/src/openrct2/util/Util.cpp +++ b/src/openrct2/util/Util.cpp @@ -13,16 +13,28 @@ #include "../core/Guard.hpp" #include "../core/Path.hpp" #include "../interface/Window.h" +#include "../localisation/Language.h" #include "../localisation/Localisation.h" #include "../platform/Platform.h" #include "../scenes/title/TitleScene.h" #include "zlib.h" +#include #include #include #include #include +#ifdef _WIN32 +# ifndef NOMINMAX +# define NOMINMAX +# endif +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +#endif // _WIN32 + int32_t SquaredMetresToSquaredFeet(int32_t squaredMetres) { // 1 metre squared = 10.7639104 feet squared @@ -501,55 +513,6 @@ std::vector Ungzip(const void* data, const size_t dataLen) return output; } -// Type-independent code left as macro to reduce duplicate code. -#define ADD_CLAMP_BODY(value, value_to_add, min_cap, max_cap) \ - if ((value_to_add > 0) && (value > (max_cap - (value_to_add)))) \ - { \ - value = max_cap; \ - } \ - else if ((value_to_add < 0) && (value < (min_cap - (value_to_add)))) \ - { \ - value = min_cap; \ - } \ - else \ - { \ - value += value_to_add; \ - } - -int8_t AddClamp_int8_t(int8_t value, int8_t value_to_add) -{ - ADD_CLAMP_BODY(value, value_to_add, INT8_MIN, INT8_MAX); - return value; -} - -int16_t AddClamp_int16_t(int16_t value, int16_t value_to_add) -{ - ADD_CLAMP_BODY(value, value_to_add, INT16_MIN, INT16_MAX); - return value; -} - -int32_t AddClamp_int32_t(int32_t value, int32_t value_to_add) -{ - ADD_CLAMP_BODY(value, value_to_add, INT32_MIN, INT32_MAX); - return value; -} - -int64_t AddClamp_int64_t(int64_t value, int64_t value_to_add) -{ - ADD_CLAMP_BODY(value, value_to_add, INT64_MIN, INT64_MAX); - return value; -} - -money64 AddClamp_money64(money64 value, money64 value_to_add) -{ - // This function is intended only for clarity, as money64 - // is technically the same as int64_t - assert_struct_size(money64, sizeof(int64_t)); - return AddClamp_int64_t(value, value_to_add); -} - -#undef add_clamp_body - uint8_t Lerp(uint8_t a, uint8_t b, float t) { if (t <= 0) diff --git a/src/openrct2/util/Util.h b/src/openrct2/util/Util.h index c99ff863c0..d8130cb435 100644 --- a/src/openrct2/util/Util.h +++ b/src/openrct2/util/Util.h @@ -10,6 +10,7 @@ #pragma once #include "../common.h" +#include "../core/Money.hpp" #include "../core/String.hpp" #include @@ -40,12 +41,27 @@ bool UtilGzipCompress(FILE* source, FILE* dest); std::vector Gzip(const void* data, const size_t dataLen); std::vector Ungzip(const void* data, const size_t dataLen); -// TODO: Make these specialized template functions, or when possible Concepts in C++20 -int8_t AddClamp_int8_t(int8_t value, int8_t value_to_add); -int16_t AddClamp_int16_t(int16_t value, int16_t value_to_add); -int32_t AddClamp_int32_t(int32_t value, int32_t value_to_add); -int64_t AddClamp_int64_t(int64_t value, int64_t value_to_add); -money64 AddClamp_money64(money64 value, money64 value_to_add); +template constexpr T AddClamp(T value, T valueToAdd) +{ + if (std::is_same_v) + { + assert_struct_size(money64, sizeof(int64_t)); + } + auto maxCap = std::numeric_limits::max(); + auto minCap = std::numeric_limits::lowest(); + if ((valueToAdd > 0) && (value > (maxCap - (valueToAdd)))) + { + return maxCap; + } + else if ((valueToAdd < 0) && (value < (minCap - (valueToAdd)))) + { + return minCap; + } + else + { + return value + valueToAdd; + } +} uint8_t Lerp(uint8_t a, uint8_t b, float t); float FLerp(float a, float b, float t); diff --git a/src/openrct2/windows/Intent.h b/src/openrct2/windows/Intent.h index 96e635c82e..3707b6d96b 100644 --- a/src/openrct2/windows/Intent.h +++ b/src/openrct2/windows/Intent.h @@ -49,6 +49,9 @@ enum IntentAction INTENT_ACTION_SET_MAP_TOOLTIP, INTENT_ACTION_NEW_SCENERY, INTENT_ACTION_TILE_MODIFY, + INTENT_ACTION_PROGRESS_OPEN, + INTENT_ACTION_PROGRESS_SET, + INTENT_ACTION_PROGRESS_CLOSE, INTENT_ACTION_NULL = 255, }; @@ -126,4 +129,7 @@ enum INTENT_EXTRA_BANNER_INDEX, INTENT_EXTRA_FORMATTER, INTENT_EXTRA_SCENERY_GROUP_ENTRY_INDEX, + INTENT_EXTRA_PROGRESS_OFFSET, + INTENT_EXTRA_PROGRESS_TOTAL, + INTENT_EXTRA_STRING_ID, }; diff --git a/src/openrct2/world/Banner.cpp b/src/openrct2/world/Banner.cpp index e7412cf981..ff93b80f59 100644 --- a/src/openrct2/world/Banner.cpp +++ b/src/openrct2/world/Banner.cpp @@ -15,6 +15,7 @@ #include "../core/Memory.hpp" #include "../core/String.hpp" #include "../interface/Window.h" +#include "../localisation/FormatCodes.h" #include "../localisation/Formatter.h" #include "../localisation/Localisation.h" #include "../management/Finance.h" diff --git a/src/openrct2/world/Climate.cpp b/src/openrct2/world/Climate.cpp index 262830c05a..216aa9778d 100644 --- a/src/openrct2/world/Climate.cpp +++ b/src/openrct2/world/Climate.cpp @@ -233,32 +233,25 @@ void ClimateUpdateSound() bool ClimateIsRaining() { - auto& gameState = GetGameState(); - if (gameState.ClimateCurrent.Weather == WeatherType::Rain || gameState.ClimateCurrent.Weather == WeatherType::HeavyRain - || gameState.ClimateCurrent.Weather == WeatherType::Thunder) - { - return true; - } - - return false; + auto& weather = GetGameState().ClimateCurrent.Weather; + return weather == WeatherType::Rain || weather == WeatherType::HeavyRain || weather == WeatherType::Thunder; } bool ClimateIsSnowing() { - auto& gameState = GetGameState(); - if (gameState.ClimateCurrent.Weather == WeatherType::Snow || gameState.ClimateCurrent.Weather == WeatherType::HeavySnow - || gameState.ClimateCurrent.Weather == WeatherType::Blizzard) - { - return true; - } - - return false; + auto& weather = GetGameState().ClimateCurrent.Weather; + return weather == WeatherType::Snow || weather == WeatherType::HeavySnow || weather == WeatherType::Blizzard; } -bool WeatherIsDry(WeatherType weatherType) +bool ClimateIsSnowingHeavily() { - return weatherType == WeatherType::Sunny || weatherType == WeatherType::PartiallyCloudy - || weatherType == WeatherType::Cloudy; + auto& weather = GetGameState().ClimateCurrent.Weather; + return weather == WeatherType::HeavySnow || weather == WeatherType::Blizzard; +} + +bool WeatherIsDry(WeatherType weather) +{ + return weather == WeatherType::Sunny || weather == WeatherType::PartiallyCloudy || weather == WeatherType::Cloudy; } FilterPaletteID ClimateGetWeatherGloomPaletteId(const ClimateState& state) @@ -398,9 +391,9 @@ static void ClimateUpdateLightning() { if (_lightningTimer == 0) return; - if (gConfigGeneral.DisableLightningEffect) + if (Config::Get().general.DisableLightningEffect) return; - if (!gConfigGeneral.RenderWeatherEffects && !gConfigGeneral.RenderWeatherGloom) + if (!Config::Get().general.RenderWeatherEffects && !Config::Get().general.RenderWeatherGloom) return; _lightningTimer--; diff --git a/src/openrct2/world/Climate.h b/src/openrct2/world/Climate.h index 5871ef6c8d..78190b3551 100644 --- a/src/openrct2/world/Climate.h +++ b/src/openrct2/world/Climate.h @@ -81,6 +81,7 @@ void ClimateForceWeather(WeatherType weather); bool ClimateIsRaining(); bool ClimateIsSnowing(); +bool ClimateIsSnowingHeavily(); bool WeatherIsDry(WeatherType); FilterPaletteID ClimateGetWeatherGloomPaletteId(const ClimateState& state); uint32_t ClimateGetWeatherSpriteId(const ClimateState& state); diff --git a/src/openrct2/world/ConstructionClearance.cpp b/src/openrct2/world/ConstructionClearance.cpp index 58e572eaff..65f8b5337f 100644 --- a/src/openrct2/world/ConstructionClearance.cpp +++ b/src/openrct2/world/ConstructionClearance.cpp @@ -18,6 +18,7 @@ #include "../openrct2/Cheats.h" #include "../ride/Ride.h" #include "../ride/RideData.h" +#include "../world/tile_element/Slope.h" #include "Park.h" #include "Scenery.h" #include "Surface.h" @@ -79,7 +80,7 @@ int32_t MapPlaceNonSceneryClearFunc(TileElement** tile_element, const CoordsXY& static bool MapLoc68BABCShouldContinue( TileElement** tileElementPtr, const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, uint8_t flags, money64& price, - uint8_t crossingMode, bool canBuildCrossing) + CreateCrossingMode crossingMode, bool canBuildCrossing) { if (clearFunc != nullptr) { @@ -89,17 +90,16 @@ static bool MapLoc68BABCShouldContinue( } } - // Crossing mode 1: building track over path auto tileElement = *tileElementPtr; - if (crossingMode == 1 && canBuildCrossing && tileElement->GetType() == TileElementType::Path + if (crossingMode == CreateCrossingMode::trackOverPath && canBuildCrossing && tileElement->GetType() == TileElementType::Path && tileElement->GetBaseZ() == pos.baseZ && !tileElement->AsPath()->IsQueue() && !tileElement->AsPath()->IsSloped()) { return true; } - // Crossing mode 2: building path over track else if ( - crossingMode == 2 && canBuildCrossing && tileElement->GetType() == TileElementType::Track - && tileElement->GetBaseZ() == pos.baseZ && tileElement->AsTrack()->GetTrackType() == TrackElemType::Flat) + crossingMode == CreateCrossingMode::pathOverTrack && canBuildCrossing + && tileElement->GetType() == TileElementType::Track && tileElement->GetBaseZ() == pos.baseZ + && tileElement->AsTrack()->GetTrackType() == TrackElemType::Flat) { auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride != nullptr && ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SUPPORTS_LEVEL_CROSSINGS)) @@ -122,7 +122,8 @@ static bool MapLoc68BABCShouldContinue( * bl = bl */ GameActions::Result MapCanConstructWithClearAt( - const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, QuarterTile quarterTile, uint8_t flags, uint8_t crossingMode, bool isTree) + const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, QuarterTile quarterTile, uint8_t flags, CreateCrossingMode crossingMode, + bool isTree) { auto res = GameActions::Result(); @@ -202,8 +203,8 @@ GameActions::Result MapCanConstructWithClearAt( } // Only allow building crossings directly on a flat surface tile. - if (tileElement->GetType() == TileElementType::Surface - && (tileElement->AsSurface()->GetSlope()) == TILE_ELEMENT_SLOPE_FLAT && tileElement->GetBaseZ() == pos.baseZ) + if (tileElement->GetType() == TileElementType::Surface && (tileElement->AsSurface()->GetSlope()) == kTileSlopeFlat + && tileElement->GetBaseZ() == pos.baseZ) { canBuildCrossing = true; } @@ -223,28 +224,28 @@ GameActions::Result MapCanConstructWithClearAt( auto southZ = northZ; auto westZ = northZ; const auto slope = tileElement->AsSurface()->GetSlope(); - if (slope & TILE_ELEMENT_SLOPE_N_CORNER_UP) + if (slope & kTileSlopeNCornerUp) { northZ += LAND_HEIGHT_STEP; - if (slope == (TILE_ELEMENT_SLOPE_S_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) + if (slope == (kTileSlopeSCornerDown | kTileSlopeDiagonalFlag)) northZ += LAND_HEIGHT_STEP; } - if (slope & TILE_ELEMENT_SLOPE_E_CORNER_UP) + if (slope & kTileSlopeECornerUp) { eastZ += LAND_HEIGHT_STEP; - if (slope == (TILE_ELEMENT_SLOPE_W_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) + if (slope == (kTileSlopeWCornerDown | kTileSlopeDiagonalFlag)) eastZ += LAND_HEIGHT_STEP; } - if (slope & TILE_ELEMENT_SLOPE_S_CORNER_UP) + if (slope & kTileSlopeSCornerUp) { southZ += LAND_HEIGHT_STEP; - if (slope == (TILE_ELEMENT_SLOPE_N_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) + if (slope == (kTileSlopeNCornerDown | kTileSlopeDiagonalFlag)) southZ += LAND_HEIGHT_STEP; } - if (slope & TILE_ELEMENT_SLOPE_W_CORNER_UP) + if (slope & kTileSlopeWCornerUp) { westZ += LAND_HEIGHT_STEP; - if (slope == (TILE_ELEMENT_SLOPE_E_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) + if (slope == (kTileSlopeECornerDown | kTileSlopeDiagonalFlag)) westZ += LAND_HEIGHT_STEP; } const auto baseHeight = pos.baseZ + (4 * COORDS_Z_STEP); diff --git a/src/openrct2/world/ConstructionClearance.h b/src/openrct2/world/ConstructionClearance.h index 241a590c14..d7b0c62a68 100644 --- a/src/openrct2/world/ConstructionClearance.h +++ b/src/openrct2/world/ConstructionClearance.h @@ -22,6 +22,16 @@ class QuarterTile; using CLEAR_FUNC = int32_t (*)(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money64* price); +// Used when calling MapCanConstructWithClearAt(); +// This assumes that the caller has already done the check on the element it wants to place, +// as this function can only check the element the player wants to build through. +enum class CreateCrossingMode +{ + none, + trackOverPath, + pathOverTrack, +}; + int32_t MapPlaceNonSceneryClearFunc(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money64* price); int32_t MapPlaceSceneryClearFunc(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money64* price); @@ -32,7 +42,7 @@ struct ConstructClearResult [[nodiscard]] GameActions::Result MapCanConstructWithClearAt( const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, QuarterTile quarterTile, uint8_t flags, - uint8_t crossingMode = CREATE_CROSSING_MODE_NONE, bool isTree = false); + CreateCrossingMode crossingMode = CreateCrossingMode::none, bool isTree = false); [[nodiscard]] GameActions::Result MapCanConstructAt(const CoordsXYRangedZ& pos, QuarterTile bl); diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 73088ab1d8..1dca82ab98 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -36,6 +36,7 @@ #include "../ride/Track.h" #include "../ride/TrackData.h" #include "../util/Util.h" +#include "../world/tile_element/Slope.h" #include "Location.hpp" #include "Map.h" #include "MapAnimation.h" @@ -61,7 +62,7 @@ static RideId _footpathQueueChain[64]; // This is the coordinates that a user of the bin should move to // rct2: 0x00992A4C -const std::array BinUseOffsets = { +const std::array BinUseOffsets = { CoordsXY{ 11, 16 }, { 16, 21 }, { 21, 16 }, @@ -70,12 +71,12 @@ const std::array BinUseOffsets = { // These are the offsets for bench positions on footpaths, 2 for each edge // rct2: 0x00981F2C, 0x00981F2E -const std::array BenchUseOffsets = { +const std::array BenchUseOffsets = { CoordsXY{ 7, 12 }, { 12, 25 }, { 25, 20 }, { 20, 7 }, { 7, 20 }, { 20, 25 }, { 25, 12 }, { 12, 7 }, }; /** rct2: 0x00981D6C, 0x00981D6E */ -const std::array DirectionOffsets = { +const std::array DirectionOffsets = { CoordsXY{ -1, 0 }, { 0, 1 }, { 1, 0 }, @@ -180,8 +181,7 @@ money64 FootpathProvisionalSet( VirtualFloorSetHeight(0); } else if ( - gFootpathConstructSlope == TILE_ELEMENT_SLOPE_FLAT - || gProvisionalFootpath.Position.z < gFootpathConstructFromPosition.z) + gFootpathConstructSlope == kTileSlopeFlat || gProvisionalFootpath.Position.z < gFootpathConstructFromPosition.z) { // Going either straight on, or down. VirtualFloorSetHeight(gProvisionalFootpath.Position.z); @@ -513,7 +513,7 @@ static void FootpathConnectCorners(const CoordsXY& footpathPos, PathElement* ini std::get<0>(tileElements) = { initialTileElement, footpathPos }; int32_t z = initialTileElement->GetBaseZ(); - for (int32_t initialDirection = 0; initialDirection < NumOrthogonalDirections; initialDirection++) + for (int32_t initialDirection = 0; initialDirection < kNumOrthogonalDirections; initialDirection++) { int32_t direction = initialDirection; auto currentPos = footpathPos + CoordsDirectionDelta[direction]; @@ -2052,7 +2052,7 @@ void FootpathUpdateQueueEntranceBanner(const CoordsXY& footpathPos, TileElement* if (tileElement->AsPath()->IsQueue()) { FootpathQueueChainPush(tileElement->AsPath()->GetRideIndex()); - for (int32_t direction = 0; direction < NumOrthogonalDirections; direction++) + for (int32_t direction = 0; direction < kNumOrthogonalDirections; direction++) { if (tileElement->AsPath()->GetEdges() & (1 << direction)) { @@ -2306,7 +2306,7 @@ void FootpathRemoveEdgesAt(const CoordsXY& footpathPos, TileElement* tileElement FootpathUpdateQueueEntranceBanner(footpathPos, tileElement); bool fixCorners = false; - for (uint8_t direction = 0; direction < NumOrthogonalDirections; direction++) + for (uint8_t direction = 0; direction < kNumOrthogonalDirections; direction++) { int32_t z1 = tileElement->BaseHeight; if (tileElement->GetType() == TileElementType::Path) diff --git a/src/openrct2/world/Footpath.h b/src/openrct2/world/Footpath.h index f9fb66d9ab..30869b7faf 100644 --- a/src/openrct2/world/Footpath.h +++ b/src/openrct2/world/Footpath.h @@ -181,9 +181,9 @@ extern uint8_t gFootpathConstructSlope; extern uint8_t gFootpathGroundFlags; // Given a direction, this will return how to increase/decrease the x and y coordinates. -extern const std::array DirectionOffsets; -extern const std::array BinUseOffsets; -extern const std::array BenchUseOffsets; +extern const std::array DirectionOffsets; +extern const std::array BinUseOffsets; +extern const std::array BenchUseOffsets; PathElement* MapGetFootpathElement(const CoordsXYZ& coords); void FootpathInterruptPeeps(const CoordsXYZ& footpathPos); diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index cffbbf94c9..df22877063 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -12,8 +12,6 @@ #include "../common.h" #include "../util/Math.hpp" -#include - constexpr int16_t LOCATION_NULL = -32768; constexpr int32_t COORDS_XY_STEP = 32; @@ -21,7 +19,7 @@ constexpr int32_t COORDS_XY_HALF_TILE = (COORDS_XY_STEP / 2); constexpr int32_t COORDS_Z_STEP = 8; constexpr int32_t COORDS_Z_PER_TINY_Z = 16; -constexpr auto NumOrthogonalDirections = 4; +constexpr auto kNumOrthogonalDirections = 4; constexpr int32_t COORDS_NULL = 0xFFFF8000; @@ -552,7 +550,7 @@ inline constexpr Direction DirectionReverse(Direction dir) inline constexpr bool DirectionValid(Direction dir) { - return dir < NumOrthogonalDirections; + return dir < kNumOrthogonalDirections; } /** @@ -810,9 +808,14 @@ struct MapRange : public RectRange constexpr MapRange Normalise() const { + // Don't use std::min/max, as they require , one of C++'s heaviest + // in this very common header. auto result = MapRange( - std::min(GetLeft(), GetRight()), std::min(GetTop(), GetBottom()), std::max(GetLeft(), GetRight()), - std::max(GetTop(), GetBottom())); + GetLeft() < GetRight() ? GetLeft() : GetRight(), // min + GetTop() < GetBottom() ? GetTop() : GetBottom(), // min + GetLeft() > GetRight() ? GetLeft() : GetRight(), // max + GetTop() > GetBottom() ? GetTop() : GetBottom() // max + ); return result; } }; diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index bca8e1bf62..8df830d33f 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -20,8 +20,12 @@ #include "../actions/ParkEntranceRemoveAction.h" #include "../actions/WallRemoveAction.h" #include "../audio/audio.h" -#include "../config/Config.h" #include "../core/Guard.hpp" +#include "../entity/Duck.h" +#include "../entity/EntityTweener.h" +#include "../entity/Fountain.h" +#include "../entity/PatrolArea.h" +#include "../entity/Staff.h" #include "../interface/Cursors.h" #include "../interface/Viewport.h" #include "../interface/Window.h" @@ -43,8 +47,10 @@ #include "../util/Util.h" #include "../windows/Intent.h" #include "../world/TilePointerIndex.hpp" +#include "../world/tile_element/Slope.h" #include "Banner.h" #include "Climate.h" +#include "Entrance.h" #include "Footpath.h" #include "MapAnimation.h" #include "Park.h" @@ -164,7 +170,7 @@ static TileElement GetDefaultSurfaceElement() el.BaseHeight = 14; el.ClearanceHeight = 14; el.AsSurface()->SetWaterHeight(0); - el.AsSurface()->SetSlope(TILE_ELEMENT_SLOPE_FLAT); + el.AsSurface()->SetSlope(kTileSlopeFlat); el.AsSurface()->SetGrassLength(GRASS_LENGTH_CLEAR_0); el.AsSurface()->SetOwnership(OWNERSHIP_UNOWNED); el.AsSurface()->SetParkFences(0); @@ -564,9 +570,9 @@ int16_t TileElementHeight(const CoordsXYZ& loc, uint8_t slope) auto height = loc.z; - uint8_t extra_height = (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) >> 4; // 0x10 is the 5th bit - sets slope to double height + uint8_t extra_height = (slope & kTileSlopeDiagonalFlag) >> 4; // 0x10 is the 5th bit - sets slope to double height // Remove the extra height bit - slope &= TILE_ELEMENT_SLOPE_ALL_CORNERS_UP; + slope &= kTileSlopeRaisedCornersMask; int8_t quad = 0, quad_extra = 0; // which quadrant the element is in? // quad_extra is for extra height tiles @@ -586,21 +592,21 @@ int16_t TileElementHeight(const CoordsXYZ& loc, uint8_t slope) // We arbitrarily take the SW corner to be closest to the viewer // One corner up - if (slope == TILE_ELEMENT_SLOPE_N_CORNER_UP || slope == TILE_ELEMENT_SLOPE_E_CORNER_UP - || slope == TILE_ELEMENT_SLOPE_S_CORNER_UP || slope == TILE_ELEMENT_SLOPE_W_CORNER_UP) + if (slope == kTileSlopeNCornerUp || slope == kTileSlopeECornerUp || slope == kTileSlopeSCornerUp + || slope == kTileSlopeWCornerUp) { switch (slope) { - case TILE_ELEMENT_SLOPE_N_CORNER_UP: + case kTileSlopeNCornerUp: quad = xl + yl - TILE_SIZE; break; - case TILE_ELEMENT_SLOPE_E_CORNER_UP: + case kTileSlopeECornerUp: quad = xl - yl; break; - case TILE_ELEMENT_SLOPE_S_CORNER_UP: + case kTileSlopeSCornerUp: quad = TILE_SIZE - yl - xl; break; - case TILE_ELEMENT_SLOPE_W_CORNER_UP: + case kTileSlopeWCornerUp: quad = yl - xl; break; } @@ -614,39 +620,39 @@ int16_t TileElementHeight(const CoordsXYZ& loc, uint8_t slope) // One side up switch (slope) { - case TILE_ELEMENT_SLOPE_NE_SIDE_UP: + case kTileSlopeNESideUp: height += xl / 2; break; - case TILE_ELEMENT_SLOPE_SE_SIDE_UP: + case kTileSlopeSESideUp: height += (TILE_SIZE - yl) / 2; break; - case TILE_ELEMENT_SLOPE_NW_SIDE_UP: + case kTileSlopeNWSideUp: height += yl / 2; break; - case TILE_ELEMENT_SLOPE_SW_SIDE_UP: + case kTileSlopeSWSideUp: height += (TILE_SIZE - xl) / 2; break; } // One corner down - if ((slope == TILE_ELEMENT_SLOPE_W_CORNER_DN) || (slope == TILE_ELEMENT_SLOPE_S_CORNER_DN) - || (slope == TILE_ELEMENT_SLOPE_E_CORNER_DN) || (slope == TILE_ELEMENT_SLOPE_N_CORNER_DN)) + if ((slope == kTileSlopeWCornerDown) || (slope == kTileSlopeSCornerDown) || (slope == kTileSlopeECornerDown) + || (slope == kTileSlopeNCornerDown)) { switch (slope) { - case TILE_ELEMENT_SLOPE_W_CORNER_DN: + case kTileSlopeWCornerDown: quad_extra = xl + TILE_SIZE - yl; quad = xl - yl; break; - case TILE_ELEMENT_SLOPE_S_CORNER_DN: + case kTileSlopeSCornerDown: quad_extra = xl + yl; quad = xl + yl - TILE_SIZE; break; - case TILE_ELEMENT_SLOPE_E_CORNER_DN: + case kTileSlopeECornerDown: quad_extra = TILE_SIZE - xl + yl; quad = yl - xl; break; - case TILE_ELEMENT_SLOPE_N_CORNER_DN: + case kTileSlopeNCornerDown: quad_extra = (TILE_SIZE - xl) + (TILE_SIZE - yl); quad = TILE_SIZE - yl - xl; break; @@ -667,14 +673,14 @@ int16_t TileElementHeight(const CoordsXYZ& loc, uint8_t slope) } // Valleys - if ((slope == TILE_ELEMENT_SLOPE_W_E_VALLEY) || (slope == TILE_ELEMENT_SLOPE_N_S_VALLEY)) + if ((slope == kTileSlopeWEValley) || (slope == kTileSlopeNSValley)) { switch (slope) { - case TILE_ELEMENT_SLOPE_W_E_VALLEY: + case kTileSlopeWEValley: quad = std::abs(xl - yl); break; - case TILE_ELEMENT_SLOPE_N_S_VALLEY: + case kTileSlopeNSValley: quad = std::abs(xl + yl - TILE_SIZE); break; } @@ -785,7 +791,7 @@ int32_t MapHeightFromSlope(const CoordsXY& coords, int32_t slopeDirection, bool if (!isSloped) return 0; - switch (slopeDirection % NumOrthogonalDirections) + switch (slopeDirection % kNumOrthogonalDirections) { case TILE_ELEMENT_DIRECTION_WEST: return (31 - (coords.x & 31)) / 2; @@ -887,40 +893,40 @@ int32_t MapGetCornerHeight(int32_t z, int32_t slope, int32_t direction) switch (direction) { case 0: - if (slope & TILE_ELEMENT_SLOPE_N_CORNER_UP) + if (slope & kTileSlopeNCornerUp) { z += 2; - if (slope == (TILE_ELEMENT_SLOPE_S_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) + if (slope == (kTileSlopeSCornerDown | kTileSlopeDiagonalFlag)) { z += 2; } } break; case 1: - if (slope & TILE_ELEMENT_SLOPE_E_CORNER_UP) + if (slope & kTileSlopeECornerUp) { z += 2; - if (slope == (TILE_ELEMENT_SLOPE_W_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) + if (slope == (kTileSlopeWCornerDown | kTileSlopeDiagonalFlag)) { z += 2; } } break; case 2: - if (slope & TILE_ELEMENT_SLOPE_S_CORNER_UP) + if (slope & kTileSlopeSCornerUp) { z += 2; - if (slope == (TILE_ELEMENT_SLOPE_N_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) + if (slope == (kTileSlopeNCornerDown | kTileSlopeDiagonalFlag)) { z += 2; } } break; case 3: - if (slope & TILE_ELEMENT_SLOPE_W_CORNER_UP) + if (slope & kTileSlopeWCornerUp) { z += 2; - if (slope == (TILE_ELEMENT_SLOPE_E_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) + if (slope == (kTileSlopeECornerDown | kTileSlopeDiagonalFlag)) { z += 2; } @@ -990,9 +996,9 @@ uint8_t MapGetHighestLandHeight(const MapRange& range) } uint8_t BaseHeight = surfaceElement->BaseHeight; - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + if (surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) BaseHeight += 2; - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) BaseHeight += 2; if (max_height < BaseHeight) max_height = BaseHeight; @@ -1385,28 +1391,28 @@ static void MapExtendBoundarySurfaceExtendTile(const SurfaceElement& sourceTile, destTile.SetWaterHeight(sourceTile.GetWaterHeight()); auto z = sourceTile.BaseHeight; - auto slope = sourceTile.GetSlope() & TILE_ELEMENT_SLOPE_NW_SIDE_UP; - if (slope == TILE_ELEMENT_SLOPE_NW_SIDE_UP) + auto slope = sourceTile.GetSlope() & kTileSlopeNWSideUp; + if (slope == kTileSlopeNWSideUp) { z += 2; - slope = TILE_ELEMENT_SLOPE_FLAT; - if (sourceTile.GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + slope = kTileSlopeFlat; + if (sourceTile.GetSlope() & kTileSlopeDiagonalFlag) { - slope = TILE_ELEMENT_SLOPE_N_CORNER_UP; - if (sourceTile.GetSlope() & TILE_ELEMENT_SLOPE_S_CORNER_UP) + slope = kTileSlopeNCornerUp; + if (sourceTile.GetSlope() & kTileSlopeSCornerUp) { - slope = TILE_ELEMENT_SLOPE_W_CORNER_UP; - if (sourceTile.GetSlope() & TILE_ELEMENT_SLOPE_E_CORNER_UP) + slope = kTileSlopeWCornerUp; + if (sourceTile.GetSlope() & kTileSlopeECornerUp) { - slope = TILE_ELEMENT_SLOPE_FLAT; + slope = kTileSlopeFlat; } } } } - if (slope & TILE_ELEMENT_SLOPE_N_CORNER_UP) - slope |= TILE_ELEMENT_SLOPE_E_CORNER_UP; - if (slope & TILE_ELEMENT_SLOPE_W_CORNER_UP) - slope |= TILE_ELEMENT_SLOPE_S_CORNER_UP; + if (slope & kTileSlopeNCornerUp) + slope |= kTileSlopeECornerUp; + if (slope & kTileSlopeWCornerUp) + slope |= kTileSlopeSCornerUp; destTile.SetSlope(slope); destTile.BaseHeight = z; @@ -1464,7 +1470,7 @@ static void ClearElementAt(const CoordsXY& loc, TileElement** elementPtr) element->BaseHeight = kMinimumLandHeight; element->ClearanceHeight = kMinimumLandHeight; element->Owner = 0; - element->AsSurface()->SetSlope(TILE_ELEMENT_SLOPE_FLAT); + element->AsSurface()->SetSlope(kTileSlopeFlat); element->AsSurface()->SetSurfaceObjectIndex(0); element->AsSurface()->SetEdgeObjectIndex(0); element->AsSurface()->SetGrassLength(GRASS_LENGTH_CLEAR_0); @@ -1574,9 +1580,9 @@ int32_t MapGetHighestZ(const CoordsXY& loc) auto z = surfaceElement->GetBaseZ(); // Raise z so that is above highest point of land and water on tile - if ((surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) != TILE_ELEMENT_SLOPE_FLAT) + if ((surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) != kTileSlopeFlat) z += LAND_HEIGHT_STEP; - if ((surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) != 0) + if ((surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) != 0) z += LAND_HEIGHT_STEP; z = std::max(z, surfaceElement->GetWaterHeight()); @@ -1874,7 +1880,7 @@ bool MapSurfaceIsBlocked(const CoordsXY& mapCoords) int16_t base_z = surfaceElement->BaseHeight; int16_t clear_z = surfaceElement->BaseHeight + 2; - if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) clear_z += 2; auto tileElement = reinterpret_cast(surfaceElement); @@ -2231,3 +2237,201 @@ MapRange ClampRangeWithinMap(const MapRange& range) MapRange validRange = MapRange{ aX, aY, bX, bY }; return validRange; } + +static inline void shiftIfNotNull(TileCoordsXY& coords, const TileCoordsXY& amount) +{ + if (!coords.IsNull()) + coords += amount; +} + +static inline void shiftIfNotNull(CoordsXY& coords, const CoordsXY& amount) +{ + if (!coords.IsNull()) + coords += amount; +} + +void ShiftMap(const TileCoordsXY& amount) +{ + if (amount.x == 0 && amount.y == 0) + return; + + auto amountToMove = amount.ToCoordsXY(); + auto& gameState = GetGameState(); + + // Tile elements + auto newElements = std::vector(); + for (int32_t y = 0; y < kMaximumMapSizeTechnical; y++) + { + for (int32_t x = 0; x < kMaximumMapSizeTechnical; x++) + { + 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) + { + auto srcTile = _tileIndex.GetFirstElementAt(TileCoordsXY(srcX, srcY)); + do + { + newElements.push_back(*srcTile); + } while (!(srcTile++)->IsLastForTile()); + } + else if (x == 0 || y == 0 || x == gameState.MapSize.x - 1 || y == gameState.MapSize.y - 1) + { + auto surface = GetDefaultSurfaceElement(); + surface.SetBaseZ(kMinimumLandZ); + surface.SetClearanceZ(kMinimumLandZ); + surface.AsSurface()->SetSlope(0); + surface.AsSurface()->SetWaterHeight(0); + newElements.push_back(surface); + } + else + { + 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) + { + auto tileEl = *srcTile; + tileEl.SetOwner(OWNERSHIP_UNOWNED); + tileEl.SetParkFences(0); + tileEl.SetLastForTile(true); + newElements.push_back(*reinterpret_cast(&tileEl)); + } + else + { + newElements.push_back(GetDefaultSurfaceElement()); + } + } + } + } + SetTileElements(std::move(newElements)); + MapRemoveOutOfRangeElements(); + + for (auto& spawn : gameState.PeepSpawns) + shiftIfNotNull(spawn, amountToMove); + + for (auto& entrance : gameState.Park.Entrances) + shiftIfNotNull(entrance, amountToMove); + + // Entities + auto& entityTweener = EntityTweener::Get(); + for (auto i = 0; i < EnumValue(EntityType::Count); i++) + { + auto entityType = static_cast(i); + auto& list = GetEntityList(entityType); + for (const auto& entityId : list) + { + auto entity = GetEntity(entityId); + + // Do not tween the entity + entityTweener.RemoveEntity(entity); + + auto location = entity->GetLocation(); + shiftIfNotNull(location, amountToMove); + entity->MoveTo(location); + + switch (entityType) + { + case EntityType::Guest: + case EntityType::Staff: + { + auto peep = entity->As(); + if (peep != nullptr) + { + shiftIfNotNull(peep->NextLoc, amountToMove); + peep->DestinationX += amountToMove.x; + peep->DestinationY += amountToMove.y; + shiftIfNotNull(peep->PathfindGoal, amount); + for (auto& h : peep->PathfindHistory) + shiftIfNotNull(h, amount); + } + break; + } + case EntityType::Vehicle: + { + auto vehicle = entity->As(); + if (vehicle != nullptr) + { + shiftIfNotNull(vehicle->TrackLocation, amountToMove); + shiftIfNotNull(vehicle->BoatLocation, amountToMove); + } + break; + } + case EntityType::Duck: + { + auto duck = entity->As(); + if (duck != nullptr) + { + duck->target_x += amountToMove.x; + duck->target_y += amountToMove.y; + } + break; + } + case EntityType::JumpingFountain: + { + auto fountain = entity->As(); + if (fountain != nullptr) + { + fountain->TargetX += amountToMove.x; + fountain->TargetY += amountToMove.y; + } + } + default: + break; + } + if (entityType == EntityType::Staff) + { + auto staff = entity->As(); + if (staff != nullptr) + { + auto patrol = staff->PatrolInfo; + if (patrol != nullptr) + { + auto positions = patrol->ToVector(); + for (auto& p : positions) + shiftIfNotNull(p, amount); + patrol->Clear(); + patrol->Union(positions); + } + } + } + } + } + UpdateConsolidatedPatrolAreas(); + + // Rides + for (auto& ride : GetRideManager()) + { + auto& stations = ride.GetStations(); + for (auto& station : stations) + { + shiftIfNotNull(station.Start, amountToMove); + shiftIfNotNull(station.Entrance, 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); + } + + // Banners + auto numBanners = GetNumBanners(); + auto id = BannerIndex::FromUnderlying(0); + size_t count = 0; + while (count < numBanners) + { + auto* banner = GetBanner(id); + if (banner != nullptr) + { + shiftIfNotNull(banner->position, amount); + count++; + } + id = BannerIndex::FromUnderlying(id.ToUnderlying() + 1); + } + + ShiftAllMapAnimations(amountToMove); +} diff --git a/src/openrct2/world/Map.h b/src/openrct2/world/Map.h index 8b4ccafb0e..f1bc156f22 100644 --- a/src/openrct2/world/Map.h +++ b/src/openrct2/world/Map.h @@ -91,16 +91,6 @@ enum MAP_SELECT_TYPE_EDGE_3, }; -// Used when calling MapCanConstructWithClearAt(); -// This assumes that the caller has already done the check on the element it wants to place, -// as this function can only check the element the player wants to build through. -enum -{ - CREATE_CROSSING_MODE_NONE, - CREATE_CROSSING_MODE_TRACK_OVER_PATH, - CREATE_CROSSING_MODE_PATH_OVER_TRACK, -}; - extern const std::array CoordsDirectionDelta; extern const TileCoordsXY TileDirectionDelta[]; @@ -256,3 +246,4 @@ void FixLandOwnershipTiles(std::initializer_list tiles); void FixLandOwnershipTilesWithOwnership( std::initializer_list tiles, uint8_t ownership, bool doNotDowngrade = false); MapRange ClampRangeWithinMap(const MapRange& range); +void ShiftMap(const TileCoordsXY& amount); diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index 9c1751d48b..690c62f779 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -709,3 +709,14 @@ void MapAnimationAutoCreateAtTileElement(TileCoordsXY coords, TileElement* el) break; } } + +void ShiftAllMapAnimations(CoordsXY amount) +{ + if (amount.x == 0 && amount.y == 0) + return; + + for (auto& a : _mapAnimations) + { + a.location += amount; + } +} diff --git a/src/openrct2/world/MapAnimation.h b/src/openrct2/world/MapAnimation.h index ddbdabe18e..fff54969c5 100644 --- a/src/openrct2/world/MapAnimation.h +++ b/src/openrct2/world/MapAnimation.h @@ -46,3 +46,4 @@ void MapAnimationInvalidateAll(); const std::vector& GetMapAnimations(); void MapAnimationAutoCreate(); void MapAnimationAutoCreateAtTileElement(TileCoordsXY coords, TileElement* el); +void ShiftAllMapAnimations(CoordsXY amount); diff --git a/src/openrct2/world/MapGen.cpp b/src/openrct2/world/MapGen.cpp index 55943d898d..f40059bc22 100644 --- a/src/openrct2/world/MapGen.cpp +++ b/src/openrct2/world/MapGen.cpp @@ -26,6 +26,7 @@ #include "../object/TerrainSurfaceObject.h" #include "../platform/Platform.h" #include "../util/Util.h" +#include "../world/tile_element/Slope.h" #include "Map.h" #include "MapHelpers.h" #include "Scenery.h" @@ -496,13 +497,13 @@ static void MapGenSetHeight(MapGenSettings* settings) uint8_t currentSlope = surfaceElement->GetSlope(); if (q00 > baseHeight) - currentSlope |= TILE_ELEMENT_SLOPE_S_CORNER_UP; + currentSlope |= kTileSlopeSCornerUp; if (q01 > baseHeight) - currentSlope |= TILE_ELEMENT_SLOPE_W_CORNER_UP; + currentSlope |= kTileSlopeWCornerUp; if (q10 > baseHeight) - currentSlope |= TILE_ELEMENT_SLOPE_E_CORNER_UP; + currentSlope |= kTileSlopeECornerUp; if (q11 > baseHeight) - currentSlope |= TILE_ELEMENT_SLOPE_N_CORNER_UP; + currentSlope |= kTileSlopeNCornerUp; surfaceElement->SetSlope(currentSlope); } diff --git a/src/openrct2/world/MapHelpers.cpp b/src/openrct2/world/MapHelpers.cpp index ebe9fedc2f..6c26578d3d 100644 --- a/src/openrct2/world/MapHelpers.cpp +++ b/src/openrct2/world/MapHelpers.cpp @@ -9,9 +9,12 @@ #include "MapHelpers.h" +#include "../world/tile_element/Slope.h" #include "Map.h" #include "Surface.h" +#include + static uint8_t GetBaseHeightOrZero(int32_t x, int32_t y) { auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }); @@ -32,7 +35,7 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }); if (surfaceElement == nullptr) continue; - surfaceElement->SetSlope(TILE_ELEMENT_SLOPE_FLAT); + surfaceElement->SetSlope(kTileSlopeFlat); // Raise to edge height - 2 highest = surfaceElement->BaseHeight; @@ -122,20 +125,20 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) if (doubleCorner != -1) { - uint8_t slope = surfaceElement->GetSlope() | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT; + uint8_t slope = surfaceElement->GetSlope() | kTileSlopeDiagonalFlag; switch (doubleCorner) { case 0: - slope |= TILE_ELEMENT_SLOPE_N_CORNER_DN; + slope |= kTileSlopeNCornerDown; break; case 1: - slope |= TILE_ELEMENT_SLOPE_W_CORNER_DN; + slope |= kTileSlopeWCornerDown; break; case 2: - slope |= TILE_ELEMENT_SLOPE_S_CORNER_DN; + slope |= kTileSlopeSCornerDown; break; case 3: - slope |= TILE_ELEMENT_SLOPE_E_CORNER_DN; + slope |= kTileSlopeECornerDown; break; } surfaceElement->SetSlope(slope); @@ -146,41 +149,41 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) // Corners auto surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 1, y + 1 }); if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) - slope |= TILE_ELEMENT_SLOPE_N_CORNER_UP; + slope |= kTileSlopeNCornerUp; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x - 1, y + 1 }); if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) - slope |= TILE_ELEMENT_SLOPE_W_CORNER_UP; + slope |= kTileSlopeWCornerUp; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 1, y - 1 }); if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) - slope |= TILE_ELEMENT_SLOPE_E_CORNER_UP; + slope |= kTileSlopeECornerUp; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x - 1, y - 1 }); if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) - slope |= TILE_ELEMENT_SLOPE_S_CORNER_UP; + slope |= kTileSlopeSCornerUp; // Sides surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 1, y + 0 }); if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) - slope |= TILE_ELEMENT_SLOPE_NE_SIDE_UP; + slope |= kTileSlopeNESideUp; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x - 1, y + 0 }); if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) - slope |= TILE_ELEMENT_SLOPE_SW_SIDE_UP; + slope |= kTileSlopeSWSideUp; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 0, y - 1 }); if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) - slope |= TILE_ELEMENT_SLOPE_SE_SIDE_UP; + slope |= kTileSlopeSESideUp; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 0, y + 1 }); if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) - slope |= TILE_ELEMENT_SLOPE_NW_SIDE_UP; + slope |= kTileSlopeNWSideUp; // Raise - if (slope == TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + if (slope == kTileSlopeRaisedCornersMask) { - slope = TILE_ELEMENT_SLOPE_FLAT; + slope = kTileSlopeFlat; surfaceElement->BaseHeight = surfaceElement->ClearanceHeight += 2; } surfaceElement->SetSlope(slope); @@ -260,19 +263,19 @@ int32_t TileSmooth(const TileCoordsXY& tileCoords) int8_t thresholdS = std::clamp(neighbourHeightOffset.SE, 0, 1) + std::clamp(neighbourHeightOffset.S, 0, 1) + std::clamp(neighbourHeightOffset.SW, 0, 1); - uint8_t slope = TILE_ELEMENT_SLOPE_FLAT; + uint8_t slope = kTileSlopeFlat; slope |= (thresholdW >= 1) ? SLOPE_W_THRESHOLD_FLAGS : 0; slope |= (thresholdN >= 1) ? SLOPE_N_THRESHOLD_FLAGS : 0; slope |= (thresholdE >= 1) ? SLOPE_E_THRESHOLD_FLAGS : 0; slope |= (thresholdS >= 1) ? SLOPE_S_THRESHOLD_FLAGS : 0; // Set diagonal when three corners (one corner down) have been raised, and the middle one can be raised one more - if ((slope == TILE_ELEMENT_SLOPE_W_CORNER_DN && neighbourHeightOffset.W >= 4) - || (slope == TILE_ELEMENT_SLOPE_S_CORNER_DN && neighbourHeightOffset.S >= 4) - || (slope == TILE_ELEMENT_SLOPE_E_CORNER_DN && neighbourHeightOffset.E >= 4) - || (slope == TILE_ELEMENT_SLOPE_N_CORNER_DN && neighbourHeightOffset.N >= 4)) + if ((slope == kTileSlopeWCornerDown && neighbourHeightOffset.W >= 4) + || (slope == kTileSlopeSCornerDown && neighbourHeightOffset.S >= 4) + || (slope == kTileSlopeECornerDown && neighbourHeightOffset.E >= 4) + || (slope == kTileSlopeNCornerDown && neighbourHeightOffset.N >= 4)) { - slope |= TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT; + slope |= kTileSlopeDiagonalFlag; } // Check if the calculated slope is the same already @@ -282,10 +285,10 @@ int32_t TileSmooth(const TileCoordsXY& tileCoords) return 0; } - if ((slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) == TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + if ((slope & kTileSlopeRaisedCornersMask) == kTileSlopeRaisedCornersMask) { // All corners are raised, raise the entire tile instead. - surfaceElement->SetSlope(TILE_ELEMENT_SLOPE_FLAT); + surfaceElement->SetSlope(kTileSlopeFlat); surfaceElement->BaseHeight = (surfaceElement->ClearanceHeight += 2); if (surfaceElement->GetWaterHeight() <= surfaceElement->GetBaseZ()) { @@ -298,9 +301,9 @@ int32_t TileSmooth(const TileCoordsXY& tileCoords) surfaceElement->SetSlope(slope); // Set correct clearance height - if (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (slope & kTileSlopeDiagonalFlag) surfaceElement->ClearanceHeight = surfaceElement->BaseHeight + 4; - else if (slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + else if (slope & kTileSlopeRaisedCornersMask) surfaceElement->ClearanceHeight = surfaceElement->BaseHeight + 2; } diff --git a/src/openrct2/world/Park.cpp b/src/openrct2/world/Park.cpp index 98a3f5e07b..cb4185cfbb 100644 --- a/src/openrct2/world/Park.cpp +++ b/src/openrct2/world/Park.cpp @@ -16,7 +16,6 @@ #include "../GameState.h" #include "../OpenRCT2.h" #include "../actions/ParkSetParameterAction.h" -#include "../config/Config.h" #include "../core/Memory.hpp" #include "../core/String.hpp" #include "../entity/Litter.h" @@ -144,7 +143,7 @@ namespace OpenRCT2::Park continue; if (ride.GetStation().SegmentLength < (600 << 16)) continue; - if (ride.excitement < RIDE_RATING(6, 00)) + if (ride.ratings.excitement < RIDE_RATING(6, 00)) continue; // Bonus guests for good ride @@ -229,7 +228,7 @@ namespace OpenRCT2::Park } // Extra guests generated by advertising campaigns - for (const auto& campaign : gMarketingCampaigns) + for (const auto& campaign : gameState.MarketingCampaigns) { // Random chance of guest generation auto probability = MarketingGetCampaignGuestGenerationProbability(campaign.Type); @@ -276,7 +275,7 @@ namespace OpenRCT2::Park gameState.TotalRideValueForMoney = 0; gameState.SuggestedGuestMaximum = 0; gameState.ResearchLastItem = std::nullopt; - gMarketingCampaigns.clear(); + gameState.MarketingCampaigns.clear(); ResearchResetItems(gameState); FinanceInit(); @@ -439,8 +438,8 @@ namespace OpenRCT2::Park totalRideUptime += 100 - ride.downtime; if (RideHasRatings(ride)) { - totalRideExcitement += ride.excitement / 8; - totalRideIntensity += ride.intensity / 8; + totalRideExcitement += ride.ratings.excitement / 8; + totalRideIntensity += ride.ratings.intensity / 8; excitingRideCount++; } rideCount++; @@ -515,7 +514,7 @@ namespace OpenRCT2::Park auto result = gameState.Park.Value - gameState.BankLoan; // Clamp addition to prevent overflow - result = AddClamp_money64(result, FinanceGetCurrentCash()); + result = AddClamp(result, FinanceGetCurrentCash()); return result; } diff --git a/src/openrct2/world/Park.h b/src/openrct2/world/Park.h index 28d491433e..5a7814b753 100644 --- a/src/openrct2/world/Park.h +++ b/src/openrct2/world/Park.h @@ -66,7 +66,7 @@ namespace OpenRCT2 std::vector Entrances; uint32_t Size; money64 Value; - money64 ValueHistory[FINANCE_GRAPH_SIZE]; + money64 ValueHistory[kFinanceGraphSize]; bool IsOpen() const; }; diff --git a/src/openrct2/world/Scenery.cpp b/src/openrct2/world/Scenery.cpp index 86418f2e83..73ed9b9424 100644 --- a/src/openrct2/world/Scenery.cpp +++ b/src/openrct2/world/Scenery.cpp @@ -425,17 +425,26 @@ bool ObjectTypeCanBeRestricted(ObjectType objectType) } } -static std::vector GetAllMiscScenery() +struct MiscScenery { - std::vector miscScenery; - std::vector nonMiscScenery; + // Scenery that will end up on the ‘?’ tab + std::vector miscScenery{}; + // Scenery that has attached itself to an existing group, but is not referenced directly. + std::vector additionalGroupScenery{}; +}; + +static MiscScenery GetAllMiscScenery() +{ + MiscScenery ret; + std::vector referencedBySceneryGroups; std::vector sceneryGroupIds; for (ObjectEntryIndex i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { const auto* sgEntry = OpenRCT2::ObjectManager::GetObjectEntry(i); if (sgEntry != nullptr) { - nonMiscScenery.insert(nonMiscScenery.end(), sgEntry->SceneryEntries.begin(), sgEntry->SceneryEntries.end()); + referencedBySceneryGroups.insert( + referencedBySceneryGroups.end(), sgEntry->SceneryEntries.begin(), sgEntry->SceneryEntries.end()); sceneryGroupIds.emplace_back(i); } } @@ -487,50 +496,66 @@ static std::vector GetAllMiscScenery() break; } - // An object may be link itself against a scenery group, in which case it should not be marked as miscellaneous. + const ScenerySelection sceneryItem = { sceneryType, i }; + if (!IsSceneryEntryValid(sceneryItem)) + continue; + + const bool isReferencedBySceneryGroup = std::find( + std::begin(referencedBySceneryGroups), + std::end(referencedBySceneryGroups), sceneryItem) + != std::end(referencedBySceneryGroups); + if (isReferencedBySceneryGroup) + continue; + + // An object may link itself against a scenery group, in which case it should not be marked as miscellaneous. + bool isLinkedToKnownSceneryGroup = false; if (linkedSceneryGroup != OBJECT_ENTRY_INDEX_NULL) { if (std::find(std::begin(sceneryGroupIds), std::end(sceneryGroupIds), linkedSceneryGroup) != std::end(sceneryGroupIds)) { - continue; + isLinkedToKnownSceneryGroup = true; } } - const ScenerySelection sceneryItem = { sceneryType, i }; - if (IsSceneryEntryValid(sceneryItem)) - { - if (std::find(std::begin(nonMiscScenery), std::end(nonMiscScenery), sceneryItem) == std::end(nonMiscScenery)) - { - miscScenery.push_back(sceneryItem); - } - } + if (isLinkedToKnownSceneryGroup) + ret.additionalGroupScenery.push_back(sceneryItem); + else + ret.miscScenery.push_back(sceneryItem); } } - return miscScenery; + return ret; } void RestrictAllMiscScenery() { auto& gameState = GetGameState(); - auto miscScenery = GetAllMiscScenery(); + auto miscScenery = GetAllMiscScenery().miscScenery; gameState.RestrictedScenery.insert(gameState.RestrictedScenery.begin(), miscScenery.begin(), miscScenery.end()); } -void MarkAllUnrestrictedSceneryAsInvented() +static void MarkAllUnrestrictedSceneryInVectorInvented(const std::vector& vector) { - auto& gameState = GetGameState(); - auto miscScenery = GetAllMiscScenery(); - for (const auto& sceneryItem : miscScenery) + auto& restrictedScenery = GetGameState().RestrictedScenery; + + for (const auto& sceneryItem : vector) { - if (std::find(gameState.RestrictedScenery.begin(), gameState.RestrictedScenery.end(), sceneryItem) - == gameState.RestrictedScenery.end()) + const bool isNotRestricted = std::find(restrictedScenery.begin(), restrictedScenery.end(), sceneryItem) + == restrictedScenery.end(); + if (isNotRestricted) { ScenerySetInvented(sceneryItem); } } } +void MarkAllUnrestrictedSceneryAsInvented() +{ + auto scenery = GetAllMiscScenery(); + MarkAllUnrestrictedSceneryInVectorInvented(scenery.miscScenery); + MarkAllUnrestrictedSceneryInVectorInvented(scenery.additionalGroupScenery); +} + ObjectType GetObjectTypeFromSceneryType(uint8_t type) { switch (type) diff --git a/src/openrct2/world/Scenery.h b/src/openrct2/world/Scenery.h index b30c1795b4..9b70008a40 100644 --- a/src/openrct2/world/Scenery.h +++ b/src/openrct2/world/Scenery.h @@ -9,7 +9,7 @@ #pragma once -#include "../common.h" +#include "../core/Money.hpp" #include "Location.hpp" #include "ScenerySelection.h" diff --git a/src/openrct2/world/Surface.cpp b/src/openrct2/world/Surface.cpp index 015df092f2..61cb6bde17 100644 --- a/src/openrct2/world/Surface.cpp +++ b/src/openrct2/world/Surface.cpp @@ -16,6 +16,7 @@ #include "../scenario/Scenario.h" #include "Location.hpp" #include "Map.h" +#include "tile_element/Slope.h" ObjectEntryIndex SurfaceElement::GetSurfaceObjectIndex() const { @@ -135,7 +136,7 @@ void SurfaceElement::UpdateGrassLength(const CoordsXY& coords) int32_t baseZ = GetBaseZ(); int32_t clearZ = GetBaseZ() + LAND_HEIGHT_STEP; - if (Slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) + if (Slope & kTileSlopeDiagonalFlag) clearZ += LAND_HEIGHT_STEP; // Check objects above grass diff --git a/src/openrct2/world/Surface.h b/src/openrct2/world/Surface.h index 04b3511b58..578a8992e8 100644 --- a/src/openrct2/world/Surface.h +++ b/src/openrct2/world/Surface.h @@ -85,36 +85,5 @@ enum OWNERSHIP_AVAILABLE = (1 << 7) }; -enum -{ - TILE_ELEMENT_SLOPE_FLAT = 0x00, - TILE_ELEMENT_SLOPE_ALL_CORNERS_UP = 0x0F, - - TILE_ELEMENT_SLOPE_N_CORNER_UP = (1 << 0), - TILE_ELEMENT_SLOPE_E_CORNER_UP = (1 << 1), - TILE_ELEMENT_SLOPE_S_CORNER_UP = (1 << 2), - TILE_ELEMENT_SLOPE_W_CORNER_UP = (1 << 3), - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT = (1 << 4), - - TILE_ELEMENT_SLOPE_W_CORNER_DN = TILE_ELEMENT_SLOPE_ALL_CORNERS_UP & ~TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_DN = TILE_ELEMENT_SLOPE_ALL_CORNERS_UP & ~TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_DN = TILE_ELEMENT_SLOPE_ALL_CORNERS_UP & ~TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_DN = TILE_ELEMENT_SLOPE_ALL_CORNERS_UP & ~TILE_ELEMENT_SLOPE_N_CORNER_UP, - - TILE_ELEMENT_SLOPE_NE_SIDE_UP = TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_SE_SIDE_UP = TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_NW_SIDE_UP = TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_SW_SIDE_UP = TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - - TILE_ELEMENT_SLOPE_W_E_VALLEY = TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_S_VALLEY = TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP -}; - -// Surface -constexpr uint8_t kTileElementSurfaceDiagonalFlag = 0x10; // in TileElement.properties.surface.slope -constexpr uint8_t kTileElementSurfaceRaisedCornersMask = 0x0F; // in TileElement.properties.surface.slope -constexpr uint8_t kTileElementSurfaceSlopeMask - = (kTileElementSurfaceDiagonalFlag | kTileElementSurfaceRaisedCornersMask); // in TileElement.properties.surface.slope - constexpr uint8_t kTileElementSurfaceOwnershipMask = 0xF0; constexpr uint8_t kTileElementSurfaceParkFenceMask = 0x0F; diff --git a/src/openrct2/world/SurfaceData.cpp b/src/openrct2/world/SurfaceData.cpp index dbea729d80..1417e4f8b2 100644 --- a/src/openrct2/world/SurfaceData.cpp +++ b/src/openrct2/world/SurfaceData.cpp @@ -1,6 +1,7 @@ #include "SurfaceData.h" #include "Surface.h" +#include "tile_element/Slope.h" // 0x00981A1E // Table of pre-calculated surface slopes (32) when raising the land tile for a given selection (5) @@ -8,330 +9,306 @@ // 0x20 = base height increases constexpr uint8_t TileElementRaiseStyles[9][32] = { // MAP_SELECT_TYPE_CORNER_0 - { TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + { kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_CORNER_1 - { TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + { kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_CORNER_2 - { TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + { kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_CORNER_3 - { TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + { kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_FULL - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT }, + { kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight }, // MAP_SELECT_TYPE_EDGE_0 - { TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + { kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_EDGE_1 - { TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + { kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_EDGE_2 - { TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP }, + { kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp }, // MAP_SELECT_TYPE_EDGE_3 - { TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP }, + { kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp }, }; @@ -341,183 +318,159 @@ constexpr uint8_t TileElementRaiseStyles[9][32] = { // 0x20 = base height increases constexpr uint8_t TileElementLowerStyles[9][32] = { // MAP_SELECT_TYPE_CORNER_0 - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, + { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, 0, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_CORNER_1 - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, + { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + kTileSlopeNCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp + | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_CORNER_2 - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, + { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeWCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + kTileSlopeNCornerUp, + kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_CORNER_3 - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, + { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeSCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP - | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP - | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP - | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + kTileSlopeNCornerUp, + kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp + | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeDiagonalFlag | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_FULL - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT, + { kTileSlopeRaiseOrLowerBaseHeight, 0, 0, 0, @@ -540,147 +493,147 @@ constexpr uint8_t TileElementLowerStyles[9][32] = { 0, 0, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, 0, 0, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, 0 }, // MAP_SELECT_TYPE_EDGE_0 - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, + { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, + kTileSlopeNCornerUp, + kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, + kTileSlopeNCornerUp, + kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, + kTileSlopeNCornerUp, + kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeECornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, + kTileSlopeNCornerUp, + kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP, + kTileSlopeNCornerUp, + kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP }, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp }, // MAP_SELECT_TYPE_EDGE_1 - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, + { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, 0, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, 0, 0, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, + kTileSlopeECornerUp, + kTileSlopeECornerUp, + kTileSlopeSCornerUp, + kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, 0, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, 0, 0, - TILE_ELEMENT_SLOPE_E_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP }, + kTileSlopeECornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp }, // MAP_SELECT_TYPE_EDGE_2 - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, + { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, 0, 0, 0, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp, + kTileSlopeSCornerUp, + kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, 0, 0, 0, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp, + kTileSlopeSCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeSCornerUp | kTileSlopeWCornerUp }, // MAP_SELECT_TYPE_EDGE_3 - { SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, + { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, + kTileSlopeNCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, + kTileSlopeNCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, + kTileSlopeNCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, + kTileSlopeNCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP, + kTileSlopeNCornerUp, 0, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT | TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_E_CORNER_UP | TILE_ELEMENT_SLOPE_S_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP, - TILE_ELEMENT_SLOPE_N_CORNER_UP | TILE_ELEMENT_SLOPE_W_CORNER_UP }, + kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeSCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp, + kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, + kTileSlopeNCornerUp | kTileSlopeWCornerUp }, }; uint8_t LowerSurfaceCornerFlags(size_t SelectedCorner, size_t CurrentSlope) diff --git a/src/openrct2/world/SurfaceData.h b/src/openrct2/world/SurfaceData.h index 8aefd77c63..3f3dfae8cf 100644 --- a/src/openrct2/world/SurfaceData.h +++ b/src/openrct2/world/SurfaceData.h @@ -3,7 +3,5 @@ #include #include -constexpr auto SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT = 0x20; - uint8_t LowerSurfaceCornerFlags(size_t SelectedCorner, size_t CurrentSlope); uint8_t RaiseSurfaceCornerFlags(size_t SelectedCorner, size_t CurrentSlope); diff --git a/src/openrct2/world/TileElement.cpp b/src/openrct2/world/TileElement.cpp index d6413f6f5e..6838cf0f2d 100644 --- a/src/openrct2/world/TileElement.cpp +++ b/src/openrct2/world/TileElement.cpp @@ -18,6 +18,7 @@ #include "Banner.h" #include "Location.hpp" #include "Scenery.h" +#include "tile_element/Slope.h" bool TileElementIsUnderground(TileElement* tileElement) { diff --git a/src/openrct2/world/TileElement.h b/src/openrct2/world/TileElement.h index 52ce7c4a22..e90a7843f2 100644 --- a/src/openrct2/world/TileElement.h +++ b/src/openrct2/world/TileElement.h @@ -31,6 +31,7 @@ class TerrainEdgeObject; class FootpathObject; class FootpathSurfaceObject; class FootpathRailingsObject; +enum class RideColourScheme : uint8_t; using track_type_t = uint16_t; constexpr uint8_t MAX_ELEMENT_HEIGHT = 255; @@ -373,7 +374,7 @@ public: void SetRideIndex(RideId newRideIndex); uint8_t GetColourScheme() const; - void SetColourScheme(uint8_t newColourScheme); + void SetColourScheme(RideColourScheme newColourScheme); StationIndex GetStationIndex() const; void SetStationIndex(StationIndex newStationIndex); diff --git a/src/openrct2/world/TileInspector.cpp b/src/openrct2/world/TileInspector.cpp index d8bb5a8559..63cc0d0161 100644 --- a/src/openrct2/world/TileInspector.cpp +++ b/src/openrct2/world/TileInspector.cpp @@ -31,6 +31,7 @@ #include "Park.h" #include "Scenery.h" #include "Surface.h" +#include "tile_element/Slope.h" #include @@ -523,24 +524,24 @@ namespace OpenRCT2::TileInspector uint8_t newSlope = surfaceElement->GetSlope() ^ (1 << cornerIndex); // All corners are raised - if ((newSlope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) == TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + if ((newSlope & kTileSlopeRaisedCornersMask) == kTileSlopeRaisedCornersMask) { - newSlope = TILE_ELEMENT_SLOPE_FLAT; - if ((originalSlope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) != 0) + newSlope = kTileSlopeFlat; + if ((originalSlope & kTileSlopeDiagonalFlag) != 0) { - switch (originalSlope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) + switch (originalSlope & kTileSlopeRaisedCornersMask) { - case TILE_ELEMENT_SLOPE_S_CORNER_DN: - newSlope |= TILE_ELEMENT_SLOPE_N_CORNER_UP; + case kTileSlopeSCornerDown: + newSlope |= kTileSlopeNCornerUp; break; - case TILE_ELEMENT_SLOPE_W_CORNER_DN: - newSlope |= TILE_ELEMENT_SLOPE_E_CORNER_UP; + case kTileSlopeWCornerDown: + newSlope |= kTileSlopeECornerUp; break; - case TILE_ELEMENT_SLOPE_N_CORNER_DN: - newSlope |= TILE_ELEMENT_SLOPE_S_CORNER_UP; + case kTileSlopeNCornerDown: + newSlope |= kTileSlopeSCornerUp; break; - case TILE_ELEMENT_SLOPE_E_CORNER_DN: - newSlope |= TILE_ELEMENT_SLOPE_W_CORNER_UP; + case kTileSlopeECornerDown: + newSlope |= kTileSlopeWCornerUp; break; } } @@ -566,7 +567,7 @@ namespace OpenRCT2::TileInspector if (isExecuting) { - uint8_t newSlope = surfaceElement->GetSlope() ^ TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT; + uint8_t newSlope = surfaceElement->GetSlope() ^ kTileSlopeDiagonalFlag; surfaceElement->SetSlope(newSlope); } diff --git a/src/openrct2/world/Wall.cpp b/src/openrct2/world/Wall.cpp index f889baccfd..8b735c5bcf 100644 --- a/src/openrct2/world/Wall.cpp +++ b/src/openrct2/world/Wall.cpp @@ -190,7 +190,7 @@ void WallElement::SetAnimationIsBackwards(bool isBackwards) // clang-format off // rct2: 0x009A3FEC -constexpr static uint8_t LandSlopeToWallSlope[][NumOrthogonalDirections] = { +constexpr static uint8_t LandSlopeToWallSlope[][kNumOrthogonalDirections] = { // Top right Bottom right Bottom left Top left { 0, 0, 0, 0 }, { 0, EDGE_SLOPE_UPWARDS, EDGE_SLOPE_DOWNWARDS, 0 }, diff --git a/src/openrct2/world/tile_element/Slope.h b/src/openrct2/world/tile_element/Slope.h new file mode 100644 index 0000000000..fff29bd16c --- /dev/null +++ b/src/openrct2/world/tile_element/Slope.h @@ -0,0 +1,39 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +constexpr uint8_t kTileSlopeFlat = 0; +constexpr uint8_t kTileSlopeNCornerUp = 0b00000001; +constexpr uint8_t kTileSlopeECornerUp = 0b00000010; +constexpr uint8_t kTileSlopeSCornerUp = 0b00000100; +constexpr uint8_t kTileSlopeWCornerUp = 0b00001000; +constexpr uint8_t kTileSlopeRaisedCornersMask = 0b00001111; +constexpr uint8_t kTileSlopeDiagonalFlag = 0b00010000; +constexpr uint8_t kTileSlopeMask = (kTileSlopeDiagonalFlag | kTileSlopeRaisedCornersMask); + +constexpr uint8_t kTileSlopeWCornerDown = kTileSlopeRaisedCornersMask & ~kTileSlopeWCornerUp; +constexpr uint8_t kTileSlopeSCornerDown = kTileSlopeRaisedCornersMask & ~kTileSlopeSCornerUp; +constexpr uint8_t kTileSlopeECornerDown = kTileSlopeRaisedCornersMask & ~kTileSlopeECornerUp; +constexpr uint8_t kTileSlopeNCornerDown = kTileSlopeRaisedCornersMask & ~kTileSlopeNCornerUp; + +constexpr uint8_t kTileSlopeNESideUp = kTileSlopeNCornerUp | kTileSlopeECornerUp; +constexpr uint8_t kTileSlopeSESideUp = kTileSlopeECornerUp | kTileSlopeSCornerUp; +constexpr uint8_t kTileSlopeNWSideUp = kTileSlopeNCornerUp | kTileSlopeWCornerUp; +constexpr uint8_t kTileSlopeSWSideUp = kTileSlopeSCornerUp | kTileSlopeWCornerUp; + +constexpr uint8_t kTileSlopeWEValley = kTileSlopeECornerUp | kTileSlopeWCornerUp; +constexpr uint8_t kTileSlopeNSValley = kTileSlopeNCornerUp | kTileSlopeSCornerUp; + +// Special value, used for support drawing +constexpr uint8_t kTileSlopeAboveTrackOrScenery = 0b00100000; +// Special value, used when raising/lowering land corners/tiles +constexpr uint8_t kTileSlopeRaiseOrLowerBaseHeight = 0b00100000; diff --git a/src/thirdparty/dukglue/dukvalue.h b/src/thirdparty/dukglue/dukvalue.h index a70ad115ea..61382acd85 100644 --- a/src/thirdparty/dukglue/dukvalue.h +++ b/src/thirdparty/dukglue/dukvalue.h @@ -336,7 +336,7 @@ public: inline duk_int_t as_int() const { if (mType != NUMBER) throw DukException() << "Expected number, got " << type_name(); - return static_cast(mPOD.number); + return static_cast(mPOD.number); } inline duk_uint_t as_uint() const { diff --git a/test/tests/CMakeLists.txt b/test/tests/CMakeLists.txt index 76adadcc0a..3681c890df 100644 --- a/test/tests/CMakeLists.txt +++ b/test/tests/CMakeLists.txt @@ -19,7 +19,7 @@ set(test_files "${CMAKE_CURRENT_SOURCE_DIR}/IniReaderTest.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/IniWriterTest.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/LanguagePackTest.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Localisation.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/LocalisationTest.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/MultiLaunch.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/Pathfinding.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/Platform.cpp" diff --git a/test/tests/FormattingTests.cpp b/test/tests/FormattingTests.cpp index 1d2ca5df9e..899adfb126 100644 --- a/test/tests/FormattingTests.cpp +++ b/test/tests/FormattingTests.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -139,7 +140,7 @@ TEST_F(FormattingTests, comma_large) TEST_F(FormattingTests, currency) { - gConfigGeneral.CurrencyFormat = CurrencyType::Pounds; + Config::Get().general.CurrencyFormat = CurrencyType::Pounds; ASSERT_EQ(u8"-£251", FormatString("{CURRENCY}", -2510)); ASSERT_EQ(u8"£1", FormatString("{CURRENCY}", 4)); ASSERT_EQ(u8"£1", FormatString("{CURRENCY}", 5)); @@ -150,7 +151,7 @@ TEST_F(FormattingTests, currency) TEST_F(FormattingTests, currency2dp) { - gConfigGeneral.CurrencyFormat = CurrencyType::Pounds; + Config::Get().general.CurrencyFormat = CurrencyType::Pounds; ASSERT_EQ(u8"-£251.00", FormatString("{CURRENCY2DP}", -2510)); ASSERT_EQ(u8"£0.40", FormatString("{CURRENCY2DP}", 4)); ASSERT_EQ(u8"£0.50", FormatString("{CURRENCY2DP}", 5)); @@ -161,7 +162,7 @@ TEST_F(FormattingTests, currency2dp) TEST_F(FormattingTests, currency_yen) { - gConfigGeneral.CurrencyFormat = CurrencyType::Yen; + Config::Get().general.CurrencyFormat = CurrencyType::Yen; ASSERT_EQ(u8"-¥25,100", FormatString("{CURRENCY}", -2510)); ASSERT_EQ(u8"¥40", FormatString("{CURRENCY2DP}", 4)); ASSERT_EQ(u8"¥50", FormatString("{CURRENCY2DP}", 5)); @@ -172,7 +173,7 @@ TEST_F(FormattingTests, currency_yen) TEST_F(FormattingTests, currency2dp_yen) { - gConfigGeneral.CurrencyFormat = CurrencyType::Yen; + Config::Get().general.CurrencyFormat = CurrencyType::Yen; ASSERT_EQ(u8"-¥25,100", FormatString("{CURRENCY2DP}", -2510)); ASSERT_EQ(u8"¥40", FormatString("{CURRENCY2DP}", 4)); ASSERT_EQ(u8"¥50", FormatString("{CURRENCY2DP}", 5)); @@ -183,14 +184,14 @@ TEST_F(FormattingTests, currency2dp_yen) TEST_F(FormattingTests, currency_pts) { - gConfigGeneral.CurrencyFormat = CurrencyType::Peseta; + Config::Get().general.CurrencyFormat = CurrencyType::Peseta; ASSERT_EQ("-251Pts", FormatString("{CURRENCY}", -2510)); ASSERT_EQ("112Pts", FormatString("{CURRENCY}", 1111)); } TEST_F(FormattingTests, currency2dp_pts) { - gConfigGeneral.CurrencyFormat = CurrencyType::Peseta; + Config::Get().general.CurrencyFormat = CurrencyType::Peseta; ASSERT_EQ("-251.00Pts", FormatString("{CURRENCY2DP}", -2510)); ASSERT_EQ("0.40Pts", FormatString("{CURRENCY2DP}", 4)); ASSERT_EQ("111.10Pts", FormatString("{CURRENCY2DP}", 1111)); @@ -210,42 +211,42 @@ TEST_F(FormattingTests, escaped_braces) TEST_F(FormattingTests, velocity_mph) { - gConfigGeneral.MeasurementFormat = MeasurementFormat::Imperial; + Config::Get().general.MeasurementFormat = MeasurementFormat::Imperial; auto actual = FormatString("Train is going at {VELOCITY}.", 1024); ASSERT_EQ("Train is going at 1,024 mph.", actual); } TEST_F(FormattingTests, velocity_kph) { - gConfigGeneral.MeasurementFormat = MeasurementFormat::Metric; + Config::Get().general.MeasurementFormat = MeasurementFormat::Metric; auto actual = FormatString("Train is going at {VELOCITY}.", 1024); ASSERT_EQ("Train is going at 1,648 km/h.", actual); } TEST_F(FormattingTests, velocity_mps) { - gConfigGeneral.MeasurementFormat = MeasurementFormat::SI; + Config::Get().general.MeasurementFormat = MeasurementFormat::SI; auto actual = FormatString("Train is going at {VELOCITY}.", 1024); ASSERT_EQ("Train is going at 457.7 m/s.", actual); } TEST_F(FormattingTests, length_imperial) { - gConfigGeneral.MeasurementFormat = MeasurementFormat::Imperial; + Config::Get().general.MeasurementFormat = MeasurementFormat::Imperial; auto actual = FormatString("Height: {LENGTH}", 1024); ASSERT_EQ("Height: 3,360 ft", actual); } TEST_F(FormattingTests, length_metric) { - gConfigGeneral.MeasurementFormat = MeasurementFormat::Metric; + Config::Get().general.MeasurementFormat = MeasurementFormat::Metric; auto actual = FormatString("Height: {LENGTH}", 1024); ASSERT_EQ("Height: 1,024 m", actual); } TEST_F(FormattingTests, length_si) { - gConfigGeneral.MeasurementFormat = MeasurementFormat::SI; + Config::Get().general.MeasurementFormat = MeasurementFormat::SI; auto actual = FormatString("Height: {LENGTH}", 2048); ASSERT_EQ("Height: 2,048 m", actual); } diff --git a/test/tests/Localisation.cpp b/test/tests/LocalisationTest.cpp similarity index 97% rename from test/tests/Localisation.cpp rename to test/tests/LocalisationTest.cpp index f17a811cef..04a0859183 100644 --- a/test/tests/Localisation.cpp +++ b/test/tests/LocalisationTest.cpp @@ -7,9 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "openrct2/localisation/Localisation.h" - #include "helpers/StringHelpers.hpp" +#include "openrct2/localisation/Language.h" #include diff --git a/test/tests/RideRatings.cpp b/test/tests/RideRatings.cpp index 869baee72d..c37fa03421 100644 --- a/test/tests/RideRatings.cpp +++ b/test/tests/RideRatings.cpp @@ -48,8 +48,8 @@ protected: { RatingTuple ratings = ride.ratings; std::string line = String::StdFormat( - "%s: (%d, %d, %d)", ride.GetRideTypeDescriptor().EnumName, static_cast(ratings.Excitement), - static_cast(ratings.Intensity), static_cast(ratings.Nausea)); + "%s: (%d, %d, %d)", ride.GetRideTypeDescriptor().EnumName, static_cast(ratings.excitement), + static_cast(ratings.intensity), static_cast(ratings.nausea)); return line; } diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 4e132acc4a..0c82eaf354 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/test/tests/tests.vcxproj b/test/tests/tests.vcxproj index cc9e4aa593..1a37d58ab8 100644 --- a/test/tests/tests.vcxproj +++ b/test/tests/tests.vcxproj @@ -89,7 +89,7 @@ - +